Sendmail: SMTP auth and smart host?

Björn Heidotting b.heidotting at web.de
Mon Jun 29 06:50:36 UTC 2015


Do you have support for SMTP-AUTH compiled into sendmail?

Check with: sendmail -d0.1 -bv postmaster | grep -i sasl

I also have the following in my .mc file:

FEATURE(`authinfo', `hash /etc/mail/auth/client-info')dnl

Regards,
Björn Heidotting

On Sun, 28. Jun 20:36, Christian Weisgerber wrote:
> I'm trying to add a very standard piece of configuration to my sendmail
> setup: Send all mail to a smart host and use SMTP client authentication
> for talking to the smart host.
> 
> There are many examples, howtos, tutorials, etc. about this all over the
> net, e.g.
> https://www.dnsexit.com/support/mailrelay/sendmail.html
> 
> Define the smart host, set the authentication information in the
> access database, and sendmail will automagically use it for SMTP
> AUTH.
> 
> Alas, the magic doesn't happen:
> 
> ------------------------------------------------------------------------
> naddy at unix-ag.uni-kl.de... Connecting to [127.0.0.1] via relay...
> 220 lorvorc.mips.inka.de ESMTP Sendmail 8.14.9/8.14.9; Sun, 28 Jun 2015 22:01:07 +0200 (CEST)
> >>> EHLO lorvorc.mips.inka.de
> 250-lorvorc.mips.inka.de Hello localhost [127.0.0.1], pleased to meet you
> 250-ENHANCEDSTATUSCODES
> 250-PIPELINING
> 250-EXPN
> 250-VERB
> 250-8BITMIME
> 250-SIZE
> 250-DSN
> 250-ETRN
> 250-DELIVERBY
> 250 HELP
> >>> VERB
> 250 2.0.0 Verbose mode
> >>> MAIL From:<naddy at lorvorc.mips.inka.de> SIZE=27
> 250 2.1.0 <naddy at lorvorc.mips.inka.de>... Sender ok
> >>> RCPT To:<naddy at unix-ag.uni-kl.de>
> >>> DATA
> 250 2.1.5 <naddy at unix-ag.uni-kl.de>... Recipient ok
> 354 Enter mail, end with "." on a line by itself
> >>> .
> 050 <naddy at unix-ag.uni-kl.de>... Connecting to mail.inka.de. via relay...
> 050 220 mail.inka.de ESMTP Exim - mail ready at Sun, 28 Jun 2015 22:01:07 +0200
> 050 >>> EHLO lorvorc.mips.inka.de
> 050 250-mail.inka.de Hello dslb-188-104-157-230.188.104.pools.vodafone-ip.de [188.104.157.230]
> 050 250-SIZE 67108864
> 050 250-8BITMIME
> 050 250-PIPELINING
> 050 250-STARTTLS
> 050 250 HELP
> 050 >>> STARTTLS
> 050 220 TLS go ahead
> 050 >>> EHLO lorvorc.mips.inka.de
> 050 250-mail.inka.de Hello dslb-188-104-157-230.188.104.pools.vodafone-ip.de [188.104.157.230]
> 050 250-SIZE 67108864
> 050 250-8BITMIME
> 050 250-PIPELINING
> 050 250-AUTH PLAIN LOGIN
> 050 250 HELP
> 050 >>> MAIL From:<naddy at mips.inka.de> SIZE=382
> 050 250 OK
> 050 >>> RCPT To:<naddy at unix-ag.uni-kl.de>
> 050 >>> DATA
> 050 550 relay not permitted
> 050 503-All RCPT commands were rejected with this error:
> 050 503-relay not permitted
> 050 503 Valid RCPT command must precede DATA
> 050 >>> RSET
> 050 250 Reset OK
> 050 <naddy at lorvorc.mips.inka.de>... Connecting to local...
> 050 <naddy at lorvorc.mips.inka.de>... Sent
> 250 2.0.0 t5SK17H8027901 Message accepted for delivery
> naddy at unix-ag.uni-kl.de... Sent (t5SK17H8027901 Message accepted for delivery)
> Closing connection to [127.0.0.1]
> >>> QUIT
> 221 2.0.0 lorvorc.mips.inka.de closing connection
> ------------------------------------------------------------------------
> 
> As the -v output shows, sendmail simply never attempts to use client
> authentication.  _Something_ must be wrong or missing, but I don't
> see it.
> 
> sendmail.mc:
> ------------------------------------------------------------------------
> OSTYPE(freebsd6)
> MASQUERADE_AS(`mips.inka.de')
> FEATURE(accept_unresolvable_domains)
> FEATURE(access_db)
> FEATURE(allmasquerade)
> FEATURE(masquerade_envelope)
> FEATURE(local_procmail)
> FEATURE(use_cw_file)
> define(`ALIAS_FILE', `/etc/mail/aliases,-o /etc/mail/aliases.newsgate')
> define(`LUSER_RELAY', `local:dev-null')
> define(`SMART_HOST', `[mail.inka.de]')
> define(`UUCP_MAILER_MAX', 0)
> DAEMON_OPTIONS(`Name=IPv4, Family=inet')
> DAEMON_OPTIONS(`Name=IPv6, Family=inet6')
> MAILER(local)
> MAILER(smtp)
> MAILER(../../../../local/share/sendmail/bsmtp)
> MAILER(uucp)
> ------------------------------------------------------------------------
> 
> access database:
> ------------------------------------------------------------------------
> AuthInfo:mail.inka.de "U:xxxx" "I:xxxx" "P:yyyy" "M:PLAIN"
> ------------------------------------------------------------------------
> 
> 
> (Meanwhile I'm sending this by UUCP... because it works.)
> -- 
> Christian "naddy" Weisgerber                          naddy at mips.inka.de
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"


More information about the freebsd-questions mailing list