OK
Thanks to Sean and dman for responding.
Based on the responses, here is what I have to accomplish the task:
I change:
:0 f
* > 2048000
| ${FORMAIL} -A"X-Note: Oversize/Not Filtered"
to:
:0
* > 2048000
{
OVERSIZE=yes
:0 f
| ${FORMAIL} -A"X-Note: Oversize/Not Filtered"
}
and add:
:0
* OVERSIZE ?? yes
* ^From:.*(xxx(_at_)yyy\(_dot_)com|\
zzz(_at_)xxx\(_dot_)com)$
/dev/null
Yes, I understand that the first recipe is just adding a header. The header
is used later in another script called by this one to do the actual
delivery to the appropriate user. :-)
should have included that in my original question which is below for
those that care.
And, I really do want to do the delete at this time.
As for bouncing a message back, I really don't want to do that for a lot of
reasons. What I am after is an easy way to maintain the list of From:
addresses that will be deleted as soon as they arrive if they violate the
<SIZE POLICY>. This will only be used for people who absolutely refuse to
cease and desist when they have been notified by the recipient to do so.
I should be able to add any additional From: email addresses, on address
per line.
I tend to operate a bit like the Gestapo when it comes to this kind of
stuff. My users are notified that within X time frame any email messages
from this address will be automatically deleted because they are in
violation of a <SIZE POLICY>. That's it; I gots much better things to do
with my time, if ya know what I mean.
Thanks.
Jim
Original message:
Hi,
I have several users who receive email from one or more specific person(s)
who think it is their appointed task in life to send out the absolute
largest email's that they possibly can.
The vast majority of the stuff that is sent are jokes and other such
trivia.
All email on our system is filtered using procmail to remove spam.
We have a global archiving of a copy of each incoming email that is the
first thing that happens in the global procmail process.
The second thing the global procmail process does is send large email's
directly to the users default incoming mail box; larger being greater than
2MB so they do not cause procmail problems.
The following is the filter to move large email's into the users home
directory.
:0 f
* > 2048000
| ${FORMAIL} -A"X-Note: Oversize/Not Filtered"
Works a treat.
This recipe is run prior to the individual users procmail recipes. I would
like to be able add a condition to this recipe that allows me to include
specific From: email addresses that will send the large email being sent
by specific email addresses to /dev/null and any others to be sent to the
users default mail box. This way I can police the continual offenders who
eat up disk space with this type of stuff.
How do I code this?
I already remove the messages on a daily basis from the users backup file
based on the From: email address.
This may sound Draconian to some but we do not have the luxury of allowing
this kind of stuff eat up disk space; especially when people are out of the
office and do not check their email for some time.
Thanks.
Jim
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail