Postfix server (Debian / Ubuntu) is:
From Internet it delivers email for following domain: faix.cz
From LAN it delivers email for following domain: home.lan
postmap /etc/postfix/configuration_file
every time you change file with ‘hash:‘ prefixservice postfix reload
Postfix installation
apt-get install postfix
postmap /etc/aliases
postmap /etc/postfix/canonical
postmap /etc/postfix/sender_canonical
postmap /etc/postfix/generic
postmap /etc/postfix/virtual
/etc/mailname
faix.cz
/etc/postfix/main.cf
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = yes
biff = no
config_directory = /etc/postfix
inet_interfaces = 192.168.122.1
mailbox_command = /usr/bin/procmail
mailbox_size_limit = 0
mydomain = faix.cz
myhostname = mail.$mydomain
mynetworks = 127.0.0.0/8 192.168.122.0/27
myorigin = /etc/mailname
recipient_delimiter = +
relayhost =
smtpd_banner = $myhostname NO UCE ESMTP
smtpd_delay_reject = no
smtpd_helo_required = yes
canonical_maps = hash:/etc/postfix/canonical
sender_canonical_maps = hash:/etc/postfix/sender_canonical
recipient_canonical_classes = envelope_recipient
recipient_canonical_maps = regexp:/etc/postfix/recipient_canonical
smtp_generic_maps = hash:/etc/postfix/generic
local_header_rewrite_clients = static:all
smtpd_recipient_restrictions =
permit_sasl_authenticated
permit_mynetworks
reject_unknown_sender_domain
reject_unauth_destination
reject_rbl_client cbl.abuseat.org
reject_rbl_client sbl-xbl.spamhaus.org
reject_rbl_client bl.spamcop.net
reject_rhsbl_sender dsn.rfc-ignorant.org
unknown_address_tempfail_action = $reject_tempfail_action
reject_tempfail_action = defer_if_permit
strict_rfc821_envelopes = yes
virtual_maps = hash:/etc/postfix/virtual
mydestination = $myhostname, smtp.$mydomain, mail.$mydomain, home.lan, localhost, localhost.localdomain
/etc/postfix/virtual
faix.cz virtual domain
postmaster@faix.cz faix@gmail.com
admin@faix.cz faix@gmail.com
root@faix.cz faix@gmail.com zada@gmail.com
@faix.cz faix@gmail.com
/etc/aliases
postmaster: admin
webmaster: admin
www-data: admin
abuse: admin
nagios: root
admin: faix@gmail.com
root: faix@gmail.com
/etc/postfix/recipient_canonical
/^root(.*)home[.]lan$/ root@faix.cz
/^root(.*)$/ root@faix.cz
/^pytlicek(.*)$/ faix@gmail.com
/^zada(.*)$/ zada@gmail.com
/etc/postfix/generic
@home.lan @faix.cz