/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_sas
Tags

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.

Tags
/^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/      REJECT Sorry, Chinese mail not allowed here
/^From:.*\@.*\.kr/      REJECT Sorry, Korean mail not allowed here
/^From:.*\@.*\.tr/      REJECT Sorry, Turkish mail not allowed here
/^From:.*\@.*\.ru/      REJECT Sorry, Russian mail not allowed here
/^From:.*\@.*\.ro/    
Tags
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
home_mailbox = Maildir/
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_rec
Tags
smtp      inet  n       -       y       -       -       smtpd 
submission inet n       -       y       -       -       smtpd
 -o syslog_name=postfix/submission
 -o smtpd_tls_security_level=encrypt
 -o smtpd_sasl_auth_enable=yes
# -o content_filter=spamassassin
pickup    unix  n       -       y       60      1       pickup
cleanup   unix  n       -       y       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
tlsmgr    unix  -       -       y       1000?
Tags

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

Tags
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()
  1. usermod -aG sasl postfix
  2. sc-restart postfix.service dovecot.service saslauthd.service
  3. sc-status postfix.service dovecot.service saslauthd.service
Tags

/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  

Tags

/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_outgoing
  1. chmod 600 /etc/postfix/header_cleanup_outgoing