LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-07-2010, 08:55 PM   #1
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Rep: Reputation: 69
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?

Last edited by trist007; 07-07-2010 at 08:57 PM.
 
Old 07-09-2010, 12:26 AM   #2
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Original Poster
Rep: Reputation: 69
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?
 
Old 07-09-2010, 03:17 PM   #3
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Original Poster
Rep: Reputation: 69
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.
 
Old 07-11-2010, 10:15 AM   #4
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Original Poster
Rep: Reputation: 69
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.

Last edited by trist007; 07-11-2010 at 10:25 AM.
 
Old 07-24-2010, 07:43 AM   #5
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Original Poster
Rep: Reputation: 69
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?
 
Old 07-31-2010, 01:18 AM   #6
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Original Poster
Rep: Reputation: 69
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Send domain mail to offsite/external host from the webhost using sendmail Plesk 9 natern Linux - Server 12 03-13-2011 07:00 AM
Sendmail vs host.domain, featuring DNS /dev/me Slackware 2 09-09-2008 12:28 AM
I don't want to use my sendmail smart host for machines in my local domain blanny Linux - Networking 4 10-26-2006 10:48 PM
Sendmail sending as host.domain.com, i want it to be from just domain.com. PlatinumRik Linux - Software 5 10-07-2004 04:32 PM
Sendmail host/domain problem. Tarantismic Yak Linux - General 2 05-08-2001 06:25 PM


All times are GMT -5. The time now is 07:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration