Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Jun 2015 08:25:40 +0200
From:      =?iso-8859-1?Q?Bj=F6rn?= Heidotting <b.heidotting@web.de>
To:        naddy@mips.inka.de
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Sendmail: SMTP auth and smart host?
Message-ID:  <20150629062540.GA1359@fbsdvm1.naber.dom>
In-Reply-To: <slrnmp0mna.rg3.naddy@lorvorc.mips.inka.de>
References:  <slrnmp0mna.rg3.naddy@lorvorc.mips.inka.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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=F6rn 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.
>=20
> There are many examples, howtos, tutorials, etc. about this all over the
> net, e.g.
> https://www.dnsexit.com/support/mailrelay/sendmail.html
>=20
> Define the smart host, set the authentication information in the
> access database, and sendmail will automagically use it for SMTP
> AUTH.
>=20
> Alas, the magic doesn't happen:
>=20
> ------------------------------------------------------------------------
> naddy@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 2=
2: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@lorvorc.mips.inka.de> SIZE=3D27
> 250 2.1.0 <naddy@lorvorc.mips.inka.de>... Sender ok
> >>> RCPT To:<naddy@unix-ag.uni-kl.de>
> >>> DATA
> 250 2.1.5 <naddy@unix-ag.uni-kl.de>... Recipient ok
> 354 Enter mail, end with "." on a line by itself
> >>> .
> 050 <naddy@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=
=2Ede [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=
=2Ede [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@mips.inka.de> SIZE=3D382
> 050 250 OK
> 050 >>> RCPT To:<naddy@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@lorvorc.mips.inka.de>... Connecting to local...
> 050 <naddy@lorvorc.mips.inka.de>... Sent
> 250 2.0.0 t5SK17H8027901 Message accepted for delivery
> naddy@unix-ag.uni-kl.de... Sent (t5SK17H8027901 Message accepted for deli=
very)
> Closing connection to [127.0.0.1]
> >>> QUIT
> 221 2.0.0 lorvorc.mips.inka.de closing connection
> ------------------------------------------------------------------------
>=20
> 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.
>=20
> 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=3DIPv4, Family=3Dinet')
> DAEMON_OPTIONS(`Name=3DIPv6, Family=3Dinet6')
> MAILER(local)
> MAILER(smtp)
> MAILER(../../../../local/share/sendmail/bsmtp)
> MAILER(uucp)
> ------------------------------------------------------------------------
>=20
> access database:
> ------------------------------------------------------------------------
> AuthInfo:mail.inka.de "U:xxxx" "I:xxxx" "P:yyyy" "M:PLAIN"
> ------------------------------------------------------------------------
>=20
>=20
> (Meanwhile I'm sending this by UUCP... because it works.)
> --=20
> Christian "naddy" Weisgerber                          naddy@mips.inka.de
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o=
rg"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150629062540.GA1359>