sendmail unable to send message to external servers (e.g. hotmail,gmail etc)
first of all, I am new to mailing server stuff.
Long story in short; I am trying to send an email by sendmail (ubuntu) to external servers, but unable to send.
following is what i am trying to do and what i got the response:
sendmail -v xxx@hotmail/gmail.com < mail.test
where mail.test contains
[COLOR="rgb(105, 105, 105)"]
Subject: bla bla bla
This is test email.
and this is the reply:
WARNING: local host name (mylab) is not qualified; see cf/README: WHO AM I? firstname.lastname@example.org... Connecting to [127.0.0.1] via relay... 220 mylab ESMTP Sendmail 8.14.3/8.14.3/Debian-9.1ubuntu1; Thu, 30 Jun 2011 17:58:52 +0200; (No UCE/UBE) logging access from: localhost.localdomain(OK)-localhost.localdomain [127.0.0.1]......
MAIL From: SIZE=849 AUTH=root@mylab
250 2.1.0 ... Sender ok
250 2.1.5 ... Recipient ok
354 Enter mail, end with "." on a line by itself
and then nothing happened and keep the cursor blinking.
and following information is logged in syslog:
... mailer=es mtp, pri=570307, relay=mx2.hotmail.com. [22.214.171.124], dsn=4.0.0, stat=Deferred: Connection timed out with mx2.hotmail.com.
I also tried
telnet mx1.hotmail.com 25
it stucked at
trying to connect 126.96.36.199...
any idea would be appreciated. Thanks for your concentration.
I guess your ISP blocks outgoing traffic to port 25. If you want to be able to send mail outside, you should use the ISP mailserver as a smarthost
bathory is probably right; SMTP sockets from customer premises equipment are firewalled. Now you need to configure sendmail to use your ISP's MTA for outgoing mail.
First ensure that you have SASL support in your sendmail binary:
Find the "smart host" line in /etc/mail/sendmail.cf and type in your ISP's SMTP hostname:
|All times are GMT -5. The time now is 07:10 AM.|