[Pkg-exim4-users] Difficulty getting exim4 to authenticate to smarthost

Tim Johnson tbj002 at gmail.com
Fri Dec 30 20:42:43 UTC 2016


First off, I'm going to apologize in advance.  I'm sure that I'm doing
something wrong, but I've looked at post after post, and feel like
I've tried everything I've seen suggested, and still am stuck with the
same issue.

I'm attempting to get exim4 to send non-local email out through an
smtp smarthost server which happens to require authentication.

I've taken several stabs at configuring my exim4.conf, passwd.client,
and exim4.conf.localmacros files configured appropriately, and each
time, I can see changes reflected in the output when attempting to
send a message with 'exim4 -v -f xxxxx at xxxxxx.com xxxx at xxxx.com'. But
each attempt results in the smarthost telling exim that it needs
authentication, exim (as far as I can tell) fails to send any
authentication information, and the result is a 530 error.

Also, if I attempt to send a message with 'swaks --auth --to
xxxx at xxxx.com --from xxxxx at xxxxxx.com --server
smtpout.secureserver.net'   all works fine.  I can confirm that the
email arrives at its destination successfully.

In my exim4.conf I changed the smarthost because I noticed that
specifying smtpout.secureserver.net resulted in a conversation with
one of no telling how many servers.  I just manually specified one of
those responding servers which seemed to work okay.

Again, I've taken a lot of stabs at this and it would be ridiculous to
to write the details of every attempt. Below is my current
configuration which I'm believing should work - even though it isn't,
and I'm also aware it's likely something I'm doing wrong:

-------------------------------------------------------------
--------exim4.conf (relevant portion)-------------
.............
# debconf-driven macro definitions get inserted after this line
UPEX4CmacrosUPEX4C = 1
##############################################
# the following macro definitions were created
# dynamically by /usr/sbin/update-exim4.conf
.ifndef MAIN_LOCAL_INTERFACES
MAIN_LOCAL_INTERFACES=127.0.0.1
.endif
.ifndef MAIN_PACKAGE_VERSION
MAIN_PACKAGE_VERSION=4.84.2-2+deb8u1
.endif
.ifndef MAIN_LOCAL_DOMAINS
MAIN_LOCAL_DOMAINS=@:localhost:localdomain.com
.endif
.ifndef MAIN_RELAY_TO_DOMAINS
MAIN_RELAY_TO_DOMAINS=empty
.endif
.ifndef ETC_MAILNAME
ETC_MAILNAME=localdomain.com
.endif
.ifndef LOCAL_DELIVERY
LOCAL_DELIVERY=mail_spool
.endif
.ifndef MAIN_RELAY_NETS
MAIN_RELAY_NETS=: 127.0.0.1 : ::::1
.endif
.ifndef DCreadhost
DCreadhost=empty
.endif
.ifndef DCsmarthost
DCsmarthost=p3plsmtpa08-01.prod.phx3.secureserver.net
#DCsmarthost=smtpout.secureserver.net
.endif
.ifndef DC_eximconfig_configtype
DC_eximconfig_configtype=smarthost
.endif
.ifndef DCconfig_smarthost
DCconfig_smarthost=1
.endif
##############################################
..............

--------------------------------------------------------------






---------------------------------------------------------------
-----------------passwd.client--------------------------

# Example:
### target.mail.server.example:login:password
#smtpout.secureserver.net:login_name:login_password
p3plsmtpa08-01.prod.phx3.secureserver.net:login_name:login_password

---------------------------------------------------------------






---------------------------------------------------------------
------------exim4.conf.localmacros-----------------

AUTH_CLIENT_ALLOW_NOTLS_PASSWORDS = true

---------------------------------------------------------------







---------------------------------------------------------------
------output when attempting to send-----------

SERVERNAME:/etc/exim4# exim4 -v -f sender at domain.com receiver at gmail.com
this is a test
LOG: MAIN
 <= sender at domain.com U=root P=local S=339
SERVERNAME:/etc/exim4# delivering 1cMxJ4-000302-OZ
R: smarthost for receiver at gmail.com
T: remote_smtp_smarthost for receiver at gmail.com
Connecting to p3plsmtpa08-01.prod.phx3.secureserver.net
[173.201.193.102]:25 ... connected
 SMTP<< 220 p3plsmtpa08-01.prod.phx3.secureserver.net :SMTPAUTH: ESMTP
 SMTP>> EHLO SERVERNAME
 SMTP<< 250-p3plsmtpa08-01.prod.phx3.secureserver.net hello
[72.16.238.29], secureserver.net
        250-HELP
        250-AUTH LOGIN PLAIN
        250-SIZE 30000000
        250-PIPELINING
        250-8BITMIME
        250 OK
 SMTP>> MAIL FROM:<sender at domain.com> SIZE=1371
 SMTP>> RCPT TO:<receiver at gmail.com>
 SMTP>> DATA
 SMTP<< 530 authentication required
 SMTP<< 503 need MAIL before RCPT
 SMTP<< 503 need MAIL before DATA
 SMTP>> QUIT
LOG: MAIN
 ** receiver at gmail.com R=smarthost T=remote_smtp_smarthost: SMTP error
from remote mail server after MAIL FROM:<sender at domain.com
> SIZE=1371: host p3plsmtpa08-01.prod.phx3.secureserver.net [173.201.193.102]: 530 authentication required
LOG: MAIN
 <= <> R=1cMxJ4-000302-OZ U=Debian-exim P=local S=1394
LOG: MAIN
 Completed
delivering 1cMxJE-000307-0M
R: system_aliases for sender at domain.com
R: userforward for sender at domain.com
R: procmail for sender at domain.com
R: maildrop for sender at domain.com
R: lowuid_aliases for sender at domain.com (UID 1001)
R: local_user for sender at domain.com
LOG: MAIN
 == sender at domain.com R=local_user T=mail_spool defer (2): No such
file or directory: failed to chdir to /home/sender

SERVERNAME:/etc/exim4#

-------------------------------------------------------------------





------------------------------------------------------------------
------------------result of swaks--------------------------


user at SERVERNAME:~$ swaks --auth --to receiver at gmail.com --from
sender at domain.com --server smtpout.secureserver.net
Username: sender at domain.com
Password: password
=== Trying smtpout.secureserver.net:25...
=== Connected to smtpout.secureserver.net.
<-  220 p3plsmtpa06-09.prod.phx3.secureserver.net :SMTPAUTH: ESMTP
-> EHLO SERVERNAME
<-  250-p3plsmtpa06-09.prod.phx3.secureserver.net hello
[72.16.238.29], secureserver.net
<-  250-HELP
<-  250-AUTH LOGIN PLAIN
<-  250-SIZE 30000000
<-  250-PIPELINING
<-  250-8BITMIME
<-  250 OK
-> AUTH LOGIN
<-  334 VXNlcm5hbWU6
-> YmFja3VwcGNAbGFzY29saW5hc3BsYXN0aWNzdXJnZXJ5LmNvbQ==
<-  334 UGFzc3dvcmQ6
-> YmFja3Vw
<-  235 ... authentication succeeded :: MyeFck9onSm92
-> MAIL FROM:<sender at domain.com>
<-  250 <sender at domain.com> sender ok
-> RCPT TO:<reciever at gmail.com>
<-  250 <receiver at gmail.com> recipient ok
-> DATA
<-  354 OK
-> Date: Fri, 30 Dec 2016 08:58:49 -0600
-> To: receiver at gmail.com
-> From: sender at domain.com
-> Subject: test Fri, 30 Dec 2016 08:58:49 -0600
-> X-Mailer: swaks v20130209.0 jetmore.org/john/code/swaks/
->
-> This is a test mailing
->
-> .
<-  250 MyeFck9onSm92 mail accepted for delivery
-> QUIT
<-  221 p3plsmtpa06-09.prod.phx3.secureserver.net :SMTPAUTH: closing connection
=== Connection closed with remote host.
user at SERVERNAME:~$

-----------------------------------------------------------------



More information about the Pkg-exim4-users mailing list