Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Sendmail cannot send external email

Posted on 2004-11-30
9
Medium Priority
?
1,131 Views
Last Modified: 2013-12-15
I have setup sendmail to use port 26 as smtp, I have no problem sending internal email but when I send external email eg. yahoo mail, it keep showing the following  errors

Deferred: Connection timed out with mx4.mail.yahoo.com.
Message could not be delivered for 5 days
Message will be deleted from queue

I have no problem receiving external email because I use a mail port redirection from port 25 to port 26 as my ISP had block port 25

Any idea how to resolve this problem?

0
Comment
Question by:ghgan
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12707117
> my ISP had block port 25
-- http://help.yahoo.com/help/us/mail/pop/pop-06.html --
If your ISP blocks port 25 or if you're unable to send email, then you will need to use port 587 when sending via Yahoo!'s SMTP server. To make this change, please follow the directions below:

From the "Tools" menu, select "Accounts"
Select your Yahoo! POP account and click on the "Properties" button
Click on the "Advanced" tab
Next to "Outgoing server (SMTP), change port 25 to 587
Click "Apply", then click "OK" and "Close"
----
Wesly
0
 
LVL 40

Expert Comment

by:jlevie
ID: 12707976
When your ISP blocks port 25 they only do so for mail that does not flow through their mail server. This means that the solution to your problem is to configure Sendmail to use your ISP's mail server as a smart host for outbound email. This can be accomplished by including:

define(`SMART_HOST',`mail.my-isp.net')

in the mc file used to build sendmail.cf and run Sendmail on the standard SMTP (25/TCP) port. This will solve the problem of outgoing mail. For inbound mail configure Sendmail to listen on 587 in addition to port 25 and configure mail redirection for 25->587. Or have accounts for each user on your ISP's mail server and use fetchmail.
0
 

Author Comment

by:ghgan
ID: 12708712
Hi jlevie

That is not an option, the reason being my users might not be a subscriber of the same ISP, furthermore I have enable smtp-auth. Anyway I have try telnet to port 26 at ip address 202.156.148.198 and it does not encounter any problem and I am using Fedora 1
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 40

Expert Comment

by:jlevie
ID: 12709431
In order to exchange mail with other MTA's your server must be using a standard SMTP port since the MTA's on the Internet are only listening for connections on those ports. By and large that means 25/TCP. And in your ISP blocks that port for outbound(and possibly inbound connections) you will have to use your ISP as an outbound relay, which in turn means that your Sendmail must be using the standard SMTP port.

In you configure Sendmail to listen on both 25 and 587 you can relay outbound via your ISP's mail server and change your mail redirection to be 25->587 so that inbound mail comes through. That also means that your clients will need to use 587. The standard sendmail.mc on Fedora contains commented out directives for enabling 587 as an additional listening port.
0
 
LVL 6

Expert Comment

by:makhan
ID: 12713126
Just a thought

>> That is not an option, the reason being my users might not be a subscriber of the same ISP, furthermore I have enable
>> smtp-auth.

You could perhaps use `RELAY_BASED_ON_MX' feature.
0
 
LVL 40

Accepted Solution

by:
jlevie earned 750 total points
ID: 12713149
My pardons, but... That still misses the point that to send mail to any external MTA Sendmail has to be using 25/TCP since that's all the remote mail servers are listening on. And that is the cause of his failures since this Sendmail is using 26/TCP to avoid the ISP blocking on 25/TCP.
0
 
LVL 6

Expert Comment

by:makhan
ID: 12713471
I agree to jlevie.
0
 

Author Comment

by:ghgan
ID: 12748420
I am wondering, is it possible to use iptables to redirect my smtp port 26 to port 25 in the ethernet outgoing interface. If so, will it resolve my problem since I found out my ISP only block incoming TCP 25.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 12750037
You might be able to make that work, but it would seem simpler to me to set up Sendmail for the default SMTP port and to enable the alternate SMTP port (587/TCP). Then change the 25-26 mapping to be 25-587.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
I have written articles previously comparing SARDU and YUMI.  I also included a couple of lines about Easy2boot (easy2boot.com).  I have now been using, and enjoying easy2boot as my sole multiboot utility for some years and realize that it deserves …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month11 days, 16 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question