Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to configure sendmail to send e-mail through my ISP's SMTP gateway. I've found the SMART_HOST directive in /etc/mail/sendmail.mc and set it thus:
Code:
dnl # Uncomment and edit the following line if your outgoing mail needs to
dnl # be sent out through an external mail server:
dnl #
define(`SMART_HOST',`smtp.my.isp.com')
This works when I connect when I am actually dialed up to my ISP. However I occasionally dial into work and when I do I can't send e-mails via my ISP's smtp gateway any more because it rejects it.
I believe the problem will be resolved if I can turn on SMTP authentication when sendmail forwards e-mail using the SMART_HOST directive, but I can't see how to do that. Can anyone point me in the right direction?
I'm trying to do something similar. Is it possible to encrypt the password in the /etc/mail/access file? (edit: so that someone browsing the file can't read it)
sorry I was refering to method 2: using sendmail 8.12 or greater. Which doesn't say anything about chmoding the /etc/mail/access file. Since access must be built into a database I suppose I might be able to simply change the password to something else after the database is mapped. But that could cause a problem if someone else maps the database without changing the access file. I guess just chmodding that file is best.
I've tried using both username and username@domain.com for Identity field. Used username in this example.
I make the access.db map and restart sendmail like so:
Code:
[root@localhost mail]# makemap hash /etc/mail/access.db < /etc/mail/access
[root@localhost mail]# /etc/init.d/sendmail restart
Shutting down sendmail: [ OK ]
Shutting down sm-client: [ OK ]
Starting sendmail: [ OK ]
Starting sm-client: [ OK ]
Then I tested out sendmail using the following mail command:
Which resulted in me receiving this returned message:
Code:
From MAILER-DAEMON@localhost.localdomain Wed Sep 7 14:47:24 2005
Return-Path: <MAILER-DAEMON@localhost.localdomain>
Received: from localhost (localhost)
by localhost.localdomain (8.12.11/8.12.11) id j87LlOLB006159;
Wed, 7 Sep 2005 14:47:24 -0700
Date: Wed, 7 Sep 2005 14:47:24 -0700
From: Mail Delivery Subsystem <MAILER-DAEMON@localhost.localdomain>
Message-Id: <200509072147.j87LlOLB006159@localhost.localdomain>
To: <root@localhost.localdomain>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="j87LlOLB006159.1126129644/localhost.localdomain"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)
Status: RO
Content-Length: 1808
Lines: 49
This is a MIME-encapsulated message
--j87LlOLB006159.1126129644/localhost.localdomain
The original message was received at Wed, 7 Sep 2005 14:47:24 -0700
from localhost.localdomain [127.0.0.1]
----- The following addresses had permanent fatal errors -----
<recipient@domain.com>
(reason: 572 root@localhost.localdomain host name is unknown)
----- Transcript of session follows -----
... while talking to mail.server.address.com.:
>>> MAIL From:<root@localhost.localdomain> SIZE=379
<<< 572 root@localhost.localdomain host name is unknown
554 5.0.0 Service unavailable
--j87LlOLB006159.1126129644/localhost.localdomain
Content-Type: message/delivery-status
Reporting-MTA: dns; localhost.localdomain
Received-From-MTA: DNS; localhost.localdomain
Arrival-Date: Wed, 7 Sep 2005 14:47:24 -0700
Final-Recipient: RFC822; recipient@domain.com
Action: failed
Status: 5.0.0
Diagnostic-Code: SMTP; 572 root@localhost.localdomain host name is unknown
Last-Attempt-Date: Wed, 7 Sep 2005 14:47:24 -0700
--j87LlOLB006159.1126129644/localhost.localdomain
Content-Type: message/rfc822
Return-Path: <root@localhost.localdomain>
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by localhost.localdomain (8.12.11/8.12.11) with ESMTP id j87LlOLB006157
for <recipient@domain.com>; Wed, 7 Sep 2005 14:47:24 -0700
Received: (from root@localhost)
by localhost.localdomain (8.12.11/8.12.11/Submit) id j87LlOWs006156
for recipient@domain.com; Wed, 7 Sep 2005 14:47:24 -0700
Date: Wed, 7 Sep 2005 14:47:24 -0700
From: root <root@localhost.localdomain>
Message-Id: <200509072147.j87LlOWs006156@localhost.localdomain>
To: recipient@domain.com
Subject: test
this is a test
--j87LlOLB006159.1126129644/localhost.localdomain--
I also thought that perhaps the SMART_HOST line from sendmail.mc had to be changed as the original poster did. (This is actually what I tried first). This method results in no returned message.. but the message doesn't get through either. I have also tried different adding thing for Realm and Mechanism tokens but still get a similar return message. I will try the method listed here http://www.sendmail.org/~ca/email/auth.html#smtpclient which is basically Pete M's method for pre 8.12 with a couple additions to the sendmail.mc file. I will also perhaps try another smtp server I have to see if results are different.
I get a message back when I use the other smtp server with smart host.
Here is the reply:
Code:
From MAILER-DAEMON@localhost.localdomain Wed Sep 7 16:12:16 2005
Return-Path: <MAILER-DAEMON@localhost.localdomain>
Received: from localhost (localhost)
by localhost.localdomain (8.12.11/8.12.11) id j87NCGGb006488;
Wed, 7 Sep 2005 16:12:16 -0700
Date: Wed, 7 Sep 2005 16:12:16 -0700
From: Mail Delivery Subsystem <MAILER-DAEMON@localhost.localdomain>
Message-Id: <200509072312.j87NCGGb006488@localhost.localdomain>
To: <root@localhost.localdomain>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="j87NCGGb006488.1126134736/localhost.localdomain"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)
Status: RO
Content-Length: 1767
Lines: 49
This is a MIME-encapsulated message
--j87NCGGb006488.1126134736/localhost.localdomain
The original message was received at Wed, 7 Sep 2005 16:12:16 -0700
from localhost.localdomain [127.0.0.1]
----- The following addresses had permanent fatal errors -----
<recipient@domain.com>
(reason: 553 localhost.localdomain does not exist)
----- Transcript of session follows -----
... while talking to smtp.new-domain.net:
>>> MAIL From:<root@localhost.localdomain> SIZE=388
<<< 553 localhost.localdomain does not exist
501 5.6.0 Data format error
--j87NCGGb006488.1126134736/localhost.localdomain
Content-Type: message/delivery-status
Reporting-MTA: dns; localhost.localdomain
Received-From-MTA: DNS; localhost.localdomain
Arrival-Date: Wed, 7 Sep 2005 16:12:16 -0700
Final-Recipient: RFC822; recipient@domain.com
Action: failed
Status: 5.1.3
Diagnostic-Code: SMTP; 553 localhost.localdomain does not exist
Last-Attempt-Date: Wed, 7 Sep 2005 16:12:16 -0700
--j87NCGGb006488.1126134736/localhost.localdomain
Content-Type: message/rfc822
Return-Path: <root@localhost.localdomain>
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by localhost.localdomain (8.12.11/8.12.11) with ESMTP id j87NCGGb006486
for <recipient@domain.com>; Wed, 7 Sep 2005 16:12:16 -0700
Received: (from root@localhost)
by localhost.localdomain (8.12.11/8.12.11/Submit) id j87NCGoG006485
for recipient@domain.com; Wed, 7 Sep 2005 16:12:16 -0700
Date: Wed, 7 Sep 2005 16:12:16 -0700
From: root <root@localhost.localdomain>
Message-Id: <200509072312.j87NCGoG006485@localhost.localdomain>
To: recipient@domain.com
Subject: the subject
the message body
--j87NCGGb006488.1126134736/localhost.localdomain--
The ----- Transcript of session follows ----- section differs as the ...while talking to address is now the smtp server instead of the receiving mail server. This actually kind of makes sense. But why am I still being identified as root@localhost.localdomain.
Has anyone got a solution that works for this as I am having the very same issue I have done a lot of searching on the net and nothing is comming up. I have looked at the sendmail man pages I came away more confused.
Hello PeterM, I am configuring this authentication in my sendmail (8.14.4) but when running it generates some authentication errors como "Deferred: Temporary AUTH failure
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.