LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   A question about sendmail and host.domain.com... (https://www.linuxquestions.org/questions/linux-newbie-8/a-question-about-sendmail-and-host-domain-com-818599/)

trist007 07-07-2010 09:55 PM

A question about sendmail and host.domain.com...
 
I'm running CentOS 5.4 with sendmail. My computer hostname is bob.domain.com. Whenever I would nc -v 127.0.0.1 25 into sendmail I would get bob.domain.com on the banner. Whenever I send out email the emails would be user@bob.domain.com. I wanted the email to show up as user@domain.com. So in the etc/mail/sendmail.cf file I changed the line
Code:

Dj$w.hostname.com
to this
Code:

Djhostname.com
Now when I enter sendmail I see domain.com in the banner so I know the change took place. However, when I send email using
Code:

mail -s "test" xxx@xxx.com
then email still goes out as user@bob.domain.com. What other changes do I need to make?

trist007 07-09-2010 01:26 AM

In addition to the first question I would also like to know how to REQUIRE smtp authentication to send mail. I was able to setup AUTH LOGIN PLAIN. I have saslauthd setup. I use auth login which accepts base 64 credentials. Anyhow, I can authenticate just fine. However, I can also ehlo into the mail server and then go directly to mail from: without authenticating. How do I make it mandatory to authenticate first?

trist007 07-09-2010 04:17 PM

I have solved the first question. In order for my emails to show user@domain.com instead of user@bob.domain.com I simply had to edit my /etc/hosts file to have my IP match domain.com instead of bob.domain.com. That was it.

trist007 07-11-2010 11:15 AM

Wanted to see if there was an alternative to my first question. Seems that mail and telnet smtp go by the /etc/hosts file. I wanted to override that somehow.

trist007 07-24-2010 08:43 AM

n addition to the first question I would also like to know how to REQUIRE smtp authentication to send mail. I was able to setup AUTH LOGIN PLAIN. I have saslauthd setup. I use auth login which accepts base 64 credentials. Anyhow, I can authenticate just fine. However, I can also ehlo into the mail server and then go directly to mail from: without authenticating. How do I make it mandatory to authenticate first?

trist007 07-31-2010 02:18 AM

The require SMTP authentication is toggled by adding this
Code:

DaemonPortOptions=Port=smtp, Addr=x.x.x.x, Name=MTA, Modify=a
The 'a' makes the authentication required after the helo/ehlo options and before an email can get created.
Works like a charm.


All times are GMT -5. The time now is 11:48 AM.