cd /usr/ports/mail/postfix make clean make config >>SASL<< auswählen make install make clean vim /etc/rc.conf postfix_enable="YES" sendmail_enable="NONE" vim /etc/periodic.conf daily_clean_hoststat_enable="NO" daily_status_mail_rejects_enable="NO" daily_status_include_submit_mailq="NO" daily_submit_queuerun="NO" vim /usr/local/etc/postfix/main.cf mynetworks_style = host myorigin = example.com relayhost = [smtp.example.com]:465 sender_canonical_maps = regexp:/usr/local/etc/postfix/sender_canonical smtp_sasl_auth_enable = yes smtp_sasl_mechanism_filter = plain, login smtp_sasl_password_maps = hash:/usr/local/etc/postfix/sasl_passwd #smtp_sasl_security_options = noplaintext, noanonymous smtp_sasl_security_options = noanonymous smtp_tls_security_level = secure smtp_tls_wrappermode = yes touch /usr/local/etc/postfix/sender_canonical chmod 0600 /usr/local/etc/postfix/sender_canonical vim /usr/local/etc/postfix/sender_canonical /^.*$/ noreply@example.com touch /usr/local/etc/postfix/sasl_passwd chmod 0600 /usr/local/etc/postfix/sasl_passwd vim /usr/local/etc/postfix/sasl_passwd [smtp.example.com]:465 username:P@ssw0rd postmap /usr/local/etc/postfix/sender_canonical postmap /usr/local/etc/postfix/sasl_passwd service postfix restart # Mail-Queue anzeigen: mailq postqueue -p # Mails aus der Queue löschen: postsuper -d ALL postsuper -d "${QUEUE_ID}" # Test-Mail abschicken (oneliner): printf "From: sender@example.com\nTo: recipient@example.com\nSubject: Test\n\ntest body" | sendmail -t -i # Test-Mail abschicken: cat << "EOF" | sendmail -t -i From: sender@example.com To: recipient@example.com Subject: Test test body EOF