Linux - Server This forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
01-06-2010, 01:36 PM
#1
LQ Newbie
Registered: Jan 2010
Posts: 13
Rep:
configuring sendmail question
hi,
I want to edit my sendmail.mc so that mail is sent via a smarthost.
I know I must uncomment/change the line
dnl #define(`SMART_HOST',`mail.isp.com')dnl
but the server I wish to use requires me to authenticate.
Is this possible? Where would I put the credentials?
Thanks
seabro
01-06-2010, 02:49 PM
#2
Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 10,003
Quote:
Originally Posted by
seabro
hi,
I want to edit my sendmail.mc so that mail is sent via a smarthost.
I know I must uncomment/change the line
dnl #define(`SMART_HOST',`mail.isp.com')dnl
but the server I wish to use requires me to authenticate.
Is this possible? Where would I put the credentials?
Very possible, lots on Google related to this, too.
First, set your authorization informations by adding following line to /etc/mail/access file:
Code:
AuthInfo:my.mailrelay.com "U:USERNAME" "P:PASSWORD" "M:PLAIN"
Obviously, replace USERNAME and PASSWORD with the right values. Set the mail host name accordingly, too.
Then, add the following lines to /etc/mail/sendmail.mc, if they're not there already. You've mentioned the smart_host line already.
Code:
define(`SMART_HOST', `my.mailrelay.com')
FEATURE(`access_db')
If you don't enable the access_db feature, it WON'T WORK. Update the sendmail.mc file, and restart sendmail. Check out sendmail config docs, to change the authentication method. Here, it's
M ethod:PLAIN (for clear text), but there are other values it can take.
1 members found this post helpful.
01-07-2010, 06:08 AM
#3
LQ Newbie
Registered: Jan 2010
Posts: 13
Original Poster
Rep:
Hey TB0ne,
Thanks very much for the reponse.
I have a small problem.
I implemented the changes suggested in /etc/mail/access then I looked at /etc/mail/sendmail.mc and I saw:
dnl #
FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db',`hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
dnl #
So I did:
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
then
service sendmail restart.
I tried sending a mail from the command line then I checked /var/log/maillog and I see:
Jan 7 11:59:24 [213 sendmail[18683]: o07BxO5M018683: to=xx@xxx.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30060, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (o07BxORC018684 Message accepted for delivery)
Jan 7 11:59:44 [213 sendmail[18686]: o07BxORC018684: to=<xx@xxx.com>, ctladdr=<root@213.xxx.xxx.188> (0/0), delay=00:00:20, xdelay=00:00:20, mailer=esmtp, pri=120333, relay=mx0.123-reg.co.uk. [194.154.164.157], dsn=5.0.0, stat=Service unavailable
Jan 7 11:59:44 [213 sendmail[18686]: o07BxORC018684: o07BxiRC018686: DSN: Service unavailable
(and the email did not arrive).
So I went ahead and added:
FEATURE(`access_db')
right below the existing:
dnl define(`SMART_HOST',`mail.authsmtp.com')dnl
then I:
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
service sendmail restart
and tried again unsuccessfully.
If I am not mistaken, I thought I should see evidence of use of smart host in the log file? but I am not.
Your help is appreciated.
Seabro
01-07-2010, 01:05 PM
#4
Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 10,003
Quote:
Originally Posted by
seabro
Hey TB0ne,
Thanks very much for the reponse.
I have a small problem.
I implemented the changes suggested in /etc/mail/access then I looked at /etc/mail/sendmail.mc and I saw:
Whoops...I don't think I mentioned the part where you have to generate a new access.db file. My bad:
Code:
makemap hash /etc/mail/access.db < /etc/mail/access
Then restart Sendmail, and give it another shot.
1 members found this post helpful.
01-07-2010, 01:31 PM
#5
LQ Newbie
Registered: Jan 2010
Posts: 13
Original Poster
Rep:
Quote:
Originally Posted by
TB0ne
Whoops...I don't think I mentioned the part where you have to generate a new access.db file. My bad:
Code:
makemap hash /etc/mail/access.db < /etc/mail/access
Then restart Sendmail, and give it another shot.
Thanks TBOne, I will give it a try.
Thread Tools
Search this Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT -5. The time now is 12:23 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News