nudetravel
05-07-2002, 04:20 PM
Once you know how to do it. And it works server wide! Future forum search fodder:
After MUCH headbanging, I have this working (like a charm).
All you have to do:
touch /etc/procmailrc
pico /etc/procmailrc to look like:
PATH="/usr/bin:$PATH:/usr/local/bin"
SHELL=/bin/sh
LOGFILE=/home/log/procmaillog
LOGABSTRACT=ALL
VERBOSE=OFF
#This stops a bunch of bad attachements from coming through.
#Attachments are defined in the "filename" variable. You could #add or subtract file types using the same concept as below.
:0 HB
*^Content-Disposition.*filename=".*\.(vbs|wsf|eml|shs|exe|nws|chm|pif|vbe|hta|scr|reg|bat)"
/dev/null
Then cp etc/procmailrc etc/.procmailrc
(this step added because on one raq I have it looked for /etc/procmailrc - the other didn't work until I added /etc/.procmailrc)
Then, touch /home/log/procmaillog
I read and read all kinds of tutorials, many with conflicting info.
It WAS NOT procmail.rc - that didn't work.
On my RaQ3, sendmail was already using procmail as the delivery agent. No need to hack sendmail.cf.
No need for .forward files in the /users/ directories.
I have tested and tested and so far, so good. The biggest thing is, no more of those d*mn virus attachments are coming through.
Now, can someone tell me how to rotate that log file so it doesn't get to big?
(edited to correct typing mistake)
Have fun,
After MUCH headbanging, I have this working (like a charm).
All you have to do:
touch /etc/procmailrc
pico /etc/procmailrc to look like:
PATH="/usr/bin:$PATH:/usr/local/bin"
SHELL=/bin/sh
LOGFILE=/home/log/procmaillog
LOGABSTRACT=ALL
VERBOSE=OFF
#This stops a bunch of bad attachements from coming through.
#Attachments are defined in the "filename" variable. You could #add or subtract file types using the same concept as below.
:0 HB
*^Content-Disposition.*filename=".*\.(vbs|wsf|eml|shs|exe|nws|chm|pif|vbe|hta|scr|reg|bat)"
/dev/null
Then cp etc/procmailrc etc/.procmailrc
(this step added because on one raq I have it looked for /etc/procmailrc - the other didn't work until I added /etc/.procmailrc)
Then, touch /home/log/procmaillog
I read and read all kinds of tutorials, many with conflicting info.
It WAS NOT procmail.rc - that didn't work.
On my RaQ3, sendmail was already using procmail as the delivery agent. No need to hack sendmail.cf.
No need for .forward files in the /users/ directories.
I have tested and tested and so far, so good. The biggest thing is, no more of those d*mn virus attachments are coming through.
Now, can someone tell me how to rotate that log file so it doesn't get to big?
(edited to correct typing mistake)
Have fun,
