Community Discussions and Support
How to positively identify attachments in incoming mail?

Lex,

I am trying to identify attachments in incoming mail. For instance, if an incoming mail has an attachment "SAMPLE.PDF", I would like to simply add a header. So, I have the following statement in RULES.MER:

If attachment ExtnPart contains "pdf" AddHeader "SpamCheck: !PDF!" 

The message is not moved / copied in filtering process. But this does not add any header as I want.

Also, the following command

if body contains ".pdf" weight 31 

in content control file SPAMBUS.DAT does not generate the weightage.

What may be the cause?

 

 

 

<P>Lex,</P> <P>I am trying to identify attachments in incoming mail. For instance, if an incoming mail has an attachment "SAMPLE.PDF", I would like to simply add a header. So, I have the following statement in RULES.MER:</P> <P>If attachment ExtnPart contains "pdf" AddHeader "SpamCheck: !PDF!" </P> <P>The message is not moved / copied in filtering process. But this does not add any header as I want.</P> <P>Also, the following command </P> <P>if body contains ".pdf" weight 31 </P> <P>in content control file SPAMBUS.DAT does not generate the weightage.</P> <P>What may be the cause?</P> <P mce_keep="true"> </P> <P mce_keep="true"> </P> <P mce_keep="true"> </P>

I am trying to figure out  filter rule / content control command to generally identify attachments. For instance, the following filter rule:

If attachment ExtnPart contains "pdf" AddHeader "X-SpamCheck: !PDF!"   (filter)

if body contains ".jpg" weight 31 (content control command)

do not seem to work. Any help will be much appreciated.

 --b11

 

<P>I am trying to figure out  filter rule / content control command to generally identify attachments. For instance, the following filter rule:</P> <P>If attachment ExtnPart contains "pdf" AddHeader "X-SpamCheck: !PDF!"   (filter)</P> <P>if body contains ".jpg" weight 31 (content control command)</P> <P>do not seem to work. Any help will be much appreciated.</P> <P> --b11</P> <P mce_keep="true"> </P>

Hi b11, can you give us a bit more info on what you are trying to do and what filter and content control lines are not working as you would expect? 

 
[quote user="box11"]

If attachment ExtnPart contains "pdf" AddHeader "X-SpamCheck: !PDF!"   (filter)

 [/quote]

A couple of points about this one

1) I find that I need to include the . in the extention eg:

If attachment ExtnPart contains ".pdf" AddHeader "X-SpamCheck: !PDF!"

to get the filter to work as I expect.

2) this will not add a header if the email message is subsequently moved or copied in your filter rule set.

Lex
<p>Hi b11, can you give us a bit more info on what you are trying to do and what filter and content control lines are not working as you would expect? </p><p>  [quote user="box11"]</p><p>If attachment ExtnPart contains "pdf" AddHeader "X-SpamCheck: !PDF!"   (filter)</p><p> [/quote]</p><p>A couple of points about this one</p><p>1) I find that I need to include the . in the extention eg:</p><p>If attachment ExtnPart contains ".pdf" AddHeader "X-SpamCheck: !PDF!"</p><p>to get the filter to work as I expect.</p><p>2) this will not add a header if the email message is subsequently moved or copied in your filter rule set. </p>Lex
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft