The (real) problem is the following: my Amavis/Spamasssin setup analyzes
mail and adds X-Spam-* headers accordingly but it does NOT block/drop any
mail. Filtering is done at the MDA level via sieve, which analyzes headers
and decides what to do with certain mails based on those headers (the
advantage is that the user has the last choice, so he/she can decide
whether the spam threshold would be, etc).

Now, I need my MTA to perform additional functionality: to act as relay for
CERTAIN domains (keeping, of course, the *other* domains which my server
owns mailboxes for). I do NOT control the final delivery for these "relayed
domains" (I do NOT own final MTA with mailboxes), so I'd like to make some
blocking based on headers but ONLY for my relayed domains.

Postfix supports filtering based on headers but all mail (relayed and not
relayed) would be filtered in this case (which is not what I want), I don't
know how could I add the "conditional" behaviour: "if mail destination is
one of my relayed domains, check headers and drop spam mail; if not, don't
check headers". I think Postfix supports the concept of "classes", but I
never used them and I don't know if what I need could be done with that
feature.

Hope it is clear now, and sorry for the long email. You're making a great
work here in this list, mouss. Thank you in advance.

PS: I'm using Postfix 2.5.5.

Cheers,
-Roman

mouss escribió:
> Roman Medina-Heigl Hernandez a écrit :
>> Hello,
>>
>> (see subject) Is it easily doable with Postfix? (notice that I'd like to
>> combine some checks and that the block action should only be performed in
>> both conditions are met; I'd like to be able to put more similar complex
>> "rules" mixed with the common/simple/typical rules).
>>
> 
> you can't do that in a single "check" inside postfix. postfix header
> checks test headers one at a time, indendently(so you can say if "head A
> matches foo AND header B matches bar).
> 
> to do what you want, you need one of:
> - milter or filter. where you can do anything you want
> - pass mail through multiple smtpd listeners. when you can "cascade"
> checks. not recommended except in a few cases...
> 
> now, what (real) problem are you trying to solve?
> (h don't tell us you want to block spam from "joe" to "joe". this has
> been discussed many times. "the" answer is to use standard checks such
> as spamhaus and only if you still get that junk should you ask for
> more...).

Reply via email to