Link to home
Start Free TrialLog in
Avatar of thepadders
thepadders

asked on

Port blocking affecting sendmail ?

I have a test linux server on my home network. I want to be able to send emails using sendmail (particularly becase PHP uses sendmail to send emails). Port 25 is blocked by my ISP.

What do I need to change to sendmail to enable these emails to go through? At the moment sending an email from evolution, nothing happens. The email is never received and nor is an error generated.

Any ideas?

Thanks.
Avatar of PsiCop
PsiCop
Flag of United States of America image

There's no setting on sendmail you can change - your ISP is blocking Port 25 traffic for a very good reason...namely, you're not paying for that class of service. If you want to be able to send out E-Mail, then you need to pay your ISP for the class of service that lets you do that.
Avatar of thepadders
thepadders

ASKER

No PsiCop they are blocking this port because self mailing spam viruses send spam through port 25, and 99.999% of users have no need to run their own mail server. I am on an expensive business plan on telus; port 25 is still blocked; as it is on all their plans.
Ask your ISP if you can relay mail through their SMTP servers. This is a common feature which many business clients use.
Interesting...most ISPs don't block Port 25 for their business customers (mine doesn't).

As it_alchemist suggests, you can try relaying thru your ISP's mailservers. You may need to use SMTP-TLS and/or SMTP-AUTH to do this. You need to contact Telus tech-support and find out if, as a business customer, you can relay, and all the gory details needed to do so.

If they don't allow you to use their SMTP servers for relay, and still won't open Port 25 for a business customer (they may wait until you make the specific request), then it may be time to find a different ISP.
Oh relaying is no problem, that is what I do for my normal email from Outlook, for my own personal email I just use Port 26 instead of 25.

However, I don't know how to set this up in sendmail, hence the problem. I am using this to test a PHP script on linux servers, I am trying to make it work as much as possible in the same way that a standard linux server would.
ASKER CERTIFIED SOLUTION
Avatar of PsiCop
PsiCop
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Look for these lines in your sendmail config file

dnl # The following causes sendmail to additionally listen to port 587 for
dnl # mail from MUAs that authenticate. Roaming users who can't reach their
dnl # preferred sendmail daemon due to port 25 being blocked or redirected find
dnl # this useful.
dnl #
DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl

Just uncomment out the Daemon_options line (like I have)

Rebuild your sendmail config, and restart sendmail and you will now be able to use both ports 25 and 587 to send mail from your server.

You will need to set your email client to use port 587 for SMTP settings.. I have a couple of clients on AOL dialup that need to send mail when traveling, this does the trick for them.
I don't think that is going to help the Asker. What he seems to want is for his Linux server, running sendmail, to be able to send E-Mail out to the 'Net. And it seems that his ISP blocks Port 25 *out* for customers with his class of service. Telling sendmail to *listen* on Port 587 won't fix that.

Also note that what's being done here is telling sendmail to listen on port 587 for a Mail Submission Agent (MSA). Unless this is accompanied by SMTP-AUTH or SMTP-AFTER-POP or some other protocol to authenticate the clients, the result will be that *anyone* on the Internet can submit E-Mail to his sendmail server. And you can guarantee that some spammer is paying some script kiddie to look for exactly this sort of thing - a wide-open sendmail server that'll accept E-Mail from anyone.
Good point PSI... Yeah, you are correct, when I typed that out, I was thinking the senario was different.

Also about your second paragraph, the same can be said for port 25, correct? Without some form authentication, the server will be an open relay regardless of the port listening?
Given that I can't do it through port 25, how do I get sendmail to send mail to my real online server using port 26 (which I have opened already to allow this?) Is there a way for sendmail to forward the emails to that server and that server will then send them properly?

On the incoming, this home server is behind a firewall, it will only accept connections from within the internal home network so no problem there.