gpt4 book ai didi

linux - 具有两个域的配置 Postfix

转载 作者:太空宇宙 更新时间:2023-11-04 04:49:13 24 4
gpt4 key购买 nike

我想接收 admin@xxx.pl 和 admin@yyy.pl 发送的电子邮件我尝试这样做,但它显示警告:

root@debian2008:/home/wojtek# postalias hash:/etc/postfix/virtual
postalias: warning: /etc/postfix/virtual, line 1: name must be local
postalias: warning: /etc/postfix/virtual, line 2: name must be local

这是我的文件/etc/postfix/virtual:

admin@xxx.pl :    root
admin@yyy.pl : root

和/etc/postfix/main.cf:

myorigin = /etc/mailname


smtpd_banner = $myhostname ESMTP
biff = no


append_dot_mydomain = no
readme_directory = /usr/share/doc/postfix
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

virtual_alias_domains = xxx.pl,yyy.pl
virtual_alias_maps = hash:/etc/postfix/virtual



mail_owner = postfix
myhostname = debian2008
mydomain = yyy.pl
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = localhost, debian2008, xxx.pl, yyy.pl
relayhost =
mynetworks = 127.0.0.0/8


mailbox_command =
mailbox_size_limit = 50000000
recipient_delimiter =
inet_interfaces = all
html_directory = /usr/share/doc/postfix/html
inet_protocols = all
home_mailbox = Maildir/
mail_spool_directory = /home/

admin@yyy.pl 有效,但 admin@xxx.pl 无效。我怎样才能做到这一点?警告有什么问题?

P.s 抱歉英语不好,但我是波兰人

最佳答案

您需要使用 postmap 创建别名映射,而不是 postalias,然后您的 virtual 不应使用冒号作为分隔符:

admin@xxx.pl        root
admin@yyy.pl root

除此之外,它应该可以工作。

关于linux - 具有两个域的配置 Postfix,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13324610/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com