User Tools

Site Tools


postfix_mta_on_netbsd_6.x

This is an old revision of the document!


Postfix MTA using libsaslc(3) on NetBSD 6.x:

first, verify that postfix(1) knows about libsaslc :

% sudo postconf -A
saslc
  • create (as superuser) the following postfix config files:
/etc/postfix/main.cf
/etc/postfix/main.cf
myhostname = mypc.my.box
mydomain = my.box
mynetworks_style = host
alias_maps = hash:/etc/mail/aliases
# SMTP client settings:
relayhost = [mx.sdf.org]:submission
smtp_generic_maps = hash:/etc/postfix/generic
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noplaintext, noanonymous
smtp_sasl_tls_security_options = noanonymous
## explicitly allow/prohibit certain SSL protocols:
#smtp_tls_mandatory_protocols = !SSLv2, !SSLv3, TLSv1
## use of "may" option allows fallback to cleartext
#smtp_tls_security_level = may
smtp_tls_security_level = encrypt
smtp_sasl_type = saslc
/etc/postfix/generic
/etc/postfix/generic
# applies to msgs to be delivered off-site
me@mypc.my.box  sdf_login@sdf.org
/etc/postfix/sasl_passwd

(for security set ownership to root:wheel, permissions to 600)

/etc/postfix/sasl_passwd
[mx.sdf.org]:submission  sdf_login.sdf.org:smtp_passwd

hash /etc/postfix/{generic,sasl_passwd}, then check and reload configs:

/etc/postfix/{generic,sasl_passwd}
% cd /etc/postfix/
% sudo postmap generic sasl_passwd  # creates generic.db & sasl_passwd.db
% sudo postfix check                # no output unless errors
% sudo /etc/rc.d/postfix reload

test to verify everything is working correctly:

% mailx sdf_login@sdf.org
  Subject: test
  123
  .
  EOT
% sudo tail -n10 /var/log/maillog | grep smtp
  Apr 27 08:53:42 mypc postfix/smtp[13387]: A61631F1FDC: to=<sdf_login@sdf.org>, \
  relay=mx.sdf.org[192.94.73.24]:587, delay=3.9, delays=0.02/0/3.7/0.11, dsn=2.0.0, status=sent \
  (250 2.0.0 s3RFrfvZ010436 Message accepted for delivery)
  

You should now be set up to use SDF's SMTP server. Enjoy!

— $Id: smtpauth.html,v 1.20 2020/01/19 02:03:26 mrguilt Exp $

postfix_mta_on_netbsd_6.x.1615152488.txt.gz · Last modified: 2021/03/07 21:28 by hc9