Noel Jones wrote:
>> I was was reading the header_checks won't work on bounced mail.  I
>> setup a regexp check_recipient_access map.
>>  This is the regexp file verp_redirect.regexp :
>> /^RCPT TO:.+\+.+\=...@.+\..+$/          REDIRECT        verpbounce
>>
>> It's still not working.  Here is the postconf -n:
>> alias_database = hash:/etc/aliases
>> alias_maps = hash:/etc/aliases
>> append_dot_mydomain = no
>> biff = no
>> config_directory = /etc/postfix
>> default_process_limit = 200
>> default_recipient_limit = 20000
>> default_verp_delimiters = +=
>> disable_verp_bounces = no
>> disable_vrfy_command = yes
>> hash_queue_depth = 2
>> hash_queue_names = deferred, defer, active, incoming
>> header_checks = regexp:/etc/postfix/header_checks.regexp
>> html_directory = /usr/share/doc/postfix/html
>> inet_interfaces = all
>> mailbox_size_limit = 0
>> maximal_queue_lifetime = 4d
>> message_size_limit = 15360000
>> minimal_backoff_time = 7200
>> mydestination = mail-dr.sharperagent.com, mail-dr.prod.sharperagent.com
>> myhostname = mail-dr.sharperagent.com
>> mynetworks = 127.0.0.0/8,        10.20.30.0/24,       
>> 10.20.40.0/22,        172.28.201.0/24,        172.28.200.0/30,       
>> 71.33.252.73,
>> myorigin = mail-dr.sharperagent.com
>> nested_header_checks = regexp:/etc/postfix/header_checks.regexp
>> propagate_unmatched_extensions = canonical, virtual
>> qmgr_message_active_limit = 20000
>> qmgr_message_recipient_limit = 100000
>> queue_run_delay = 2000
>> readme_directory = /usr/share/doc/postfix
>> recipient_delimiter = +
>> relay_domains = $mydestination, $mynetworks,       
>> sharperagent.com,        agentcatalyst.com,
>> builderintouch.com,    lenderintouch.com,       
>> mr-roboto.sharperagent.com,        minime.sharperagent.com,
>> relayhost =
>> smtp_connect_timeout = 10
>> smtp_helo_timeout = 10
>> smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
>> smtpd_authorized_verp_clients = $mynetworks
>> smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
>> smtpd_client_event_limit_exceptions = $mynetworks
>> smtpd_delay_reject = no
>> smtpd_error_sleep_time = 0
>> smtpd_helo_required = yes
>> smtpd_helo_restrictions =
>> permit_mynetworks,                               
>> reject_invalid_hostname,
>>                      
>> regexp:/etc/postfix/helo.regexp,                                permit
>> smtpd_recipient_restrictions = reject_non_fqdn_sender,               
>> reject_non_fqdn_recipient,
>>   reject_unauth_pipelining,                check_recipient_access
>> regexp:/etc/postfix/verp_redirect.regexp,
>>              check_sender_access
>> hash:/etc/postfix/sender_access,        check_client_access
>> regexp:/etc/postfix/habeas_header1.regexp,               
>> check_client_access
>> regexp:/etc/postfix/habeas_header2.regexp,               
>> check_client_access
>> regexp:/etc/postfix/habeas_header3.regexp,        check_client_access
>> hash:/etc/postfix/client_access,
>>   check_recipient_access
>> hash:/etc/postfix/recipient_access,                permit_mynetworks,
>> permit_sasl_authenticated,               
>> reject_unauth_destination,                reject_non_fqdn_hostname,
>>                reject_rbl_client relays.ordb.org,       
>> check_policy_service inet:127.0.0.1:60000
>> permit_mx_backup,        reject_invalid_hostname,               
>> reject_non_fqdn_sender,
>> reject_non_fqdn_hostname,               
>> reject_non_fqdn_recipient,                reject_unauth_pipelining,
>> smtpd_sender_restrictions = check_sender_access
>> hash:/etc/postfix/sender_access,
>> smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
>> smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
>> smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
>> smtpd_use_tls = yes
>> strict_rfc821_envelopes = yes
>> transport_maps = hash:/etc/postfix/transport
>> unknown_address_reject_code = 554
>> unknown_client_reject_code = 554
>> unknown_hostname_reject_code = 554
>> verp_delimiter_filter = -+=
>> virtual_alias_maps = hash:/etc/postfix/virtual
>>
>>
>> My log of attempting to send an e-mail looks like this:
>> Mar 20 09:06:34 mail-dr postfix/smtpd[9069]: connect from
>> localhost[127.0.0.1]
>> Mar 20 09:06:34 mail-dr postfix/smtpd[9069]: 7A03D28E132:
>> client=localhost[127.0.0.1]
>> Mar 20 09:06:34 mail-dr postfix/cleanup[9072]: 7A03D28E132:
>> message-id=<[email protected]>
>> Mar 20 09:06:34 mail-dr postfix/qmgr[9062]: 7A03D28E132:
>> from=<[email protected]>, size=527, nrcpt=1 (queue
>> active)
>> Mar 20 09:06:34 mail-dr postfix/smtpd[9069]: lost connection after
>> QUIT from localhost[127.0.0.1]
>> Mar 20 09:06:34 mail-dr postfix/smtpd[9069]: disconnect from
>> localhost[127.0.0.1]
>> Mar 20 09:06:35 mail-dr postfix/smtp[9073]: 7A03D28E132:
>> to=<[email protected]>,
>> relay=mail.chrisdos.com[71.33.251.73]:25, delay=0.96,
>> delays=0.05/0.01/0.7/0.2, dsn=5.1.1, status=bounced
>> (host mail.chrisdos.com[71.33.251.73] said: 550 5.1.1
>> <[email protected]>: Recipient address rejected:
>> User unknown in local recipient table (in reply to RCPT TO command))
> 
> You send to mail.chrisdos.com, which doesn't have a user named
> [email protected].  Postfix creates a bounce.
> 
>> Mar 20 09:06:35 mail-dr postfix/cleanup[9072]: 75D8529027D:
>> message-id=<[email protected]>
>> Mar 20 09:06:35 mail-dr postfix/qmgr[9062]: 75D8529027D: from=<>,
>> size=2670, nrcpt=1 (queue active)
>> Mar 20 09:06:35 mail-dr postfix/bounce[9074]: 7A03D28E132: sender
>> non-delivery notification: 75D8529027D
>> Mar 20 09:06:35 mail-dr postfix/qmgr[9062]: 7A03D28E132: removed
>> Mar 20 09:06:35 mail-dr postfix/smtp[9073]: 75D8529027D:
>> to=<[email protected]>,
>> relay=mail.chrisdos.com[71.33.251.73]:25, delay=0.19,
>> delays=0.02/0/0.11/0.06, dsn=5.1.1, status=bounced (host
>> mail.chrisdos.com[71.33.251.73] said: 550 5.1.1
>> <[email protected]>: Recipient
>> address rejected: User unknown in local recipient table (in reply to
>> RCPT TO command))
> 
> Postfix tries to deliver the bounce to
> [email protected], which doesn't exit.
> 
>> Mar 20 09:06:35 mail-dr postfix/qmgr[9062]: 75D8529027D: removed
>>
>>
>> I'm trying to intercept the bounce:
>> to=<[email protected]>
>>
>>
>>
>> Any ideas why this is not working.  I'm so frustrated at this point,
>> it's nuts.
>>
>>     Chris
> 
> Couple of problems here...
> 
> You're never sending any mail out.  All the logs you show are postfix
> internal mail.  Internal mail is not subject to any checks.
> 
> You can't catch a bounce on the way out.  All postfix access controls,
> header_checks, check_sender_access, etc, operate on input.
> 
> You're pointing the gun the wrong way.
> 
>   -- Noel Jones
> 

Well, pointing the gun the wrong way is differently something that I don't want 
to be doing.  But in the case,
I'm confused.  I'm having mail-dr send out to another server, 
mail.chrisdos.com, on the internet.  Mail-DR is
a separate mail server all together on a different domain and network.  I'm 
just sending the e-mail to my
server to test this.

I'm doing  smtpd_recipient_restrictions and adding that hash.  That won't work 
for outgoing e-mail?

        Chris

Reply via email to