Хочу создать псевдоним postmaster для виртуального домена (example.ua), почта для несуществующего виртуального пользователя postmaster@example.ua приходила в ящик существующего виртуального пользователя user@example.ua
Некоторые строки из postconf
alias_maps = hash:/etc/aliases
compatibility_level = 2
local_recipient_maps = $alias_maps
mydestination = localhost.$mydomain, localhost
mydomain = $myhostname
relay_domains = $mydestination, hash:/etc/postfix/relay
setgid_group = maildrop
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_sasl_authenticated, reject_unknown_hostname
smtpd_recipient_restrictions = permit_sasl_authenticated, reject_unauth_destination, reject_unknown_client, reject_invalid_hostname, reject_non_fqdn_hostname, reject_unknown_hostname, reject_non_fqdn_sender, reject_unknown_sender_domain, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unverified_recipient
smtpd_relay_restrictions = permit_sasl_authenticated, reject_unauth_destination, reject_unknown_client, reject_invalid_hostname, reject_non_fqdn_hostname, reject_unknown_hostname, reject_non_fqdn_sender, reject_unknown_sender_domain, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unverified_recipient
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = permit_sasl_authenticated, reject_unauth_destination, reject_unknown_client, reject_invalid_hostname, reject_non_fqdn_hostname, reject_unknown_hostname, reject_non_fqdn_sender, reject_unknown_sender_domain, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unverified_recipient
strict_rfc821_envelopes = yes
virtual_alias_domains = $myhostname
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_gid_maps = static:303
virtual_mailbox_base = /srv/vmail
virtual_mailbox_domains = $myhostname, subdom.$myhostname
virtual_mailbox_lock = fcntl
virtual_minimum_uid = 303
virtual_transport = lmtp:unix:private/dovecot-lmtp
virtual_uid_maps = static:303
/etc/postfix/virtual
postmaster@example.ua user@example.ua
sudo postmap /etc/postfix/virtual
Но при отправке почты на postmaster@example.ua
postfix отвергает её с сообщением, что такой пользователь не существует.
NOQUEUE: reject: RCPT from forward7m.cmail.yandex.net[5.255.216.200]: 450 4.1.1 <postmaster@example.ua>: Recipient address rejected: unverified address: host example.ua[private/dovecot-lmtp] said: 550 5.1.1 <postmaster@example.ua> User doesn't exist: postmaster@example.ua (in reply to RCPT TO command); from=<user@yandex.ua> to=<postmaster@example.ua> proto=ESMTP helo=<forward7m.cmail.yandex.net>
Можно ли обойтись без создания пользователя и ящика в /etc/dovecot/users
?
postmap hash:/etc/postfix/virtual
вместоpostmap /etc/postfix/virtual
(тип можно не указывать явно только если он совпадает сdefault_database_type
). // а потом тем же postmap-ом проверьте: postfix.org/VIRTUAL_README.html#local_vs_database – aleksandr barakin 23 дек '16 в 11:58