postfix

# main.cf

home_mailbox = Maildir/

smtpd_tls_cert_file=/etc/ssl/certs/smtpd.pem
smtpd_tls_key_file=/etc/ssl/private/smtpd.key
smtpd_tls_CAfile = /etc/ssl/certs/appelis-cacert.pem

# generic map
smtp_generic_maps = hash:/etc/postfix/generic

# sender canonical map
sender_canonical_maps = hash:/etc/postfix/sender_canonical

# sender dependent sasl authentication
smtp_sender_dependent_authentication = yes
sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost_map

# smtp authentication settings
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_use_tls = yes
#smtp_tls_security_level = encrypt


#/etc/postfix/generic
tommy@nangijala tommy.m.svensson@telia.com

#/etc/postfix/sasl_passwd
tommy.m.svensson@telia.com USR:PWD

#/etc/postfix/relayhost_map
tommy.m.svensson@telia.com [localhost]:465

#/etc/postfix/sender_canonical
tommy tommy.m.svensson@telia.com

postmap generic relayhost_map sender_canonical sasl_passwd
postfix reload


apt-get install stunnel

#/etc/default/stunnel
ENABLED=1

#/etc/stunnel/stunnel.conf
[smtp-tls-wrapper]
accept = 11125
client = yes
connect = mailout.telia.com:465

#/etc/hosts.allow
smtp-tls-wrapper: 127.0.0.1

#/etc/postfix/main.cf
relayhost = [127.0.0.1]:11125

#/etc/postfix/sasl_passwd
[127.0.0.1]:11125 user@example.com:password

service stunnel4 restart


http://www.krizna.com/ubuntu/setup-mail-server-ubuntu-14-04/

Lämna ett svar

E-postadressen publiceras inte. Obligatoriska fält är märkta *