Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Port 25 or 995 for Mail?

Hello,

I noticed that my mail got collected into Outbox and not living anywhere? I therefore verified the settings: Mail Preferences/Accounts/Advanced/Port nr and noticed that port was 995. I changed it to 25 and mail left the Outbox imediately.

The purpose of this post is to verify if indeed port 25 is the correct one (as it should normaly be) or is perhaps some kind of "last resource" and therefore I should go back to port 995 and search elsewere for problems? Is it safe to keep port 25 open for email?

Thanks

15Alu PB G4; 1.5 GHz; 80GB@5400; 128VRAM, SD, Panther (10.3.9), Mac OS X (10.4.7), MacBook 2 GHz, 120 GB HD, 1GB RAM, Boot Camp + XP Pro, iPod 4G 40GB , iPod Nano

Posted on Oct 30, 2006 11:55 AM

Reply
8 replies

Oct 30, 2006 12:32 PM in response to D.M.

Port 995 is for inbound SSL-protected pop mail connections. Port 110 is it's non-SSL equivalent. Port 993 is for inbound SSL-protected imap connections. Port 143 is it's non-SSL equivalent.

Port 25 is for outbound smtp. Some servers use or allow port 587 as the SSL-protected and authenticated sendmail port equivalent (that lets people send mail through that server, even though they are affiliated with a "foreign" domain, because some ISPs won't let you send mail to a destination port 25 smtp server if your "From" address doesn't match the ISP's domain name, or if you don't have an email account with the ISP, that is, they are blocking outbound mail from your computer destined to a "foreign" smtp mailserver's port 25).

So yes, as mentioned above, you want to select your outbound destination smtp port to be 25.

Unless you are running your own mail server you don't need to have port 25 open on your Mac's firewall or your DSL/cable modem's firewall. Port 25, in this case, is the destination port at the distant smtp server, not the source port on the client machine. If you were running a mailserver, people would send their mail to your mailserver on your port 25. When your local computer sends mail, it randomly chooses an unused port (at least I think it's randomly chosen), and sends it out to the destination port 25 on the distant mailserver. For example, I did a "tcpdump" command and watched the packets go to my mailserver from my machine. My email left my machine on port 50941. But I don't specify this in Mail's preferences anywhere, you don't have to, it takes care of itself.

The imap, pop, and secure imap and pop ports are the same way. You are actually specifying what port on the mailserver you are connecting to to retrieve your mail from that server.



(if this solves your problem, or is actually helpful towards arriving at a solution to your problem, please consider marking this reply as "helpful" or "solved," in addition to, if applicable, marking this question as "answered")

Oct 30, 2006 1:00 PM in response to j.v.

J.V.
Thank you for your informative post. Upon changing from port 995 to port 25, no mail arived anylonger, so I changed back to 995, mail started to come in, but no sending. I made a test: sending a test mail from my computer account to mail yahoo account. It has never arrived on yahoo.
What do you make of it?

Oct 30, 2006 1:14 PM in response to D.M.

Note what j.v. has said about the two kinds of servers involved: outgoing (for sending messages) & incoming (for receiving them). You set incoming server options in the "Advanced" tab of Mail's account preferences, but you set the outgoing ones in the "Account Information" tab, by using the "Server Settings" button at the bottom of the window.

Thus, for each email account, you will have two sets of server settings. As j.v. explained, they will not be the same.

Oct 30, 2006 1:43 PM in response to R C-R

Yes, thank you for clarifying that. I have port 995 for incoming and 25 for outgoing. I can receive email now, but I cannot send.
In fact, when I click on "send" buton, the window disapears but there is no mail in the "sent" folder neither in the "outgoing" folder.

The questions therefore are:
1.what happened to the emails? where do they vanish and why don't they remain in the "outgoing" folder if they are not sent?
2. what can I do to correct the problem?

PS: my laptop's battery is just getting empty (5% remaining) and I have to stop here but I will check again later when I get a chance to recharge. Thank you again

Oct 30, 2006 7:04 PM in response to D.M.

Try doing this:
1. Launch Mail
2. Launch Terminal from your user account that you are running Mail.app from.
3. If the computer account you are working from is not an admin-privileged account, in Terminal, type su {yourAdminAcctShortUserName} and enter the admin password. (If you normally live and work out of your admin account, you can skip this step, BUT you should really consider setting up a separate admin account for computer administration activities, and convert your day-to-day account to a regular user (i.e., take away admin privileges. This recommendation is strictly from a network security viewpoint -- if anything nasty of a mac or unix flavor were to ever get into your machine via email, trojaned websites, etc., at least it'd be confined to that one home account and possibly, worst case, other user accounts within the same group, so it wouldn't (shouldn't) pervade every part of your OS -- okay so now I'll get off my soapbox about that).
4. Now type sudo tcpdump -i en0 port 25 NOTE: use en0 if tethered to your DSL/cable modem by RJ-45 ethernet cable, use en1 if your are using wireless airport 802.11b/g. You'll be prompted for an admin password again.
5. Now switch back to Mail, create a medium-sized message (cut&paste something out of a quasi-lengthy Word document) and send it.
6. Back in Terminal If you see bunches and bunches and bunches of packets that look kinda like this:
19:37:07.017276 IP 192.168.0.2.49603 > cia-ia1.mx.aol.com.submission: FP 1159:1196(37) ack 3583 win 65535 <nop,nop,timestamp 330307419 2291111033>
then that would indicate that your email is leaving your machine and going to your mail provider's smtp server. Note that on my example here, my email left my machine on port 49603, to destination port (on AOL's mailserver) 587, which is, apparently, the numeric equivalent of what the .submission thing is on cia-ia1.mx.aol.com.submission. You are using port 25 with your mail server so yours will probably say {your ISP's hostname}.smtp, since the "standard" smtp port is 25.
7. Do a <control>-c to kill the tcpdump, exit to log out of the admin account, and ⌘q if you're done with Terminal.

This should help you figure out if your mail is even leaving your machine. Let us know what's up when you try this.

Port 25 or 995 for Mail?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.