OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: access file : DISCARD vs REJECT

From: Pascal Maes (pascal.maeselec.ucl.ac.be)
Date: Sat Apr 08 2006 - 04:12:12 CDT


Le 8 avr. 06 à 10:25, Andreas Winkelmann a écrit :

> Am Saturday 08 April 2006 09:14 schrieb Pascal Maes:
>
>>>> You're right and REJECT will do the job,
>>>> but I wonder why DISCARD is not working.
>>>> If you have an idea (I have also posted an extract of the
>>>> logfiles).
>>>
>>> just speculating: mailscanner interaction?
>>
>> No.
>> The access file is used at the first instance of Postfix,
>> before the use of greylisting and mailscanner.
>
> How did you include your content-filter? Pre- or Post-Queue? Please
> show your
> Configuration. "postconf -n" and master.cf.
>

main.cf (extract)

hash_queue_depth = 1
hash_queue_names = deferred defer incoming hold

header_checks = regexp:/etc/postfix/header_checks

smtpd_restriction_classes =
         greylist_policy

# Greylisting
greylist_policy = check_policy_service inet:127.0.0.1:2525

smtpd_recipient_restrictions =
         reject_non_fqdn_recipient
         reject_non_fqdn_sender
         warn_if_reject reject_unknown_recipient_domain
         check_recipient_access hash:/etc/postfix/protected_destinations
         check_recipient_access hash:/etc/postfix/rules/ucllouvain
         check_sender_access hash:/etc/postfix/access
         permit_mynetworks
         permit_sasl_authenticated
         reject_unlisted_recipient
         reject_unauth_destination
         reject_unknown_recipient_domain
         check_recipient_access hash:/etc/postfix/greylisting
         permit_auth_destination
         reject_multi_recipient_bounce
         reject

unknown_local_recipient_reject_code = 550

-----------

/etc/postfix/header_checks

/^Received:/ HOLD
/^From: (.*)/ WARN "Mail From: $1"
/^To: (.*)/ WARN "Mail To: $1"
/^Cc: (.*)/ WARN "Mail Cc: $1"
/^Bcc: (.*)/ WARN "Mail Cc: $1

-----------

master.cf (extract)

smtp inet n - n - - smtpd
         -o smtpd_proxy_filter=127.0.0.1:10025
         -o smtpd_client_connection_count_limit=100

127.0.0.1:10026 inet n - n - 16 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 mynetworks_style=host
         -o smtpd_authorized_xforward_hosts=127.0.0.0/8

--
Pascal