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

[vps-mail] Limit files size on procmail and clamav



Along with a disk space issue on another thread I just started I was wondering how I could limit the size of files that clamav is allowed to scan? Actually, I would just like to limit the size of files coming in altogether. I was under the assumption that sendmail limited file sizes for me. However my server got clogged when a friend tried to send me a 200mb file. Don't ask me why. I am a firm believer that e-mail was create for sending text and ftp was created for sending files.

So the questions:

- how to limit e-mail file sizes coming in?

- how to limit clamav file size scans?

Here is my clamav section in procmailrc

## BEGIN ClamAV Scanning Block: edits inside this block may be
## reverted at upgrade. Edit at your own risk!

TMPLOGFILE=$LOGFILE
TMPLOGABSTRACT=$LOGABSTRACT
TMPVERBOSE=$VERBOSE

LOGFILE=/var/log/procmail.clamav
LOGABSTRACT=all
VERBOSE=off
NL="
"

:0
CLAMAV=|/usr/local/bin/clamscan --disable-summary --stdout --mbox -

:0
* CLAMAV ?? .*: \/.* FOUND
{
  LOG="Possible virus ${MATCH}${NL}"

  :0 fhw
  | formail -a"X-ClamAV: ${MATCH}"
}

:0E fhw
| formail -a"X-ClamAV: clean"

:0
* ^X-ClamAV: \/.*
* ! MATCH ?? ^^clean^^
/dev/null

LOGFILE=$TMPLOGFILE
LOGABSTRACT=$TMPLOGABSTRACT
VERBOSE=$TMPVERBOSE

## END ClamAV Scanning Block


--
Jonathan Duncan
Administrator
801.376.7796
JKD Web Magic
http://www.jkdwebmagic.com
Web Site Hosting and Design

======================================================================
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: