Re: Using sendmail as outbound MTA, but with SSL

From: <Lena_at_lena.kiev.ua>
Date: Thu, 25 Dec 2025 08:35:33 UTC
> > have to bypass sendmail with a configuration in mutt to send mails to
> > smtp.1blu.de:465

> > My question is, is there a way to configure sendmail to use SSL port 465
> > to the remote mail HUB?

> 4. enable services in file /etc/rc.conf
> 
> 	sendmail_enable="YES"
> 	saslauthd_enable="YES"

I installed sendmail package from pkg.freebsd.org
(`pkg install sendmail`, no recompile).
It installed dependencies cyrus-sasl and cyrus-sasl-saslauthd,
but I don't start saslauthd daemon.
I have also openssl package installed for fetch-mail function of my MUA (mutt),
but I'm not sure whether it's relevant for sendmail and sasl (I guess not).

In /etc/mail/HOSTNAME.mc :

insert:
dnl Matthias begin
define(`confEBINDIR', `/usr/local/libexec')
define(`confTRUSTED_USERS', `matthias')dnl username: the human user running MUA
define(`SMART_HOST', `smtp8:[smtp.1blu.de]')
define(`SMTP8_MAILER_ARGS', `TCP $h 465')
define(`confDH_PARAMETERS', `2')dnl  UPDATING 20150614
dnl Matthias end

comment out:
dnl(Matthias) DAEMON_OPTIONS(`Name=IPv6, Family=inet6, Modifiers=O')

In /etc/mail/access :

AuthInfo:smtp.1blu.de "U:username" "P:password" "M:PLAIN LOGIN"

/etc/mail/mailer.conf :

sendmail        /usr/local/sbin/sendmail
send-mail       /usr/local/sbin/sendmail
mailq           /usr/local/sbin/sendmail
newaliases      /usr/local/sbin/sendmail
hoststat        /usr/local/sbin/sendmail
purgestat       /usr/local/sbin/sendmail

cd /etc/mail
make all install restart

In /etc/rc.conf :

sendmail_enable="NO"   # that still starts two sendmail daemons

I think that's all.