At 08:50 2003-06-01 +0530, sysmanager wrote:
I tried to write recipe for messages that have no recipients in the To
line as
:0
* To??^$
temp
There are lotsa extra blank lines in your post (in addition to a pretty
font, which is pretty small - perhaps you could use _PLAIN_TEXT_ when
posting to this _MAILING_LIST_).
Your regexp is seriously flawed. The "??" syntax checks the contents of
the VARIABLE named on the LHS with the regexp on the RHS.
You should use something such as:
:0:
* 9876543210^0 ^To:[ ]*$
* 9876543210^0 ! ^To:
temp
this utilizes scoring to say:
If the To header exists, but is nothing but whitespace (if that) and then
an EOL, *OR* if the To: header doesn't even exist, then drop it in the temp
mailbox (and note that the LOCKFILE flag is specified at the end of the
flags line).
2) I am using the following recipe for attachment filter, its
working. But how to block the mail with reference to the content.
For ex, If I want to block a mail which contains image file which is not
as an attachment, then what to do?
I don't follow exactly what you're saying - if it contains an image file
that isn't attached as an attachment??? Or perhaps you mean, anything
where there's an included MIME type which isn't an image (and for sake of
argument, text/plain or text/html, since if you ditch those, you're going
to hate yourself).
:0 B:
* ^Content-Type:
* !^Content-Type:[ ]*(image|text)/
/dev/null
This says, if the content type header is present *AND*
the content Type header is not an image/ type (could be any of several -
gif, jpeg, png, etc), or if a text (/plain and /html are common).
Of course, you can have attachments which contain an image type as well as
other non-image types, and as long as the image type is present, the filter
will be satisfied, so someone can still slip an executable at you.
---
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail