[Mimedefang] How to make MD do no more filtering in filter recipients/filter begin

imacat imacat at mail.imacat.idv.tw
Wed Apr 11 04:25:38 EDT 2007


On Wed, 11 Apr 2007 09:35:29 +0200
Danny Kj熳gaard <danny at resennet.dk> wrote:
> How can i make MD accept an mail in filter_recipients/filter_begin and dont
> run any further tests?

    Maybe you can:

====
sub filter_begin {
    my($entity) = @_;
    return if -e "$CWD/accept_this_mail";
    if (<good condition>) {
        `touch $CWD/accept_this_mail`;
        return;
    }
    ...
}
====
sub filter_recipients {
    return ("CONTINUE", "ok") if -e "$CWD/accept_this_mail";
    if (<good condition>) {
        `touch $CWD/accept_this_mail`;
        return ("CONTINUE", "ok");
    }
    ....
}
====

    and in filter, filter_multipart, filter_end:

====
sub filter* {
    return if -e "$CWD/accept_this_mail";
    ....
}
====

-- 
imacat ^_*'
imacat at mail.imacat.idv.tw
PGP Key: http://www.imacat.idv.tw/me/pgpkey.txt

Tavern IMACAT's http://www.imacat.idv.tw/
Woman's Voice http://www.wov.idv.tw/
TLUG List Manager http://www.linux.org.tw/mailman/listinfo/tlug
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <https://lists.mimedefang.org/pipermail/mimedefang_lists.mimedefang.org/attachments/20070411/4b154abb/attachment-0003.sig>


More information about the MIMEDefang mailing list