sieve-dev filtering according to attachment type
Richard Reina
gatorreina at gmail.com
Sun Jan 9 17:28:19 CST 2011
I am trying to write a recipe that rejects emails that has attachments that
are not either pdf or tiff. I found this
if header :contains "x-attached"
[".exe",".bat",".js",".com",".cmd",".ini",".dll",".bas",".cpl",".drv",".inf",".sys",".pif"]
{
discard;
stop;
}
in this tutorial http://wiki.fastmail.fm/index.php?title=SieveRecipes
So I tried:
if header :contains "x-attached"
[".tiff",".pdf"] {
fileinto "INBOX";
stop;
} else {
reject "Your message was returned because of the attachment type. Only pdf
and tiff format allowed";
}
However, it does not work. The emails get rejected regardless of their
attachment type. That is, emails with pdfs and
tiffs attached get rejected. What am I doing wrong? Any help would be
greatly appreciated.
Thanks,
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/sieve-dev/attachments/20110109/dd963581/attachment.htm>
More information about the sieve-dev
mailing list