schrieb:
> Sharif Islam wrote:
>> wrote:
>>> Hi all,
>>>
>>> I've just built myself a new server and installed Linux. I currently
>>> have a mailserver rnning Red Hat 9.0 and I'm using Postifx.
>>>
>>> My existing server runs just fine. I want to bring my new server
>>> online to test the mail portion without taking down my current server.
>>>
>>> I have set up Squirrelmail and that seems to deliver mail just fine.
>>> However, when I try and run a Perl script which uses the Net::SMTP
>>> module, I receive this error:
>>>
>>> "Can't call method "mail" on an undefined value at
>>> /prod/scripts/send.pl line 208."
>>>
>>> Here is a clip of my code:
>>>
>>> $smtp = Net::SMTP->new("nytelife");
>>> $smtp->mail("mail.chicagorsvp.com");
>>> $smtp->to($email);
>>> $smtp->data();
>> can you make sure you are able to connect to the smtp server?
>> Try this:
>>
>> $smtp = Net::SMTP->new("nytelife"); # connect to an SMTP server
>> if (defined $smtp)
>> {
>>
>> $smtp->mail("mail.chicagorsvp.com");
>> $smtp->to($email);
>> $smtp->data();
>> }
>> else {
>> print "Cannot to connect to nytelife";
>> exit;
>> }
>>
>> --sharif
>
> Hmm....says it cannot connect, even though Postfix IS running and I can
> send email internally.......
>
> Any thoughts?
>
> I've shutdown postfix on my other server, and I've changed my
> forwarding on my router to forward posts 25 & 113 to the new
110 is only for pop and postfix does no pop

> machine........
>
so your mailservers hostname is: mail.chicagorsvp.com ?
If it is you should be able to telnet to it:
telnet mail.chicagorsvp.com 25
You should see the postfix response message. Now you can type:
EHLO chicagorsvp.com
You should see response ok. Type:
MAIL FROM: youremailadress
You should see ok. Type
RCPT TO: emailadress
You should see ok. Type
DATA
Mailserver responds: enter mail. Type your mail
dfssadfa
then newline . exit
depending ony what kind of mailadresses you used and how you configured
the mailserver may reject your message. If you don't even see the
initial postfix responce, then try with the ip of your machine.