Postfix-PostfixAdmin-Dovecot:为多个域设置

Postfix-PostfixAdmin-Dovecot:为多个域设置

This is as far as i know a question which is sometimes asked but noone has an answer. (That is how I expirenced it...)

是的,我在 serverfault 上看到过这种问题,但从来没有以这种方式(postfixadmin)

我有 2 个域名(domain1.de 和 domain2.de)和 1 个邮件服务器(mailserver.domain1.de)。两个域名都设置了 SPF、PTR/ReverseDNS、DKIM、DMARC 记录。直到几天前,我只有一个域名(domain1.de),设置成功了。

现在我有了第二个,并且我使用 postfixAdmin 将其添加到 Postfix MTA。我收到以下错误,并决定使用 virtual_alias 发送任何要发送到的邮件[电子邮件保护][电子邮件保护](这样,即使系统目前不太好,我也能收到重要的电子邮件):

6月12日 17:34:06 441335-696 postfix/smtpd[18907]: NOQUEUE: 拒绝: 来自 xxxxxx-xxx.pph-server.de[91.134.xxx.xxx] 的 RCPT: 553 5.7.1 '[电子邮件保护]':发件人地址被拒绝:不属于用户[电子邮件保护]; 来自='[电子邮件保护]‘ 至 = ‘[电子邮件保护]'proto=ESMTP helo='mails.domain1.de'

mails.domain1.de 是 Roundcube

现在再次回到我的设置:

在 /etc/postfix 中:

main.cf
master.cf
mysql-virtual-alias-maps.cf
mysql-vitrual-domains-maps.cf
mysql-vitrual-mailbox-maps.cf
mysql-virtual-alias-domain.cf
mysql-sender-login-maps.cf
...

postconf-n:

alias_database = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
disable_vrfy_command = yes
dovecot_destination_recipient_limit = 1
inet_interfaces = all
local_transport = virtual
mailbox_size_limit = 0
milter_default_action = accept
milter_protocol = 6
mydestination = mailserver.domain1.de, localhost.pph-server.de, localhost, localhost.localdomain
myhostname = mailserver.domain1.de
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
non_smtpd_milters = local:/opendkim/opendkim.sock
policyd-spf_time_limit = 3600
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_cert_file = /etc/letsencrypt/live/***.de/fullchain.pem
smtp_tls_key_file = /etc/letsencrypt/live/***.de/privkey.pem
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_milters = local:/opendkim/opendkim.sock
smtpd_recipient_restrictions = permit_sasl_authenticated permit_mynetworks reject_unauth_destination check_policy_service unix:private/policyd-spf
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = private/auth_dovecot
smtpd_sasl_type = dovecot
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql-sender-login-maps.cf
smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch reject_unknown_sender_domain
smtpd_tls_cert_file = /etc/letsencrypt/live/***.de/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/***.de/privkey.pem
smtpd_tls_loglevel = 3
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
tls_high_cipherlist = EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA
tls_ssl_options = NO_COMPRESSION
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual-alias-maps.cf
virtual_gid_maps = static:6000
virtual_mailbox_base = /var/vmail/
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual-domains-maps.cf
virtual_mailbox_limit = 0
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_minimum_uid = 104
virtual_transport = dovecot
virtual_uid_maps = static:6000

/etc/postfix/mysql-virtual-alias-maps.cf(没有登录数据;D):

query = SELECT goto FROM alias WHERE address='%s' AND active = '1'
#Output = [email protected]

/etc/postfix/mysql-virtual-domains-maps.cf (...):

query = SELECT domain FROM domain WHERE domain='%s' AND active = '1'
#Output = domain2.de

/etc/postfix/mysql-virtual-mailbox-maps.cf (...):

query = SELECT maildir FROM mailbox WHERE username='%s' AND active = '1'
#Output = domain2.de/user/

/etc/postfix/mysql-virtual-alias-domains.cf (...):

query = SELECT alias_domain FROM alias_domain WHERE alias_domain='%s' AND active = '1'
#Output = domain2.de
#Btw. i'm not sure if this query is correct...

/etc/postfix/mysql-sender-login-maps.cf (...):

query = SELECT username AS allowedUser FROM mailbox WHERE username="%s" AND active = 1 UNION SELECT goto FROM alias WHERE address="%s" AND active = 1
#Output = [email protected]

如果你需要更多信息,请直接询问 ;D

提前致谢。

卢克·罗珀

答案1

解决方案:

https://serversupportforum.de/forum/mail/60287-postfix-dovecot-postfixadmin-2-domains-sender-address-reject-not-owned-admin.html

很高兴看到针对 serverfault 的具体问题做出更多努力...

相关内容