Use an alternate SMTP port with Mail.app

Jul 08, '02 09:47:43AM

Contributed by: xTina

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.

Comments (3)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20020708094743450