[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vps-mail] Re: Clamav



On Tue, Mar 02, 2004 at 11:51:48AM -0800, Dale Britt wrote:
> Hi
> 
> Is there a way to have an email sent to the recipient notifying them the clamav caught a virus
> 
> What do I have to do for this to happen?

You can modify your /usr/local/etc/procmailrc (assuming this is VPS
v2):

:0
* ^X-ClamAV: \/.*
* ! MATCH ?? ^^clean^^
{
  DROPPRIVS=yes

  ## this is slightly modified with a 'c' flag
  :0c:
  $HOME/quarantine

  ## send notification to recipient
  SUBJECT=`formail -zxSubject:`
  :0 h
  | (formail -i"From: Virus Scanner <root@xxxxxxxxxx>" \
    -I"Subject: VIRUS FOUND (was: $SUBJECT)"; \
    cat /usr/local/etc/virus_message.txt;) | $SENDMAIL -t
  ## end notification section
}

and make a file '/usr/local/etc/virus_message.txt':

    A virus was sent to you but was intercepted by the server virus
    scanning subsystem. The infected message was saved in the
    <<quarantine>> folder in your server account home directory.

    Do not reply to this message.

Scott
-- 
Scott Wiersdorf
scottw@xxxxxxxxxxxx
======================================================================
This is <vps-mail@xxxxxxxxxxxx>       <http://www.perlcode.org/lists/>
Before posting a question, please search the archives (see above URL).


Main Index | Thread Index
Match: Format: Sort by:
Search: