SMTP Port 587

Port 25 Blocking is a frequent cause of difficulties in sending mail. A solution is to use port 587 instead.

This is the tutorial on how to change the port on some of the most commonly used E-mail clients; for other clients, check Category:E-mail Client Configuration.

Outlook
Outlook has many different versions, but all of the changes are similar to all the clients so we will just use one example here: Outlook Express.

To change your port to 587 first open up Outlook. You will then choose the Tools menu and the option Accounts:



Next you will go to the Mail tab, select your email account, then click Properties. This will bring up the properties window. In this new window you will go the Advanced tab to find the Outgoing mail(SMTP) port options. Change port option to 587 and away your mail goes.



Note: Having done this you may encounter an error where outgoing mail is blocked by the server. To solve this problem you will need to authenticate your account user name and password for the outgoing mail server. You will need to go to the servers tab and tick the box against "My server requires authentication", then click the settings button and ensure that the radio button against "Use same settings as my incoming mail server" is selected. Click apply and you should be good to go.

Thunderbird
Thunderbird actually uses similar menu options as Outlook. To change your SMTP port to 587 please follow these directions.

First you will want to open up thunderbird, select the tools menu and then the option Account Settings:



From the Account Settings window you will select Outgoing Server (SMTP). Highlight your mail account and click Edit:



From the edit screen you can easily switch port 25 to be port 587:



Thunderbird
Thunderbird for Macs set up is similar to the windows version. Here are some Mac screenshots for you and instructions.

First open up thunderbird and go to the Tools menu and then the Account Settings option:



On the Account Settings page you will then pick the Outgoing Server (SMTP) option. Directly from this screen you can change the port number just by changing 25 to port 587.



Mail.app
Mail.app is also a popular client. In order to switch the port to 587 you will first open up Mail.app, then select Mail, then Preferences from the top menu:



This opens up the preferences for the many different settings for Mail.app. You will want to select Accounts at this point and make sure that your DreamHost account is selected. Make sure you are on Account Information, and you will notice the Outgoing Mail Server (SMTP). From here you will want to click the Server Settings button:



This will bring up your SMTP options. From here you can easily change Server Port from 25 to port 587:



With the latest mail.app bundled with Leopard the SMTP configuration is slightly different. Open Mail and choose Preferences from the Mail menu. Click Accounts in the Preferences window. Select your Dreamhost mail account and click the Account Information pane. From the "Outgoing Mail Server (SMTP)" pop-up menu, select Edit Server List. Select the Advanced tab and set the outgoing port to 587. When you close the Preferences window you should be prompted to save your changes. Repeat for all Dreamhost mail accounts.

Sendmail
First, locate your configuration files in /etc/mail.

I did this on Fedora 8

Create an authinfo file. /etc/mail/client-info and add a line like this, putting your dreamhost email address in place of and your domain in place of. Change YoUrPaSsWoRd to whatever your password is. This must be on ONE line.

AuthInfo:mail. "U: " "I: " "P:YoUrPaSsWoRd"

Save the file and

chmod 600 /etc/mail/client-info

makemap hash /etc/mail/client-info < /etc/mail/client-info

Edit the sendmail.mc file. Change any of the following macros you find in sendmail.mc. Add any that are not there already.

define(`SMART_HOST',`mail. ')dnl define(`RELAY_MAILER_ARGS', `IPC $h 587')dnl FEATURE(`authinfo', `hash /etc/mail/client-info.db')dnl

Rebuild your config by typing "make" Restart Sendmail ( killall -HUP sendmail )

send a test email

ls /etc|mailx -s"test message"

Check /var/log/maillog for a line like this:

Aug 23 18:27:02 host sendmail[5215]: m7NMR0CI005213: to=, ctladdr= (0/0), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=122926, relay=somerelay.com. [ip address], dsn=2.0.0, stat=Sent (OK 1219537753 s30si5345521qbs.8)

The "stat=Sent" indicates success.

if you see something like

stat=Service unavailable

add some verbosity to logging to figure out your error

(define(`confLOG_LEVEL', `20')dnl) in sendmail.mc

check /var/log/maillog for errors.

Other E-mail Clients

 * See: E-mail Client Configuration

As you can see setting port 587 is pretty similar on all operating systems and all the different clients. If there is a client you are having trouble locating the SMTP port, just let us know to add it to this article, or if you figure it out, add it yourself, ah the beauty of wikis!!!!!!!!!