I'm building a Postfix server with postscreen & a before-queue filter.

I'm trying to get spamtraps working so that if a spamtrap address is in
ANY of the recipients, then delivery of the message to ALL recipients is
quietly DISCARDED.

Seems my misreading/misunderstanding of posts has me a bit confused.

My master.cf includes,

        192.168.1.10:smtp    inet  n       -       n       -       1    
          postscreen

        smtpd                pass  -       -       n       -       20   
          smtpd
         -o smtpd_proxy_filter=inet:127.0.0.1:10025
         -o smtpd_proxy_timeout=100s
         -o smtpd_proxy_ehlo=$myhostname
         -o smtpd_client_connection_count_limit=10
         -o smtpd_proxy_options=speed_adjust
         -o smtp_send_xforward_command=yes
         -o smtpd_authorized_xforward_hosts=127.0.0.0/8
         -o disable_mime_output_conversion=yes
         -o
         
smtpd_recipient_restrictions=reject_non_fqdn_recipient,reject_non_fqdn_sender,reject_unknown_sender_domain,permit_mynetworks,reject_unknown_recipient_domain,reject_unlisted_recipient,reject_unauth_destination,$spamtraps

Mail receiving and delivery is working OK so far.

main.cf has the $spamtraps definition,

        spamtraps = check_recipient_access hash:/etc/postfix/spamtrap

And,

        cat /etc/postfix/spamtrap
                s...@rogermail.lan DISCARD
        postmap /etc/postfix/spamtrap

With this config, I get in log,

        access table hash:/etc/postfix/spamtrap: with smtpd_proxy_filter
        specified, action DISCARD is unavailable

A quick search finds this post,

        Re: 'smtpd_proxy_filter' and 'action DISCARD'
        http://permalink.gmane.org/gmane.mail.postfix.user/222778

Where Wietse comments

        As the message suggests, the DISCARD action is not implemented
        for
        before-queue content filters.

Ok ... and then proposes a workaround,

        Maybe the before-queue filter can discard the message instead.

Which seems to suggest doing exactly what's stated as "not implemented"
just above.  

I'd like to DISCARD spamtrap-addressed messages as soon as possible in
the process.  With my config, what's the right method & place to do
that?

Cheers,

Roger

--
Roger Garrington
 Wilimington, NC

Reply via email to