MasquedAvenger Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/25491636041f08a8a11be0.gif)
Joined: 21 Aug 2003 Posts: 559 Location: Southern California
|
Posted: Sun Apr 04, 2004 5:02 pm Post subject: procmail + ClamAV: one last question |
|
|
Hey everyone. I apologize for having so many posts in the past day and a half. I'll make this my last one on this topic
Basically, I'm not sure if there is a better and much easier way to implement what I want or not. So if anyone knows of a simpler way to accomplish this, please let me know.
What I want to do is, I want to write a procmail recipie that does the following:
1. Rather than use amavis to scan emails and automatically delete any emails with viruses in them, I want to write a procmail recipie that will call the clamscan command line scanner and simply report if there is or isn't a virus in the email.
2. Then, if there is a virus, I want to use procmail to call formail to strip the attachment from the email and leave a message down at the bottom of the email, something to the effect of: "[Attachment filename.ext contained a virus and was removed from this message]."
3. I then want procmail to automatically write the sender of the message an email warning them that a virus was detected and removed from their last message so that they will know to check and see if they have an infection themselves.
4. Finally, I want to be able to detect if the message is HTML mail or not, and append the message in HTML form if so, and in plain text if not.
It seems like I should be able to do this, but I'm not sure how, and I'm really bad at writing procmail rules (procmail confuses me ). If anyone has any ideas, simpler ways to do this or something very similiar, or could help me out in figuring out some of the procmail rules to write, I would be most grateful. If I can get this implemented, I'll post my procmail recipie as well so others can use it in the future.
James |
|