Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Use an alternate SMTP port with Mail.app Apps
It is possible to make Mail.app use an SMTP server running on a port other than 25. This is especially nice if you're using SSH to tunnel SMTP connections and don't want to (or cannot) forward localhost's port 25. This option is not accessible from Mail's preferences, you will have to manually edit the preferences file (com.apple.mail.plist in ~/Library/Preferences).

Read the rest of the article for the how-to...

  1. Make sure you have configured the SMTP server you want to use in Mail's preferences.

  2. Quit Mail.

  3. In ~/Library/Preferences/com.apple.mail.plist, find the section corresponding to your SMTP server. It should look similar to this one:
    <dict>
    <key>AccountType</key>
    <string>SMTPAccount</string>
    <key>Hostname</key>
    <string>smtp.mydomain.com</string>
    <key>ShouldUseAuthentication</key>
    <string>NO</string>
    </dict>
  4. Add the following key/value-pair to this section (replace 2342 with the port number you want to use):
    <key>PortNumber</key>
    <string>2342</string>
That's it; relaunch Mail.app and it should use the alternate port number.
    •    
  • Currently 5.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[30,026 views]  

Use an alternate SMTP port with Mail.app | 3 comments | Create New Account
Click here to return to the 'Use an alternate SMTP port with Mail.app' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Nice tip!
Authored by: ragnar on Jul 08, '02 01:33:19PM

Some readers may be wondering why anyone would want to change the port. I have a reason:

I frequently switch between my home network, dial up and my girlfriend's DSL provider. The phone dialup and the DSL provider are fascists about port 25 and disallow any traffic over that port unless it goes through their SMTP. In principle this is probably a good thing since it decreases the spam load, but it is a pain in the butt for me to change the settings (manually, since Mail.app isn't location aware) each time I hop around.

Since I have administrative privs on my company mail server (and it is a small company) I think I'll change the port number to make my life easier.

There you have it... an actual use for the tip, albeit an esoteric one.



[ Reply to This | # ]
What about......
Authored by: pecosbill on Jul 11, '02 06:32:21PM

Did you try typing in the SMTP's server name as smtp.mydomain.com:2453 in the GUI? That's the standard method to specify a different port. (2543 being the port number desired, of course)



[ Reply to This | # ]
Use an alternate SMTP port with Mail.app
Authored by: Jazzer101 on Jul 21, '10 11:31:03AM
This is a little bit unnecessary. You can change the outgoing SMTP port in Mail.app's preferences - it's just a bit hidden: preferences > accounts > account information > outgoing mail server (stmp) select "edit smtp server list" from the drop down select the relevant server click the "advanced" button check "use custom port" type the desired port number click "ok" exit preferences - remembering to save your new settings on your way out NB: This tip can also be used to 'force' mail to use port 465 if you're suffering from the "slow Gmail IMAP in Mail.app problem".

[ Reply to This | # ]