postfix main.cf
compatibility_level = 3.6
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix/sbin
data_directory = /var/lib/postfix
sendmail_path = /usr/sbin/postfix
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
mail_owner = postfix
myhostname = mail.bubuit.net
mydomain = bubuit.net
myorigin = $mydomain
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
setgid_group = postdrop
inet_interfaces = all
inet_protocols = ipv4
unknown_local_recipient_reject_code = 55postfix debug
Warning: Database is older than source file /etc/aliases
newaliases
postfix reload
DNS Standards
According to DNS standards (RFC 2181, Section 10.3), MX records should reference a domain name, not an IP address.
The domain name should then resolve to an IP address via an A or AAAA record.
postfix master.cf
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (no) (never) (100)
# ==========================================================================
smtp inet n - y - - smtpd
submission inet n - y - - smtpd
-o syslog_name=postfix/submission
-o smtpd_tls_security_level=encrypt
-o content_filter=spamassassin
spamassassin unix - n n - - pipe user=debian-spamd argvpostfix files
/etc/postfix/virtual_domains
orangeicebear.at ;
3dcolorprint.at ;/etc/aliases
mailer-daemon: postmaster
postmaster: root
nobody: root
hostmaster: root
usenet: root
news: root
webmaster: root
www: root
ftp: root
abuse: root
noc: root
security: root
logcheck: root
root: srvlogz/etc/postfix/virtual
header_checks
/^X-Spam-Level: \*{9,}/ REJECT Spam-Level over 10.
/^To: undisclosed-recipients:/ REJECT Please specify who your sending to.
/^To: Undisclosed recipients:/ REJECT Please specify who your sending to.
/^From:.*\@[^ ]*\.(cn|ru|kr|tr|ro|in|br)\b/ REJECT Sorry, your TLD is not allowed here
/^Subject:.*=\?(big5|euc-kr|gb2312|ks_c_5601-1987|Windows-1251|Windows-1256|KOI8-R)\?/ REJECT Language not accepted by this server as it is probably spam
/[^[:print:]]{8}/ REJECT Sorry, ascii charapostfix relay host sasl login
/etc/postfix/main.cf
myorigin = /etc/mailname
mydestination = FQDN, localhost.localdomain, localhost
relayhost = mail.bubuit.net:587
mynetworks = 127.0.0.0/8 192.168.0.0/24 [::1]/128 [fe80::]/64
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
# SASL auth
# smtp_use_tls = yes
# support for parameter "smtp_use_tls" will be removed; instead, specify "smtp_tls_security_level"
smtp_tls_security_level = may
smtp_sasl_auth_enable = yes
smtp_saspostfix tools
postcat
-b Show body content.
-h Show message header content.
-q Search the Postfix queue for the named files instead of taking the names literally.
postsuper
-d MSGID
-d ALL
flush
postqueue
-f
/etc/default/saslauthd
START=yes
DESC="SASL Authentication Daemoni 4postfix"
NAME="saslauthd"
MECHANISMS="pam"
MECH_OPTIONS=""
THREADS=5
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd" # postfix/smtp in chroot()- usermod -aG sasl postfix
- sc-restart postfix.service dovecot.service saslauthd.service
- sc-status postfix.service dovecot.service saslauthd.service
E-Mail IP-Stripping aus Datenschutzgründen
/etc/postfix/header_cleanup_outgoing
/^\s*(Received: from)[^\n]*(.*)/ REPLACE $1 127.0.0.1 (localhost [127.0.0.1])$2
/^\s*User-Agent/ IGNORE
/^\s*X-Enigmail/ IGNORE
/^\s*X-Mailer/ IGNORE
/^\s*X-Originating-IP/ IGNORE
/^\s*Mime-Version/ IGNORE/etc/postfix/main.cf
smtp_header_checks = pcre:/etc/postfix/header_cleanup_outgoingchmod 600 /etc/postfix/header_cleanup_outgoing