Hi,

I have a postfix-3.5.6 system on fedora32 that accepts mail for a
domain (example.com) just using $mydestination and
smtpd_recipient_restrictions with check_recipient_access. Now I'd like
to add a catch-all for another domain (vexample.com) using
virtual_alias_domains and having a problem.

I've read the VIRTUAL_README and trying to implement the section
involving the user having an existing account.

Mail is being rejected with Recipient address rejected:

Sep 19 20:40:26 propemail postfix/smtpd[503632]: NOQUEUE: reject: RCPT
from ns3.example.com[107.155.111.2]: 554 5.7.1 <[email protected]>:
Recipient address rejected: Access denied;
from=<[email protected]> to=<[email protected]> proto=ESMTP
helo=<arcade.mydomain.com>

/etc/postfix/virtual:
[email protected]         alex

/etc/postfix/main.cf:
virtual_alias_domains = vexample.com
virtual_alias_maps = hash:/etc/postfix/virtual

I've also experimented with canonical_maps, but I think that would be
in addition to virtual_alias_domains?

canonical_maps = regexp:/etc/postfix/canonical-redirect

/etc/postfix/canonical-redirect
/[email protected]/ alex

What am I doing wrong? I've included my postconf output below.

/etc/postfix/local_recip_map includes lines for each

alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
allow_mail_to_files = alias,forward
always_bcc = mail-archive
body_checks = regexp:/etc/postfix/body_checks.pcre
bounce_queue_lifetime = 1d
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
compatibility_level = 2
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
default_destination_concurrency_limit = 10
disable_mime_input_processing = no
enforce_login = reject_authenticated_sender_login_mismatch,
permit_sasl_authenticated, reject
header_checks = pcre:/etc/postfix/header_checks
home_mailbox = Maildir/
html_directory = no
indexed = ${default_database_type}:${config_directory}/
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
maximal_queue_lifetime = 2d
message_size_limit = 24000000
mydestination = $myhostname, localhost.$mydomain, example.com
mynetworks = 127.0.0.0/8, 107.155.111.2
newaliases_path = /usr/bin/newaliases.postfix
polite_destination_concurrency_limit = 3
polite_destination_rate_delay = 0
polite_destination_recipient_limit = 5
polite_initial_destination_concurrency = 1
queue_directory = /var/spool/postfix
rbl_reply_maps = ${stress?hash:/etc/postfix/rbl_reply_maps}
readme_directory = /usr/share/doc/postfix/README_FILES
relay_domains = $mydestination, example.com
sample_directory = /usr/share/doc/postfix/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_CAfile = /var/www/mail.example.com-443/ssl/DigiCertCA.crt
smtp_tls_exclude_ciphers = 3DES
smtp_tls_loglevel = 1
smtp_tls_note_starttls_offer = yes
smtp_tls_security_level = may
smtpd_client_connection_count_limit = 100
smtpd_recipient_restrictions = hash:/etc/postfix/bad_recipients,
permit_mynetworks, permit_sasl_authenticated,
reject_non_fqdn_recipient, reject_non_fqdn_sender,
reject_unauth_destination reject_unknown_sender_domain,
reject_unknown_recipient_domain, check_client_access
hash:/etc/postfix/client_checks, check_sender_access
hash:/etc/postfix/sender_checks, check_recipient_access
pcre:/etc/postfix/local_recip_map, reject
smtpd_restriction_classes = enforce_login
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous, noplaintext
smtpd_sasl_tls_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_login_maps = hash:/etc/postfix/sender_login_maps
smtpd_sender_restrictions = check_sasl_access ${indexed}sasl-access
smtpd_tls_ask_ccert = yes
smtpd_tls_auth_only = yes
smtpd_tls_cert_file =
/var/www/mail.example.com-443/ssl/mail_example_com-2020.crt
smtpd_tls_key_file = /var/www/mail.example.com-443/ssl/mail.example.com-2020.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_req_ccert = no
smtpd_tls_security_level = may
smtpd_tls_session_cache_database =
btree:/var/lib/postfix/smtpd_tls_session_cache
submission_overrides = no_unknown_recipient_checks, no_header_body_checks
tls_random_source = dev:/dev/urandom
transport_maps = regexp:/etc/postfix/transport_limit
turtle_destination_concurrency_limit = 1
turtle_destination_rate_delay = 4s
turtle_destination_recipient_limit = 2
turtle_initial_destination_concurrency = 1
unknown_local_recipient_reject_code = 550
virtual_alias_domains = vexample.com
virtual_alias_maps = hash:/etc/postfix/virtual

Reply via email to