SMARTHOST Authentication With Sendmail
Rogers, one of Canada’s biggest ISP’s has this nasty habit of making life difficult for it’s customers. First they throttle BitTorrent traffic, and now in an attempt to curb spam, they block all outbound connections from port 25.
While this may not seem like a huge deal to most users, what this means is that you can’t connect to any other mail server when attempting to send emails because Rogers has blocked access. Jenna can’t send emails using her McMaster email from a Rogers account.
When I initially looked at setting up Internet, this was the first question I asked Rogers. They assured me that traffic shaping was the only limitation they put on the account. The customer service agent assured me that their literature even mentions this. Their literature is wrong.
As a way around this problem, you are going to want to set up a SMARTHOST on a linux box within the home network which is attached to the Rogers connection.
I did some testing and determined that Rogers doesn’t block all traffic over port 25, but only traffic that isn’t going to a Rogers controlled mail server.
9:44 ash@galactica:[~]> telnet smtp.broadband.rogers.com 25
Trying 206.190.36.18…
Connected to smtp.broadband.rogers.com (206.190.36.18).
Escape character is ‘^]’.
220 smtp107.rog.mail.re2.yahoo.com ESMTP
What we can do now, is set up a SMARTHOST in sendmail to basically forward emails from the server to Rogers SMTP server, then on to it’s destination. The following assumes you are the root user.
In your /etc/mail/sendmail.mc file, we need to add the following:
define(`SMART_HOST',`smtp.broadband.rogers.com')
This defines what server we are going to use as a SMARTHOST. The other problem we are going to run into is that unlike other ISP’s which allow you to send via the SMARTHOST based on what your domain is (basically if you are connected on an ISP’s network, you can send using their server) Rogers requires that users authenticate.
To do this, we need to add the following to the /etc/mail/access file:
AuthInfo:smtp.broadband.rogers.com "U:<username>" "P:<password>" "M:PLAIN"
I then changed the permissions to the file since I had my plaintext password in it:
chmod 660 /etc/mail/access
Next, we will regenerate the sendmail.cf and access.db files.
m4 /etc/mail/sendmail.mc > /etc.mail/sendmail.cf
makemap hash /etc/mail/access < /etc/mail/access
Now, restart sendmail, and you should be ready to go.
What you can do now, is set up all of your mail clients to point to the linux server as your outgoing mail server and it will forward all of your emails to Rogers and then on to it’s destination.