Posts Tagged ‘email’

How to Add an Additional Outoing Mail, SMTP Port

Friday, June 19th, 2009

Pertains to: Mediatemple (dv) Dedicated Virtual Accounts before v3.5, using Plesk

After spending over 20 hours simply trying to simply setup a customer’s email client, we decided that this deserves some documentation we couldn’t find elsewhere.

Using MediaTemple, I can’t seem to send email, my smtp server is failing?

The problem: Apparently several ISP’s on the west coast (particularly in California – including AT&T, Comcast) block all traffic on port 25.  AT&T’s support article detailing why they block port 25 (You’ll need to click the support link at the bottom to access the area, then paste the link again)

So save your time!  In our case it had nothing to do with our client’s email program (e.g. Apple Mail, Thunderbird, Outlook, etc), nothing to do with their network, or even our host mediatemple!  AT&T was blocking all traffic on port 25; which is the industry standard for outgoing mail, or connecting to an SMTP server.

Why are they blocking port 25 Yarrghh?

AT&T and many ISP’s have begun to block that port in order to “combat junk email and spam from mis-configured and virus-infected computers.”  Which to us seems to not really solve the problem, but run away from it for a period of time, until spammers begin using a different port anyway.   But perhaps it will have a similar affect as alternating phaser modulation used on the borg. In any case, here’s how you can fix it:

How to Configure an Additional SMTP Port on Plesk, Mediatemple

Many times your host will already provide the additional port (e.g. 2525, or 587, or 26) be sure to ask them first.  If you’re the host, continue on.

1) Log into your plesk account as root.  To do so, you’ll need to make sure root is enabled, and you’ll need the password.  (More on root access)
2) Goto Virtuozzo -> File Manager

3) Find the file: /etc/xinetd.d/smtp_psa

4) Copy the file and rename as smtp_nonstandard.

5) Edit the file.  You’re final file will look like:

service smtp2
{
port = 587
type = UNLISTED

socket_type     = stream
protocol        = tcp
wait            = no
disable        = no
user            = root
instances       = UNLIMITED
server          = /var/qmail/bin/tcp-env
server_args     = -Rt0 /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true

}

From our original file, we’ve changed 3 things.  “service smtp2″ is the name for the new process. And you’ll add 2 parameters: port & type to tell the service to listen on our new port.  Choose any port number you’d like, however we recommend 587, or perhaps 2525 – you’ll need to make sure you’re not trumping a port that’s already in use.

6) Last, you’ll need to SSH into your server as root user.  When in, execute this command to restart your services:
/etc/init.d/xinetd restart

Outoing Mail SMTP References