I've been trying to setup sendmail on a laptop running 15.0-RELEASE amd64. I've used the same config that I have been using on previous versions of FreeBSD but it's not working.
The lines that I've added to my `hostname`.mc are
< dnl SMART HOST CONFIG
< define(`SMART_HOST', `{my ISP address}')dnl
< define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
< define(`confAUTH_MECHANISMS', `GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
< FEATURE(`authinfo',`hash /etc/mail/authinfo.db')dnl
< TRUST_AUTH_MECH(`GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
The first thing that I don't understand is that on 14.3 /etc/mail/mailer.conf is the dma version yet 14.3 uses sendmail (mail gets written to /var/spool/mqueue, I see messages referring to sendmail and sm-mta in /var/log/maillog). With the dma mailer.conf on 15.0 the mail gets put in /var/spool/dma and maillog gets messages referring to dma.
It seems to me that 15.0 is doing the right thing. Why is 14.3 not taking mailer.conf into account?
When 15.0 uses dma maillog contains messages like "IP blocked by Abusix" and "can not bounce a bounce message, discarding". Since I've done no configuration for dma I'm surprised that it even manages to connect to my ISP.
If I stop sendmail, switch to the sendmail version of mailer.conf and restart sendmail I get
Warning: Option: AuthMechanisms requires SASL support (-DSASL)
That's not good and I don't get that on 14.3. I've tried both the pkg and built from ports versions of sendmail, same thing. In both cases they definitely are built with SASL.
pkg info sendmail includes
SASL : on
and I could see the option was on when I built the port version.
I can also confirm that with "sendmail -d0.1 < /dev/null"
When I try to send a mail, the mail -v output looks good but (as expected) maillog contains "Authentication Required" messages.
Further confirmation of this. procstat-v shows me that on 14.3 sendmail loads the sasl libs but not on 15.0. I don't know how to trace sendmail and I don't even know exactly what the flow is. My guess here is that there is a library compatibility issue and sendmail is failing to dlopen the sasl libs (missing symbol?) or it's a sasl config issue (SASL_PATH or something?).
So to summarise, 2 questions
1. For my peace of mind, why is 14.3 using sendmail even though /etc/mail/mailer.conf is configured for dma?
2. How can I get sendmail to use SASL correctly?
Second thoughts. I just did some tracing with ktrace.
In 14.3 I see that mail/mailwrapper is using /usr/local/etc/mail/mailer.conf not /etc/mail/mailer.conf. On 15.0 it is /etc/mail/mailer.conf that gets used. That clears up the first mystery.
So to resummarise, just one question
1. How can I get sendmail to use SASL correctly?
The lines that I've added to my `hostname`.mc are
< dnl SMART HOST CONFIG
< define(`SMART_HOST', `{my ISP address}')dnl
< define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
< define(`confAUTH_MECHANISMS', `GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
< FEATURE(`authinfo',`hash /etc/mail/authinfo.db')dnl
< TRUST_AUTH_MECH(`GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
The first thing that I don't understand is that on 14.3 /etc/mail/mailer.conf is the dma version yet 14.3 uses sendmail (mail gets written to /var/spool/mqueue, I see messages referring to sendmail and sm-mta in /var/log/maillog). With the dma mailer.conf on 15.0 the mail gets put in /var/spool/dma and maillog gets messages referring to dma.
It seems to me that 15.0 is doing the right thing. Why is 14.3 not taking mailer.conf into account?
When 15.0 uses dma maillog contains messages like "IP blocked by Abusix" and "can not bounce a bounce message, discarding". Since I've done no configuration for dma I'm surprised that it even manages to connect to my ISP.
If I stop sendmail, switch to the sendmail version of mailer.conf and restart sendmail I get
Warning: Option: AuthMechanisms requires SASL support (-DSASL)
That's not good and I don't get that on 14.3. I've tried both the pkg and built from ports versions of sendmail, same thing. In both cases they definitely are built with SASL.
pkg info sendmail includes
SASL : on
and I could see the option was on when I built the port version.
I can also confirm that with "sendmail -d0.1 < /dev/null"
When I try to send a mail, the mail -v output looks good but (as expected) maillog contains "Authentication Required" messages.
Further confirmation of this. procstat-v shows me that on 14.3 sendmail loads the sasl libs but not on 15.0. I don't know how to trace sendmail and I don't even know exactly what the flow is. My guess here is that there is a library compatibility issue and sendmail is failing to dlopen the sasl libs (missing symbol?) or it's a sasl config issue (SASL_PATH or something?).
So to summarise, 2 questions
1. For my peace of mind, why is 14.3 using sendmail even though /etc/mail/mailer.conf is configured for dma?
2. How can I get sendmail to use SASL correctly?
Second thoughts. I just did some tracing with ktrace.
In 14.3 I see that mail/mailwrapper is using /usr/local/etc/mail/mailer.conf not /etc/mail/mailer.conf. On 15.0 it is /etc/mail/mailer.conf that gets used. That clears up the first mystery.
So to resummarise, just one question
1. How can I get sendmail to use SASL correctly?