There's no way to do that with SpamAssassin itself.  Once you send
something to SA, it will do the whole process (there's short
circuiting, but that's not really what you want here).  It sounds like
you're trying to not filter internal mail but filter external mail, so
I would recommend two things:

a) Ideally, have your MTA listen on two different IPs, one internal
and one external.  Apply different rules depending on which IP is
being used.  You mentioned using Postfix, and doing this is fairly
trivial.

b) Send the mail through something like procmail.  It can make
lightweight decisions about "if this header exists do X".


On Tue, Sep 8, 2009 at 5:17 AM, Daniel Ruiz
Molina<daniel.r...@caos.uab.es> wrote:
> I want to know if it would be possible a spamassassing configuration that
> allows me execute spamassassing just in case a header mail exists with a
> defined value.
[...]
> With this configuration, each mail that receives postfix is scanned before
> sending to each user. My idea is that spamassassin scans only in case mail
> received has a header added by another SMTP. My SMTP receives mails that
> have been received before for the Enterprise SMTP. That Enterprise SMTP add
> a header called "X-imss-result:". Depending on the value of this header, I
> would like to configure SpamAssassing for execute scan just in case this
> header has a value equal to "Default_Triggered"; in other cases, mail will
> be sent to user with no scan.

Reply via email to