Skip to content

Instantly share code, notes, and snippets.

@petrkle
Last active December 13, 2015 22:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petrkle/4983929 to your computer and use it in GitHub Desktop.
Save petrkle/4983929 to your computer and use it in GitHub Desktop.
postfix - starttls
groupadd -g 200 postfix
useradd -u 200 -d /dev/null -s /bin/false -g postfix postfix
groupadd -g 201 postdrop
make makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_TLS -DUSE_CYRUS_SASL -I/usr/include/sasl" AUXLIBS="-L/usr/lib -lsasl2 -lssl -lcrypto"
postconf -e 'disable_mime_input_processing = yes'
postconf -e 'disable_mime_output_conversion = yes'
postconf -e 'relayhost = 127.0.0.1:1234'
postconf -e 'alias_maps = hash:/etc/aliases'
openssl req -new -x509 -days 3650 -nodes -out /etc/postfix/postfix.pem -keyout /etc/postfix/postfix.pem
postconf -e smtpd_tls_cert_file=/etc/postfix/postfix.pem
postconf -e smtpd_tls_key_file=/etc/postfix/postfix.pem
smtpd_use_tls = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_auth_enable = yes
echo foo | sasslpasswd2 -pc robot@zonglovani.info
chgrp postfix /etc/sasldb2
chmod g+r /etc/sasldb2
#/etc/postfix/sasl/smtpd.conf
pwcheck_method:auxprop
mech_list: plain login
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment