You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Rejaine Monteiro <re...@bhz.jamef.com.br> on 2015/10/14 23:56:53 UTC
rule to xml attachment files
how can i write a rule to get xml attach files from an e-mail?
Headers:
Content-Type: multipart/mixed;
boundary=--boundary_6_9e03550b-93b5-4e32-88c8-2a1cd6037099
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: base64
Content-Type: application/octet-stream; name=filename.xml
Content-Transfer-Encoding: base64
Content-Type: application/octet-stream; name=filename.pdf
Content-Transfer-Encoding: base64
I tried,
header FILE_XML Content-type =~ /xml/i
header FILE_XML Content-type =~ /\.xml/i
rawbody FILE_XML /xml/
rawbody FILE_XML /\.xml/i
body FILE_XML /xml/i
none took effect....
Re: rule to xml attachment files
Posted by Rejaine Monteiro <re...@bhz.jamef.com.br>.
thanks!! it works!!
On 14-10-2015 19:15, David B Funk wrote:
> Those are MIME headers within the message, not headers at the top header
> area. So you need to use the "mimeheader" type rules.
>
> EG:
>
> mimeheader FILE_XML Content-type =~ /xml/i
Re: rule to xml attachment files
Posted by David B Funk <db...@engineering.uiowa.edu>.
On Wed, 14 Oct 2015, Rejaine Monteiro wrote:
>
> how can i write a rule to get xml attach files from an e-mail?
>
> Headers:
>
> Content-Type: multipart/mixed;
> boundary=--boundary_6_9e03550b-93b5-4e32-88c8-2a1cd6037099
> Content-Type: text/html; charset=utf-8
> Content-Transfer-Encoding: base64
> Content-Type: application/octet-stream; name=filename.xml
> Content-Transfer-Encoding: base64
> Content-Type: application/octet-stream; name=filename.pdf
> Content-Transfer-Encoding: base64
>
> I tried,
>
> header FILE_XML Content-type =~ /xml/i
> header FILE_XML Content-type =~ /\.xml/i
> rawbody FILE_XML /xml/
> rawbody FILE_XML /\.xml/i
> body FILE_XML /xml/i
>
> none took effect....
Those are MIME headers within the message, not headers at the top header
area. So you need to use the "mimeheader" type rules.
EG:
mimeheader FILE_XML Content-type =~ /xml/i
--
Dave Funk University of Iowa
<dbfunk (at) engineering.uiowa.edu> College of Engineering
319/335-5751 FAX: 319/384-0549 1256 Seamans Center
Sys_admin/Postmaster/cell_admin Iowa City, IA 52242-1527
#include <std_disclaimer.h>
Better is not better, 'standard' is better. B{
Re: rule to xml attachment files
Posted by John Hardin <jh...@impsec.org>.
On Wed, 14 Oct 2015, Rejaine Monteiro wrote:
> how can i write a rule to get xml attach files from an e-mail?
>
> Headers:
>
> Content-Type: multipart/mixed;
> boundary=--boundary_6_9e03550b-93b5-4e32-88c8-2a1cd6037099
> Content-Type: text/html; charset=utf-8
> Content-Transfer-Encoding: base64
> Content-Type: application/octet-stream; name=filename.xml
> Content-Transfer-Encoding: base64
> Content-Type: application/octet-stream; name=filename.pdf
> Content-Transfer-Encoding: base64
>
> I tried,
>
> header FILE_XML Content-type =~ /xml/i
> header FILE_XML Content-type =~ /\.xml/i
> rawbody FILE_XML /xml/
> rawbody FILE_XML /\.xml/i
> body FILE_XML /xml/i
>
> none took effect....
https://spamassassin.apache.org/full/3.4.x/doc/Mail_SpamAssassin_Plugin_MIMEHeader.html
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhardin@impsec.org FALaholic #11174 pgpk -a jhardin@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
Drugs will always be around. Politicians are therefore making an
active decision to distribute them through violent gangs. --twitter
-----------------------------------------------------------------------