Mailversand mit smtp-auth

Debian: apt-get install postfix-tls libsasl-modules-plain sasl-bin libsasl-digestmd5-plain

/etc/postfix/main.cf:

smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/saslpasswd

relayhost = auth.smtp.kundenserver.de
# relayhost = [smtp.1und1.com]

/etc/postfix/saslpasswd:

mailserver                     user:password
auth.smtp.kundenserver.de      m319533-11:geheeim

Danach: postmap /etc/postfix/saslpasswd und /etc/init.d/postfix reload

Wem das zu kurz war, siehe auch: [http://www.tuxhausen.de/postfix_smtp_auth.html Tuxhausen Postfix SMTP-Auth]

Mailannahme per smtp-auth und SPAM-Schutz

# sasl (password authentication)
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
# noplaintext <- does not work with outlook 2000
smtpd_sasl_local_domain = mysasldomain

#only for broken clients like outlook express 4 and exchange
##broken_sasl_auth_clients = yes

disable_vrfy_command = yes
smtpd_helo_required = yes

# from unknown, accept only mail for us (or relay_domains)
# from sals authenticated users, accept all
smtpd_recipient_restrictions =
 permit_mynetworks
 permit_sasl_authenticated
 check_relay_domains
 reject

# spam-protection, but may also harm some misconfigured mail servers
#smtpd_helo_restrictions =
# permit_mynetworks
# reject_invalid_hostname
# reject_non_fqdn_hostname
# reject_unknown_hostname
# permit

# spam-protection
#smtpd_client_restrictions =
# permit_mynetworks
# warn_if_reject reject_map_rbl
 
# spam-protection
#smtpd_sender_restrictions =
# permit_mynetworks
# reject_non_fqdn_sender
# reject_unknown_sender_domain
# permit

#smtpd_etrn_restrictions =
# reject

Mailpasswort für Mailuser ändern:

# Aufruf: mailpasswd username
saslpasswd -c -u mysasldomain -a smtp $1