Jérôme Blion wrote:
>>>>> if( /^X-Virus-Status: INFECTED/:h )
>>>>> {
>>>>>         `echo "INFECTE" > /tmp/maildrop/virus`
>>>>>         exit
>>>>> }
>     - I don't want viruses to be delivered ! I want correct mails to be 
> delivered.
>     - Is it mandatory to have a "to" instruction at the end of the 
> maildroprc?
>     - The biggest problem I see is that my Regexp is matched whereas in 
> this case, this should not. So, there is something wrong in my regexp... 
> But I don't see where is the error.

Removing just the "exit" should deliver the message that matched
your "X-Virus-Status". Next you have two choices:

1) Remove just the "exit" instruction so that the message gets
   delivered. Check the timestamp of /tmp/maildrop/virus and the
   delivered message. The header isn't there? Try capturing it, e.g.,

      if( /^(X-Virus-Status: INFECTED.*)/:h )
      {
         `echo "$MATCH" > /tmp/maildrop/virus`
      }

2) Run maildrop in verbose mode, see http://www.courier-mta.org/maildrop.html
   you can log in as courier or run, e.g.,

     su -c 'cat mymsg | maildrop -V 7 fifi' courier

   where fifi is maildrop's recipe, mymsg is the message file, and courier is
   the owner of fifi.

Either choice should bring evidence about what matches your regex.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to