Hi
I noticed that in my postfix configuration there is a problem with ${original_recipient} is not set or it is overwritten by ${recipient}
My master.cf is below. The problem is that in the autoresponder -r ${original_recipient} is equal to ${recipient}.
Because of that, if user address belongs to a group (aliases) then if sender sends message to this group then the autoresponder responds from uses address. I want autoresponder only replay if the mail was sent directly to the user (not throught alias).
I’d like to know the ${original_recipient} to check if the mail was sent directly to user or to alias group.
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd
# -o smtp_send_xforward_command=yes
amavis unix - - n - 4 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
-o max_use=20
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks,no_address_mappings
# -o receive_override_options=no_address_mappings
#smtp inet n - n - 1 postscreen
#smtpd pass - - n - - smtpd
#dnsblog unix - - n - 0 dnsblog
#tlsproxy unix - - n - 0 tlsproxy
#submission inet n - n - - smtpd
# -o smtpd_tls_security_level=encrypt
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_tls_auth_only=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o smtpd_sasl_security_options=noanonymous
# -o smtpd_sasl_tls_security_options=noanonymous
## -o milter_macro_daemon_name=ORIGINATING
smtps inet n - n - - smtpd
#-o content_filter=autoresponder:dummy #włączenie tego spowoduje dublowanie wszystkich maili
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_tls_auth_only=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o smtpd_sasl_security_options=noanonymous
-o smtpd_sasl_tls_security_options=noanonymous
-o milter_macro_daemon_name=ORIGINATING
-o receive_override_options=no_address_mappings
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
-o content_filter=
-o receive_override_options=no_header_body_checks
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr unix - - n 300 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - n - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - n - - smtp
-o smtp_fallback_relay=
# -o smtp_helo_timeout=5
# -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
retry unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
localhost:10025 inet n - n - - smtpd
-o content_filter=autoresponder:dummy
-o smtpd_delay_reject=no
-o smtpd_client_restrictions=permit_mynetworks,reject
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o smtpd_data_restrictions=reject_unauth_pipelining
-o smtpd_end_of_data_restrictions=
-o smtpd_restriction_classes=
-o mynetworks=127.0.0.0/8
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o smtpd_client_connection_count_limit=0
-o smtpd_client_connection_rate_limit=0
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks,no_address_mappings
-o local_recipient_maps=
-o relay_recipient_maps=
# -o local_header_rewrite_clients=
scache unix - - n - 1 scache
#
autoresponder unix - n n - - pipe
flags=OFq user=autoresponse argv=/usr/local/sbin/autoresponse -s ${sender} -r ${original_recipient} -o ${mailbox} -S ${sasl_username} -C ${client_address}