LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   A question about outgoing mail... (https://www.linuxquestions.org/questions/linux-newbie-8/a-question-about-outgoing-mail-824475/)

trist007 08-05-2010 08:05 PM

A question about outgoing mail...
 
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
Code:

ehlo domain.com
mail from:user@domain.com
rcpt to:user@domain.com
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?

trist007 08-05-2010 09:08 PM

Ok now I got it. Ok so AUTH LOGIN is not required but IT IS enabled. So even though I login from an IP/domain that is not in the access.db file, if I login via AUTH LOGIN, I am then able to relay mail out.

I finally get it. Sweet. Hope this helps somebody else.


All times are GMT -5. The time now is 12:29 PM.