sender_dependent_default_transport_maps ignored ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

sender_dependent_default_transport_maps ignored ?

Brice Figureau-13
Hi,

I have a fairly (at least to me) complex mail system based on postfix
2.11.2 where our users entering e-mails are forwarded to amavis to be
DKIM signed then forwarded back to postfix for the final delivery.

Lately, I wanted to have mails sent from `[hidden email]` to
be relayed by our ESP, so I added the following
sender_dependent_default_transport_maps:

/etc/postfix/sender_transport_maps:
asmodee.net sendgrid:[smtp.sendgrid.net]:587
* DUNNO

Unfortunately this is not applied.

Here are the important bits of my config:
master.cf:
...
# incoming from Amavis DKIM signature process
127.0.0.1:10025 inet n  - n - -  smtpd
    -o syslog_name=10025/smtpd
    -o content_filter=
    -o receive_override_options=no_unknown_recipient_checks
    -o smtpd_helo_restrictions=
    -o smtpd_client_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recipient_restrictions=permit_mynetworks,reject
    -o
sender_dependent_default_transport_maps=cdb:/etc/postfix/sender_transport_maps
    -o mynetworks=127.0.0.0/8
    -o smtpd_authorized_xforward_hosts=127.0.0.0/8

# sendgrid transport
sendgrid  unix  -       -       -       -       -       smtp -v
  -o smtp_sasl_auth_enable=yes
  -o smtp_sasl_password_maps=static:<REDACTED>
  -o smtp_sasl_security_options=noanonymous -o
smtp_tls_security_level=encrypt
...

postconf -n:
address_verify_map = hash:/etc/postfix/verify
alias_database = $default_database_type:/etc/postfix/aliases
alias_maps = $default_database_type:/etc/postfix/aliases
biff = no
body_checks = pcre:$config_directory/body_checks.pcre
default_database_type = cdb
default_process_limit = 300
delay_warning_time = 1h
dovecot_destination_recipient_limit = 1
free-fr_destination_concurrency_limit = 2
header_checks = pcre:$config_directory/header_checks.pcre, pcre:
$config_directory/bogus_virus_header_checks.pcre
header_size_limit = 4096000
home_mailbox = Maildir/
html_directory = no
ignore_mx_lookup_error = yes
inet_interfaces = all
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
mail_owner = postfix
mailbox_command_maps = cdb:/etc/postfix/mailbox_commands
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
match_client_domain = reject_unknown_client, check_client_access
$default_database_type:$config_directory/spoof_client_map,
check_sender_access regexp:$confi
g_directory/strict_client.regexp, reject
maximal_queue_lifetime = 3d
message_size_limit = 15240000
mime_header_checks = pcre:$config_directory/mime_header_checks.pcre
multi_instance_directories = /etc/postfix-sympa
multi_instance_enable = yes
multi_instance_wrapper = ${command_directory}/postmulti -p --
mydestination = $myhostname, localhost.$mydomain
mydomain = daysofwonder.com
myhostname = mail.daysofwonder.com
mynetworks = 127.0.0.0/8
myorigin = $myhostname
parent_domain_matches_subdomains =
debug_peer_list,fast_flush_domains,mynetworks,permit_mx_backup_networks,qmqpd_authorized_clients,smtpd_access_maps
queue_directory = /var/spool/postfix
queue_minfree = 30480000
recipient_bcc_maps = $default_database_type:/etc/postfix/bcc_recipient
recipient_delimiter = +
sender_dependent_default_transport_maps =
$default_database_type:/etc/postfix/sender_transport_maps
sendmail_path = /usr/sbin/sendmail
smtpd_client_connection_limit_exceptions =
smtpd_client_restrictions =
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_hard_error_limit = 3
smtpd_helo_required = yes
smtpd_helo_restrictions =
smtpd_recipient_restrictions = check_recipient_access pcre:
$config_directory/sympa_protection.pcre, permit_mynetworks,
permit_sasl_authenticated, reject_non_
fqdn_sender, reject_non_fqdn_recipient, reject_unknown_recipient_domain,
reject_unauth_destination, check_client_access $default_database_type:
$config_direct
ory/client_whitelist_checks, reject_unknown_sender_domain,
check_recipient_access pcre:$config_directory/recipient_checks.pcre,
reject_unlisted_recipient , c
heck_recipient_access regexp:$config_directory/recipient_checks.regexp,
check_recipient_access $default_database_type:
$config_directory/recipient_checks, che
ck_client_access $default_database_type:
$config_directory/client_whitelist, check_client_access pcre:
$config_directory/client_checks.pcre, check_sender_acces
s regexp:$config_directory/sender_checks.regexp, check_sender_access
$default_database_type:$config_directory/sender_checks,
check_sender_access $default_dat
abase_type:$config_directory/spamlist, check_sender_access
$default_database_type:$config_directory/spoof_sender_map,
check_client_access $default_database_t
ype:$config_directory/client_checks, check_helo_access pcre:
$config_directory/helo_checks.pcre, reject_unauth_pipelining,
reject_invalid_hostname, check_send
er_mx_access $default_database_type:$config_directory/mx_access,
check_sender_mx_access cidr:$config_directory/mx_access.cidr,
warn_if_reject reject_non_fqdn
_hostname, check_sender_access
$default_database_type:/etc/postfix/reject_unverified_sender_exceptions,
check_sender_access
$default_database_type:/etc/postfix/sender-domain-validate, permit
smtpd_relay_restrictions = check_recipient_access pcre:
$config_directory/sympa_protection.pcre, permit_mynetworks,
permit_sasl_authenticated, reject_non_fqdn
_sender, reject_non_fqdn_recipient, reject_unknown_recipient_domain,
reject_unauth_destination, check_client_access $default_database_type:
$config_directory/
client_whitelist_checks, reject_unknown_sender_domain,
check_recipient_access pcre:$config_directory/recipient_checks.pcre,
reject_unlisted_recipient , check
_recipient_access regexp:$config_directory/recipient_checks.regexp,
check_recipient_access $default_database_type:
$config_directory/recipient_checks, check_c
lient_access $default_database_type:$config_directory/client_whitelist,
check_client_access pcre:$config_directory/client_checks.pcre,
check_sender_access re
gexp:$config_directory/sender_checks.regexp, check_sender_access
$default_database_type:$config_directory/sender_checks,
check_sender_access $default_databas
e_type:$config_directory/spamlist, check_sender_access
$default_database_type:$config_directory/spoof_sender_map,
check_client_access $default_database_type:
$config_directory/client_checks, check_helo_access pcre:
$config_directory/helo_checks.pcre, reject_unauth_pipelining,
reject_invalid_hostname, check_sender_m
x_access $default_database_type:$config_directory/mx_access,
check_sender_mx_access cidr:$config_directory/mx_access.cidr,
warn_if_reject reject_unknown_client,
check_sender_access
$default_database_type:/etc/postfix/reject_unverified_sender_exceptions,
check_sender_access
$default_database_type:/etc/postfix/sender-domain-validate, permit
smtpd_restriction_classes = match_client_domain
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain = $myhostanme
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = check_sender_access
regexp:/etc/postfix/tag_as_originating.regexp, permit_mynetworks,
permit_sasl_authenticated, check_sender_acc
ess regexp:/etc/postfix/tag_as_foreign.regexp
smtpd_timeout = 60s
smtpd_tls_cert_file = /etc/postfix/postfix.pem
smtpd_tls_dh1024_param_file = ${config_directory}/dh1024.pem
smtpd_tls_dh512_param_file = ${config_directory}/dh512.pem
smtpd_tls_key_file = /etc/postfix/postfix.key
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_security_level = may
transport_maps = $default_database_type:/etc/postfix/transport
virtual_alias_maps = proxy:ldap:/etc/postfix/virtual-alias.cf
proxy:ldap:/etc/postfix/virtual-autoresponder.cf $default_dat
abase_type:/etc/postfix/virtual_alias_maps
pcre:/etc/postfix/virtual_alias_maps.pcre
virtual_mailbox_domains = /etc/postfix/virtual_domains
virtual_mailbox_maps =
proxy:ldap:/etc/postfix/virtual-mailbox-daysofwonder.com.cf
virtual_transport = dovecot


And the trivial-rewrite verbose logs captured after amavis sent the mail
back to the 10025/smtpd in postfix:

Jun 22 16:28:21 corp3 10025/smtpd/smtpd[11351]: connect from
localhost[127.0.0.1]
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: connection
established fd 129
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: watchdog_start:
0x7f890797ff70
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: master_notify:
status 0
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: request
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: request
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: rewrite
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: rule
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: rule
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: local
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: address
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: address
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: [hidden email]
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: (list terminator)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: (end)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: `local'
`[hidden email]' -> `[hidden email]'
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr flags =
0
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr address
= [hidden email]
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: master_notify:
status 1
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: watchdog_start:
0x7f890797ff70
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: master_notify:
status 0
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: request
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: request
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: resolve
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: sender
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: sender
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: (end)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: address
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: address
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: [hidden email]
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: (list terminator)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: (end)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_string:
asmodee.net ~? mail.daysofwonder.com
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_string:
asmodee.net ~? localhost.daysofwonder.com
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_list_match:
asmodee.net: no match
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_string:
asmodee.net ~? proxy:ldap:/etc/postfix/virtual-alias.cf(0,lock|fold_fix)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: connect to
subsystem private/proxymap
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr request
= lookup
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr table =
ldap:/etc/postfix/virtual-alias.cf
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr flags =
16448
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr key =
asmodee.net
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: private/proxymap
socket: wanted attribute: status
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: status
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: 1
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: private/proxymap
socket: wanted attribute: value
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: value
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: (end)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: private/proxymap
socket: wanted attribute: (list terminator)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: (end)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: dict_proxy_lookup:
table=ldap:/etc/postfix/virtual-alias.cf flags=lock|fold_fix
key=asmodee.net -> status=1 result=
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_string:
asmodee.net ~? proxy:ldap:/etc/postfix/virtual-autoresponder.cf(0,lock|
fold_fix)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr request
= lookup
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr table =
ldap:/etc/postfix/virtual-autoresponder.cf
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr flags =
16448
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr key =
asmodee.net
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: private/proxymap
socket: wanted attribute: status
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: status
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: 1
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: private/proxymap
socket: wanted attribute: value
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: value
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: (end)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: private/proxymap
socket: wanted attribute: (list terminator)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: (end)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: dict_proxy_lookup:
table=ldap:/etc/postfix/virtual-autoresponder.cf flags=lock|fold_fix
key=asmodee.net -> status=1 result=
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_string:
asmodee.net ~? cdb:/etc/postfix/virtual_alias_maps(0,lock|fold_fix)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_string:
asmodee.net ~? daysofwonder.com
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_list_match:
asmodee.net: no match
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_hostname:
asmodee.net ~? mail.daysofwonder.com
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_hostname:
asmodee.net ~? localhost.daysofwonder.com
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_list_match:
asmodee.net: no match
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: `' ->
`[hidden email]' -> (`error' `5.1.1 User unknown in virtual
alias table' `[hidden email]' `512')
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr flags =
0
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr
transport = error
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr nexthop
= 5.1.1 User unknown in virtual alias table
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr
recipient = [hidden email]
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr flags =
512
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: master_notify:
status 1
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: watchdog_start:
0x7f890797ff70
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: master_notify:
status 0
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: request
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: request
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: rewrite
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: rule
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: rule
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: local
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: address
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: address
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: [hidden email]
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: (list terminator)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: (end)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: `local'
`[hidden email]' -> `[hidden email]'
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr flags =
0
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr address
= [hidden email]
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: master_notify:
status 1
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: watchdog_start:
0x7f890797ff70
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: master_notify:
status 0
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: request
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: request
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: resolve
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: sender
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: sender
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: (end)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: address
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: address
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: [hidden email]
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: (list terminator)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: (end)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_string:
gmail.com ~? mail.daysofwonder.com
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_string:
gmail.com ~? localhost.daysofwonder.com
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_list_match:
gmail.com: no match
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_string:
gmail.com ~? proxy:ldap:/etc/postfix/virtual-alias.cf(0,lock|fold_fix)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr request
= lookup
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr table =
ldap:/etc/postfix/virtual-alias.cf
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr flags =
16448
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr key =
gmail.com
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: private/proxymap
socket: wanted attribute: status
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: status
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: 1
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: private/proxymap
socket: wanted attribute: value
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: value
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: (end)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: private/proxymap
socket: wanted attribute: (list terminator)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: (end)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: dict_proxy_lookup:
table=ldap:/etc/postfix/virtual-alias.cf flags=lock|fold_fix
key=gmail.com -> status=1 result=
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_string:
gmail.com ~? proxy:ldap:/etc/postfix/virtual-autoresponder.cf(0,lock|
fold_fix)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr request
= lookup
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr table =
ldap:/etc/postfix/virtual-autoresponder.cf
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr flags =
16448
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr key =
gmail.com
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: private/proxymap
socket: wanted attribute: status
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: status
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: 1
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: private/proxymap
socket: wanted attribute: value
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: value
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: (end)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: private/proxymap
socket: wanted attribute: (list terminator)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: (end)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: dict_proxy_lookup:
table=ldap:/etc/postfix/virtual-autoresponder.cf flags=lock|fold_fix
key=gmail.com -> status=1 result=
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_string:
gmail.com ~? cdb:/etc/postfix/virtual_alias_maps(0,lock|fold_fix)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_string:
gmail.com ~? pcre:/etc/postfix/virtual_alias_maps.pcre(0,lock|fold_fix)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]:
dict_pcre_lookup: /etc/postfix/virtual_alias_maps.pcre: gmail.com
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_list_match:
gmail.com: no match
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_string:
gmail.com ~? daysofwonder.com
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_list_match:
gmail.com: no match
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_hostname:
gmail.com ~? mail.daysofwonder.com
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_hostname:
gmail.com ~? localhost.daysofwonder.com
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: match_list_match:
gmail.com: no match
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: maps_find:
sender_dependent_default_transport_maps: <>: not found
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: mail_addr_find: <>
-> (not found)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: maps_find:
transport_maps: [hidden email]: not found
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: maps_find:
transport_maps: gmail.com: not found
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: maps_find:
transport_maps: .com: not found
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: `' ->
`[hidden email]' -> (`smtp' `gmail.com'
`[hidden email]' `4096')
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr flags =
0
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr
transport = smtp
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr nexthop
= gmail.com
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr
recipient = [hidden email]
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr flags =
4096
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: master_notify:
status 1
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: watchdog_start:
0x7f890797ff70
Jun 22 16:28:21 corp3 10025/smtpd/smtpd[11351]: 3D31C60080:
client=localhost[127.0.0.1], orig_queue_id=9A9956007E,
orig_client=localhost[127.0.0.1]
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: connection
established fd 130
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: watchdog_start:
0x7f890797ff70
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: master_notify:
status 0
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: request
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: request
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: rewrite
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: rule
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: rule
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: local
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: address
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: address
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: [hidden email]
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: (list terminator)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: (end)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: `local'
`[hidden email]' -> `[hidden email]'
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr flags =
0
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr address
= [hidden email]
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: master_notify:
status 1
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: watchdog_start:
0x7f890797ff70
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: master_notify:
status 0
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: request
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: request
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: rewrite
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: rule
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: rule
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: local
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: address
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: address
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
value: [hidden email]
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: (list terminator)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: input attribute
name: (end)
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: `local'
`[hidden email]' -> `[hidden email]'
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr flags =
0
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: send attr address
= [hidden email]
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: master_notify:
status 1
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: watchdog_start:
0x7f890797ff70
Jun 22 16:28:21 corp3 postfix/cleanup[11347]: 3D31C60080:
message-id=<[hidden email]>
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: master_notify:
status 0
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: request
Jun 22 16:28:21 corp3 10025/smtpd/smtpd[11351]: disconnect from
localhost[127.0.0.1]
Jun 22 16:28:21 corp3 postfix/qmgr[11264]: 3D31C60080:
from=<[hidden email]>, size=1284, nrcpt=1 (queue active)
Jun 22 16:28:21 corp3 postfix/smtp[11357]: 3D31C60080:
to=<[hidden email]>,
relay=gmail-smtp-in.l.google.com[66.102.1.27]:25, delay=0.55,
delays=0.01/0.01/0.02/0.51, dsn=2.0.0, status=sent (250 2.0.0 OK
1498141701 w67si343599wma.127 - gsmtp)


A few questions:
* there's no logs of trivial-rewrite after qmgr picked up the email
after smtpd queued it. But it connects to it:
Jun 22 16:28:21 corp3 postfix/trivial-rewrite[11346]: rewrite socket:
wanted attribute: request
Jun 22 16:28:21 corp3 10025/smtpd/smtpd[11351]: disconnect from
localhost[127.0.0.1]
Jun 22 16:28:21 corp3 postfix/qmgr[11264]: 3D31C60080:
from=<[hidden email]>, size=1284, nrcpt=1 (queue active)
Jun 22 16:28:21 corp3 postfix/smtp[11357]: 3D31C60080:
to=<[hidden email]>,
relay=gmail-smtp-in.l.google.com[66.102.1.27]:25, delay=0.55,
delays=0.01/0.01/0.02/0.51, dsn=2.0.0, status=sent (250 2.0.0 OK
1498141701 w67si343599wma.127 - gsmtp)
I find that highly suspicious

* earlier in the log, with when it goes to check the
sender_dependent_default_transport_maps it tries with an empty sender,
which seems strange also.

In any case, when I add the sender_dependent_default_transport_maps to a
very simple postfix setup, I can see the trivial-rewrite looking up the
sender in the sender_dependent_default_transport_maps right after the
qmgr logs the "from=<[hidden email]>" line.

Any idea what can be wrong in my setup ?
--
Brice Figureau

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sender_dependent_default_transport_maps ignored ?

Wietse Venema
Brice Figureau:

> Hi,
>
> I have a fairly (at least to me) complex mail system based on postfix
> 2.11.2 where our users entering e-mails are forwarded to amavis to be
> DKIM signed then forwarded back to postfix for the final delivery.
>
> Lately, I wanted to have mails sent from `[hidden email]` to
> be relayed by our ESP, so I added the following
> sender_dependent_default_transport_maps:
>
> /etc/postfix/sender_transport_maps:
> asmodee.net sendgrid:[smtp.sendgrid.net]:587
> * DUNNO
>
> Unfortunately this is not applied.

sender_dependent_default_transport_maps (default: empty)
       A  sender-dependent override for the global default_transport parameter
       setting. The tables are searched by the  envelope  sender  address  and
       @domain.

Look for the last word in that sentence.

        Wietse

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sender_dependent_default_transport_maps ignored ?

Noel Jones-2
On 6/22/2017 10:32 AM, Wietse Venema wrote:

> Brice Figureau:
>> Hi,
>>
>> I have a fairly (at least to me) complex mail system based on postfix
>> 2.11.2 where our users entering e-mails are forwarded to amavis to be
>> DKIM signed then forwarded back to postfix for the final delivery.
>>
>> Lately, I wanted to have mails sent from `[hidden email]` to
>> be relayed by our ESP, so I added the following
>> sender_dependent_default_transport_maps:
>>
>> /etc/postfix/sender_transport_maps:
>> asmodee.net sendgrid:[smtp.sendgrid.net]:587
>> * DUNNO
>>
>> Unfortunately this is not applied.
>
> sender_dependent_default_transport_maps (default: empty)
>        A  sender-dependent override for the global default_transport parameter
>        setting. The tables are searched by the  envelope  sender  address  and
>        @domain.
>
> Look for the last word in that sentence.
>
> Wietse
>


In addition to the missing @domain, it looks like you have:

> master.cf:
> ...
> # incoming from Amavis DKIM signature process
> 127.0.0.1:10025 inet n  - n - -  smtpd
>     -o syslog_name=10025/smtpd
>     -o content_filter=
>     -o receive_override_options=no_unknown_recipient_checks
>     -o smtpd_helo_restrictions=
>     -o smtpd_client_restrictions=
>     -o smtpd_sender_restrictions=
>     -o smtpd_recipient_restrictions=permit_mynetworks,reject
>     -o
> sender_dependent_default_transport_maps=cdb:/etc/postfix/sender_transport_maps
>     -o mynetworks=127.0.0.0/8
>     -o smtpd_authorized_xforward_hosts=127.0.0.0/8
...

> postconf -n:
...
> sender_dependent_default_transport_maps =



This will never work.  Sender_dependent_default_transport_maps is a
property of the postfix trivial_rewrite service, not smtpd.  Since
trivial_rewrite is a global service, the definition in main.cf takes
precedence.



  -- Noel Jones

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sender_dependent_default_transport_maps ignored ?

Brice Figureau-13
In reply to this post by Wietse Venema
On 22/06/17 17:32, Wietse Venema wrote:

> Brice Figureau:
>> Hi,
>>
>> I have a fairly (at least to me) complex mail system based on postfix
>> 2.11.2 where our users entering e-mails are forwarded to amavis to be
>> DKIM signed then forwarded back to postfix for the final delivery.
>>
>> Lately, I wanted to have mails sent from `[hidden email]` to
>> be relayed by our ESP, so I added the following
>> sender_dependent_default_transport_maps:
>>
>> /etc/postfix/sender_transport_maps:
>> asmodee.net sendgrid:[smtp.sendgrid.net]:587
>> * DUNNO
>>
>> Unfortunately this is not applied.
>
> sender_dependent_default_transport_maps (default: empty)
>        A  sender-dependent override for the global default_transport parameter
>        setting. The tables are searched by the  envelope  sender  address  and
>        @domain.
>
> Look for the last word in that sentence.


Oh!
I somehow convinced me that the lookup was the same as for transports.
Sorry for the pebkac.

Thanks!
--
Brice Figureau
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: sender_dependent_default_transport_maps ignored ?

Brice Figureau-13
In reply to this post by Noel Jones-2
On 22/06/17 22:47, Noel Jones wrote:

> On 6/22/2017 10:32 AM, Wietse Venema wrote:
>> Brice Figureau:
>>> Hi,
>>>
>>> I have a fairly (at least to me) complex mail system based on postfix
>>> 2.11.2 where our users entering e-mails are forwarded to amavis to be
>>> DKIM signed then forwarded back to postfix for the final delivery.
>>>
>>> Lately, I wanted to have mails sent from `[hidden email]` to
>>> be relayed by our ESP, so I added the following
>>> sender_dependent_default_transport_maps:
>>>
>>> /etc/postfix/sender_transport_maps:
>>> asmodee.net sendgrid:[smtp.sendgrid.net]:587
>>> * DUNNO
>>>
>>> Unfortunately this is not applied.
>>
>> sender_dependent_default_transport_maps (default: empty)
>>        A  sender-dependent override for the global default_transport parameter
>>        setting. The tables are searched by the  envelope  sender  address  and
>>        @domain.
>>
>> Look for the last word in that sentence.
>>
>> Wietse
>>
>
>
> In addition to the missing @domain, it looks like you have:
>
>> master.cf:
>> ...
>> # incoming from Amavis DKIM signature process
>> 127.0.0.1:10025 inet n  - n - -  smtpd
>>     -o syslog_name=10025/smtpd
>>     -o content_filter=
>>     -o receive_override_options=no_unknown_recipient_checks
>>     -o smtpd_helo_restrictions=
>>     -o smtpd_client_restrictions=
>>     -o smtpd_sender_restrictions=
>>     -o smtpd_recipient_restrictions=permit_mynetworks,reject
>>     -o
>> sender_dependent_default_transport_maps=cdb:/etc/postfix/sender_transport_maps
>>     -o mynetworks=127.0.0.0/8
>>     -o smtpd_authorized_xforward_hosts=127.0.0.0/8
> ...
>
>> postconf -n:
> ...
>> sender_dependent_default_transport_maps =
>
>
>
> This will never work.  Sender_dependent_default_transport_maps is a
> property of the postfix trivial_rewrite service, not smtpd.  Since
> trivial_rewrite is a global service, the definition in main.cf takes
> precedence.

Actually it was wrapped in my original e-mail, but
sender_dependent_default_transport_maps was defined.
I just added the smtp -o as an attempt to fix the original issue.

--
Brice Figureau
Loading...