I have setup a sendmail server on my centOS box. This boxes uses PAM and I setup /etc/pam.d/smtp.sendmail to use system-auth. IMAP & POP work like a dream, so does SMTP. However there is one thing that I'm confused about with SMTP.
Now I have port 25 open so ANYBODY can log into my SMTP server and send mail in or out. I was able to utilize the access.db file so that now only domains listed in the access.db can send mail out, otherwise known as relaying. So at this point a spammer can log into my SMTP server and send mail in. But he can't send mail out to the internet, which would result in my mail server getting blacklisted. Anyhow so I'm in great shape.
Now here's the part that I'm confused about. I setup a POP email account from my mail server on my cellphone using a 3G connection. I can receive mail via POP on my phone no problem. However, I'm not able to send mail out. So I checked, this SMTP server requires sign in in my cellphone settings. I put in my system login and password(same as SSH login), which works with PAM. Now, I can send mail out w00t. It works.
So here's my quandary. I do not have auth login enabled, how am I able to login to the SMTP server?
For example, if I telnet into the SMTP server on 25. I run
Mail relay denied.
So the domain that my 3G cellphone uses when it tries to connect to my mail server would need to be in the access.db to be able to relay, but it isn't. So how is my phone able to relay on a 3G connection (not wifi, otherwise the IP would be in the access.db file). Is there another way of authenticating to the SMTP server besides AUTH?