我想用两种收件人设置我的后缀:
- 有些人有一个 UNIX 帐户
- 有些有虚拟邮箱
我有两种适用于每种情况的配置,但两者都没有:
我只使用带有 Postfix 的 Ubuntu 18.10。
这是内容/etc/postfix/main.cf
,适用于场景1,评论适用于场景2(必须切换):
myhostname = server1.FQDN.TLD
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost, server1.FQDN.TLD, $myorigin #1
#2 mydestination = localhost, server1.FQDN.TLD
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command =
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
home_mailbox = Maildir/
virtual_alias_maps = hash:/etc/postfix/aliases #1
#2 virtual_mailbox_domains = FQDN.TLD
virtual_mailbox_base = /var/mail/vhosts
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 100
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
我的/etc/postfix/aliases
:
[email protected] user
[email protected] user
最后/etc/postfix/vmailbox
:
[email protected] FQDN.TLD/theodor/
[email protected] FQDN.TLD/sales/
[email protected] FQDN.TLD/erik/