Re: [exim] Discard mails via exim filter

Pàgina inicial
Delete this message
Reply to this message
Autor: Chris Siebenmann
Data:  
A: soumya tr
CC: exim-users@exim.org
Assumpte: Re: [exim] Discard mails via exim filter
| Is there any way I can discard mails via exim filter?

 Yes. In the filter, use:
    seen finish
without specifying where the message goes; this will discard it. You
may want to log things with 'logwrite', possibly setting a logfile.
Our filter does:
    logfile /var/log/exim4/discardlog
    if ....
    then
        logwrite ....
        seen finish
    endif


 If this is run through a router you must set allow_filter. Our router
that uses this filter looks like this:
    spam_discard:
        domains = +local_domains
        local_parts = FILTER_USERS
        driver = redirect
        file = /etc/exim4/exim-spam-filter
        no_verify
        allow_filter
        allow_freeze
        user = Debian-exim


(I think 'allow_freeze' is unnecessary and is a vestigial remnant of
something else.)

I believe that specifying the user is part of the magic that makes it
actually work. This may be your problem with the logfile write permissions.

    - cks