I have a postfix setup where I'm using both alias_maps and virtual_alias_maps. alias_maps is used to route any internally-generated mails to my personal email address, while everything else is handled by Dovecot.

I had a working setup where /etc/aliases contained:

mailer-daemon: postmaster
webmaster:     postmaster
bounces:       postmaster
root:          postmaster
postmaster: m...@foo.com

I then changed something while experimenting, but I'm afraid that I have no idea what. Internally-generated mails to the aliases no longer worked, and were bounced by Dovecot, which was being asked to deliver to the non-existent 'postmaster' user:

Dec  1 20:24:26 mail postfix/qmgr[31988]: 17E9847149: from=<sysad...@example.com>, size=1180, nrcpt=1 (queue active) Dec  1 20:24:26 mail postfix/local[33132]: 048D44A910: to=<webmas...@mail.example.com>, relay=local, delay=0.1, delays=0.09/0.01/0/0.01, dsn=2.0.0, status=sent (forwarded as 17E9847149)
Dec  1 20:24:26 mail postfix/qmgr[31988]: 048D44A910: removed
Dec  1 20:24:26 mail postfix/pipe[33133]: 17E9847149: to=<postmas...@example.com>, orig_to=<webmas...@mail.example.com>, relay=dovecot, delay=0.05, delays=0/0.01/0/0.04, dsn=5.1.1, status=bounced (user unknown) Dec  1 20:24:26 mail postfix/cleanup[33130]: 24B594AAC5: message-id=<20241201202426.24b594a...@mail.example.com> Dec  1 20:24:26 mail postfix/bounce[33136]: 17E9847149: sender non-delivery notification: 24B594AAC5

I've now changed /etc/aliases to:

mailer-daemon: m...@foo.com
webmaster: m...@foo.com
bounces: m...@foo.com
root: m...@foo.com
postmaster: m...@foo.com

...and everything works again:

Dec  1 21:12:02 mail postfix/qmgr[31988]: C1A9747149: from=<sysad...@example.com>, size=1180, nrcpt=1 (queue active) Dec  1 21:12:02 mail postfix/local[71307]: B183C4AAC5: to=<webmas...@mail.example.com>, relay=local, delay=0.08, delays=0.07/0.01/0/0, dsn=2.0.0, status=sent (forwarded as C1A9747149)
Dec  1 21:12:02 mail postfix/qmgr[31988]: B183C4AAC5: removed
Dec  1 21:12:03 mail postfix/smtp[71308]: C1A9747149: to=<m...@foo.com>, orig_to=<webmas...@mail.example.com>, relay=titan.bar.net[77.68.16.94]:25, delay=0.56, delays=0/0.01/0.18/0.37, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 29BDF8026B)
Dec  1 21:12:03 mail postfix/qmgr[31988]: C1A9747149: removed

Question: does anyone have any idea what I could have changed to turn off recursive processing of /etc/aliases? Re-reading ALIASES(5) makes me think that the file was never meant to be recursively processed, but this has always worked for me, for both sendmail and postfix.

Thanks - postconf output below.

------------------------------------------------------------------------

# postconf -n

2bounce_notice_recipient = bounces
alias_maps = hash:/etc/aliases
anvil_rate_time_unit = 60s
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
disable_vrfy_command = yes
dovecot_destination_recipient_limit = 1
inet_interfaces = all
mailbox_size_limit = 0
milter_default_action = tempfail
milter_protocol = 6
mydestination = $myhostname, localhost.$mydomain
mydomain = example.com
myhostname = mail.example.com
mynetworks = 127.0.0.0/8
myorigin = $mydomain
non_smtpd_milters = inet:localhost:8891
notify_classes = resource, software, 2bounce
policy-spf_time_limit = 3600s
propagate_unmatched_extensions = canonical
rbl_reply_maps = hash:/etc/postfix/dnsbl-reply-map
readme_directory = no
recipient_delimiter = +
smtp_tls_security_level = may
smtpd_banner = $myhostname ESMTP
smtpd_client_connection_count_limit = 5
smtpd_client_connection_rate_limit = 5
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unknown_client_hostname, reject_unauth_pipelining
smtpd_delay_reject = yes
smtpd_error_sleep_time = 5s
smtpd_hard_error_limit = 3
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, reject_non_fqdn_hostname, reject_invalid_helo_hostname, reject_unknown_helo_hostname smtpd_milters = inet:localhost:7950,inet:localhost:8891,local:opendmarc/opendmarc.sock
smtpd_recipient_limit = 250
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unauth_destination, reject_unauth_pipelining, reject_rhsbl_sender key.dbl.dq.spamhaus.net=127.0.1.[2..99], reject_rhsbl_helo key.dbl.dq.spamhaus.net=127.0.1.[2..99], reject_rhsbl_reverse_client key.dbl.dq.spamhaus.net=127.0.1.[2..99], reject_rhsbl_sender key.zrd.dq.spamhaus.net=127.0.2.[2..24], reject_rhsbl_helo key.zrd.dq.spamhaus.net=127.0.2.[2..24], reject_rhsbl_reverse_client key.zrd.dq.spamhaus.net=127.0.2.[2..24], reject_rbl_client key.zen.dq.spamhaus.net=127.0.0.[2..255], check_policy_service unix:private/policy-spf, check_policy_service inet:localhost:7952
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated
smtpd_sasl_auth_enable = no
smtpd_sasl_local_domain = $mydomain
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = permit_mynetworks, reject_non_fqdn_sender, reject_unknown_sender_domain
smtpd_soft_error_limit = 2
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /var/data/etc/apache2/md/domains/example.com/pubcert.pem smtpd_tls_key_file = /var/data/etc/apache2/md/domains/example.com/privkey.pem
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
virtual_alias_maps = texthash:/etc/postfix/valias1, hash:/var/data/etc/postfix/valias2
virtual_gid_maps = static:5000
virtual_mailbox_base = /data/var/mail/vhosts
virtual_mailbox_domains = /etc/postfix/virtual_domains
virtual_mailbox_maps = texthash:/etc/postfix/vmailbox1, hash:/var/data/etc/postfix/vmailbox2
virtual_minimum_uid = 100
virtual_transport = dovecot
virtual_uid_maps = static:5000



_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to