procmail
[Top] [All Lists]

Sendmail rules

2000-10-27 06:17:08
I use procmail for incoming mail filtering, but I need to use it with
sendmail to build a general filter for both, incoming and outgoing mail. My
server is the mail gateway for my entire organization into my province. I
need a filter for all mail that passes through it.

I read procmailrc man page and I tried the sendmail rules for using procmail
with sendmail; I put them at the beginning of ruleset 0 but rules didn't
work. I had tested the recipy in /etc/procmailrc and it worked fine, but it
didn't work with sendmail. I have defined the procmail mailer in sendmail.cf
as appears in procmailrc man page. These are my sendmail rules for my domain
in ruleset 0:

R$*<@hl.minaz.cu>$*
        $#procmail $@/etc/procmailrcs/antivirus.rc
        $:$1(_at_)hl(_dot_)minaz(_dot_)cu(_dot_)procmail$2
R$*<@$*.procmail>$*    $1<@$2>$3  Already filtered, map back


This is /etc/procmailrcs/antivirus.rc
__________________________________________________
VERBOSE=on
LOGFILE=/var/log/procmail/procmail.log

:0
*^Content-type: (multipart/mixed|application/.*)
{
    :0 B
    *^Content-Disposition: (attachment|inline);
    *((\.TXT|\.DOC|\.HTML|\.JPG|\.MP3|\.AVI)\.pif)"$
    {
        :0
        | echo "ALERT: E-Mail virus detected, check tmp file" \
        | mail -s "ALERT: ProcMail active check found e-mail virus" root

        :0
        /tmp/proc_virus
    }
}

#Send all other messages
:0
! -oi -f "$@"
----------------------------------------------------------------------------
----------------------------
I have turned on verbose mode, but I don't see anything into the log file
and messages are not filtered at all.

Any idea?

Thanks in advance

---------------------------------------------------------------------
Carlos Perez Gonzalez
E-Mail: charlie(_at_)hl(_dot_)minaz(_dot_)cu
---------------------------------------------------------------------





_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>