Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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 hoping someone here can help, as I've been beating my head on the wall for a week now with little advancement.
I've found a number of tutorials on setting this up, however none of them have gotten me 100% of the way there.
Here's my situation: home-based Fedora server (Core 8), running sendmail 8.14.2-1. Connecting to hosting company's smtp server over port 587, to bypass Verizon's blocking of port 25.
My /etc/mail/sendmail.mc file looks like this (comment lines removed):
I can successfully send a mail manually, as shown here:
Quote:
[root@rnd auth]# telnet smtp2.datarealm.com 587
Trying 65.23.128.130...
Connected to smtp2.datarealm.com.
Escape character is '^]'.
220 smtp2.datarealm.com ESMTP Postfix
EHLO my_personal_domain.com
250-smtp2.datarealm.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
auth login
334 VXNlcm5hbWU6
user_in_base64
334 UGFzc3dvcmQ6
my_password_in_base64
235 2.7.0 Authentication successful
MAIL FROM: root@my_personal_domain.com
RCPT TO: my_email@hosting.provider.com
data
test message, very manually sent.
.
quit
250 2.1.0 Ok
250 2.1.5 Ok
354 End data with <CR><LF>.<CR><LF>
250 2.0.0 Ok: queued as 72383114BD00
221 2.0.0 Bye
Connection closed by foreign host.
But when I try to send a mail message from my server, it fails and sends back this bounce message:
Quote:
From MAILER-DAEMON@my_personal_domain.com Thu Dec 2 09:18:43 2010
Return-Path: <MAILER-DAEMON@my_personal_domain.com>
Received: from localhost (localhost)
by localhost.localdomain (8.14.2/8.14.2) id oB2EIg1k019691;
Thu, 2 Dec 2010 09:18:42 -0500
Date: Thu, 2 Dec 2010 09:18:42 -0500
From: Mail Delivery Subsystem <MAILER-DAEMON@my_personal_domain.com>
Message-Id: <201012021418.oB2EIg1k019691@localhost.localdomain>
To: <root@localhost.localdomain>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="oB2EIg1k019691.1291299522/localhost.localdomain"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)
Status: RO
This is a MIME-encapsulated message
--oB2EIg1k019691.1291299522/localhost.localdomain
The original message was received at Thu, 2 Dec 2010 09:18:40 -0500
from rnd [127.0.0.1]
----- The following addresses had permanent fatal errors -----
<my_email@hosting.provider.com>
(reason: 554 5.7.1 <my_email@hosting.provider.com>: Relay access denied)
----- Transcript of session follows -----
... while talking to smtp2.datarealm.com.:
>>> DATA
<<< 554 5.7.1 <my_email@hosting.provider.com>: Relay access denied
554 5.0.0 Service unavailable
<<< 554 5.5.1 Error: no valid recipients
Return-Path: <root@localhost.localdomain>
Received: from localhost.localdomain (rnd [127.0.0.1])
by localhost.localdomain (8.14.2/8.14.2) with ESMTP id oB2EIb1k019688
for <my_email@hosting.provider.com>; Thu, 2 Dec 2010 09:18:40 -0500
Received: (from root@localhost)
by localhost.localdomain (8.14.2/8.14.2/Submit) id oB2EIbex019687
for my_email@hosting.provider.com; Thu, 2 Dec 2010 09:18:37 -0500
Date: Thu, 2 Dec 2010 09:18:37 -0500
From: root <root@localhost.localdomain>
Message-Id: <201012021418.oB2EIbex019687@localhost.localdomain>
To: my_email@hosting.provider.com
Subject: testing
I was able to find it, but strangely the URL itself didn't work...it would redirect to some other unrelated post, but I used some of the words from the URL in a search and found the post you were talking about.
Everything mentioned in that post, and the external article referenced, I have done, and it still fails.
Here is the relevant lines from /var/log/maillog from my most recent attempt:
You miss LOGIN from the mechanisms:
but you use it in
Try to use "M:PLAIN" and see if it works.
I added LOGIN to the mechanisms and recreated sendmail.cf, that should have fixed it also, right? I'm loathe to use PLAIN since that is completely in the clear (not that LOGIN is that much better with just base64 encoding)
I'm loathe to use PLAIN since that is completely in the clear (not that LOGIN is that much better with just base64 encoding)
I've reread sendmail documentation and if you want to use base-64 encoded username/password in /etc/mail/authinfo, you have to replace ":" with "=", like this:
I've reread sendmail documentation and if you want to use base-64 encoded username/password in /etc/mail/authinfo, you have to replace ":" with "=", like this:
Ok, I verified the sendmail.mc lines were as I posted (I had done cut-and-pastes, so was pretty sure).
I removed port from the first line, and the line that had just the port, tested that and it failed. I then removed the U: from the remaining line, and that also failed. I then, on a guess, tried to have both versions of the line...with the FQDN of the host, but with and without the port. That also failed.
Here is the current /etc/mail/auth/client-info file:
Here is the last bounced email showing the failure:
Quote:
From MAILER-DAEMON@trg.homeip.net Mon Dec 6 15:11:51 2010
Date: Mon, 6 Dec 2010 15:11:51 -0500
From: Mail Delivery Subsystem <MAILER-DAEMON@trg.homeip.net>
To: <root@localhost.localdomain>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="oB6KBpBT032554.1291666311/localhost.localdomain"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)
This is a MIME-encapsulated message
--oB6KBpBT032554.1291666311/localhost.localdomain
The original message was received at Mon, 6 Dec 2010 15:11:50 -0500
from rnd [127.0.0.1]
----- The following addresses had permanent fatal errors -----
<rickg@datarealm.com>
(reason: 554 5.7.1 <rickg@datarealm.com>: Relay access denied)
----- Transcript of session follows -----
... while talking to smtp2.datarealm.com.:
>>> DATA
<<< 554 5.7.1 <rickg@datarealm.com>: Relay access denied
554 5.0.0 Service unavailable
<<< 554 5.5.1 Error: no valid recipients
Return-Path: <root@localhost.localdomain>
Received: from localhost.localdomain (rnd [127.0.0.1])
by localhost.localdomain (8.14.2/8.14.2) with ESMTP id oB6KBnBT032552
for <rickg@datarealm.com>; Mon, 6 Dec 2010 15:11:50 -0500
Received: (from root@localhost)
by localhost.localdomain (8.14.2/8.14.2/Submit) id oB6KBnRA032551
for rickg@datarealm.com; Mon, 6 Dec 2010 15:11:49 -0500
Date: Mon, 6 Dec 2010 15:11:49 -0500
From: root <root@localhost.localdomain>
Message-Id: <201012062011.oB6KBnRA032551@localhost.localdomain>
To: rickg@datarealm.com
Subject: testing
I'm just curious because I've just tested this setup and it works
Til now I was using out corporate mail server (on port 25) as a smarthost for sendmail running on my box at home.
So I've changed the relay port in sendmail.mc to 587 and it also worked, when I removed the port from authinfo. I've used tcpdump and saw that sendmail was contacting the smarthost on port 587 in both cases (with or without the port), but in the former case I was getting a DSN with a "No AUTH command command has been given" error.
Maybe your smarthost does not like the from: address, so change it to something other than root@localhost.local domain and test.
I don't know what else to think
I'm just curious because I've just tested this setup and it works
Maybe your smarthost does not like the from: address, so change it to something other than root@localhost.local domain and test.
I don't know what else to think
I've been sending test emails just by using the command:
Code:
mail -s rickg@myprovider.com
How would I set the from? I though the MASQUERADE options were supposed to do that?
mail -s "Subject" -r someuser@somedomain.com rickg@myprovider.com
Apparently masquerade does not work (default for root)
I had to do it this way:
Code:
mail -s"subject" <to:email> -- -f<from:email>
Still failed, no difference in the message.
I've tried running sendmail in a higher level of debugging messages, but I was not able to determine from the output if it was correctly doing authentication or not, do you have any recommendations on that, maybe better diagnostic messages would help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.