INSTALLING POSTFIX

NETBSD INSTALL

it is built-in. if you want a newer version, Postfix builds on NetBSD as well (see below).

echo $PKG_PATH
pkg_add py37-spf py37-policyd-spf
which policyd-spf

grep ^postfix /etc/defaults/rc.conf

SLACKWARE INSTALL

slackpkg install postfix icu4c s-nail
ldd /usr/sbin/postfix
ls -lF /etc/rc.d/rc.postfix
chmod +x /etc/rc.d/rc.postfix
/etc/rc.d/rc.postfix start

in case you wanna provide authentication

slackpkg install cyrus-sasl

in case you are going to store and process emails

slackpkg install procmail ksh alpine

DEBIAN/UBUNTU INSTALL

export DEBIAN_FRONTEND=noninteractive
apt install postfix postfix-pcre postfix-policyd-spf-python procmail bsd-mailx alpine
# mailutils pmailq rsyslog postfix-policyd-spf-perl
unset DEBIAN_FRONTEND

systemctl status postfix

TROUBLESHOOTING

postfix/master[7421]: warning: process /usr/libexec/postfix/smtpd pid 7565 killed by signal 6
postfix/master[7421]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling

ll /etc/postfix/
chown -R root:wheel /etc/postfix/

ll /usr/libexec/postfix/
chown -R root:wheel /usr/libexec/postfix/

ll /usr/sbin/post*
ll /usr/sbin/sendmail
chown root:wheel /usr/sbin/post*
chown root:wheel /usr/sbin/sendmail
chown root:maildrop /usr/sbin/postqueue
chown root:maildrop /usr/sbin/postdrop
chmod g+s /usr/sbin/postqueue
chmod g+s /usr/sbin/postdrop

ll /usr/bin/newaliases
ll /usr/bin/mailq
chown root:wheel /usr/bin/newaliases
chown root:wheel /usr/bin/mailq

getting this while building with PCRE on slackware

/usr/bin/ld: ../../lib/libutil.a(dict_pcre.o): in function `dict_pcre_close':
/root/tp/postfix-3.5.2/src/util/dict_pcre.c:395: undefined reference to `pcre_free_study'
/usr/bin/ld: /root/tp/postfix-3.5.2/src/util/dict_pcre.c:404: undefined reference to `pcre_free_study'
/usr/bin/ld: ../../lib/libutil.a(dict_pcre.o): in function `dict_pcre_lookup':
/root/tp/postfix-3.5.2/src/util/dict_pcre.c:316: undefined reference to `pcre_exec'
/usr/bin/ld: /root/tp/postfix-3.5.2/src/util/dict_pcre.c:355: undefined reference to `pcre_exec'
...

==> RTFM: http://www.postfix.org/PCRE_README.html

FROM SCRATCH

see postfix.source

RESOURCES

NetBSD mail server with Postfix, BIND (for DNS), Dovecot, Pigeonhole (Sieve), SSL, DKIM and SPF http://silas.net.br/tech/apps/netbsd-mailserver.html

Complete (almost) Mail Server with NetBSD https://www.tumfatig.net/20101226/complete-almost-mail-server-with-netbsd/

Postfix PCRE Support http://www.postfix.org/PCRE_README.html

Postfix SASL Howto http://www.postfix.org/SASL_README.html

SASL https://wiki.dovecot.org/Sasl

Postfix and Dovecot SASL https://wiki.dovecot.org/HowTo/PostfixAndDovecotSASL


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun