Re: Best place to filter spam (x-original-to, no_address_mappings)

2016-11-22 Thread Ian Zimmerman
On 2016-11-21 14:27, @lbutlr wrote:

> It’s unclear why you are doing this, but if you want to run SA after
> delivery then the time to do that is in your LDA. *HOW* to do that,
> depends on your LDA. If you are using dovecot, then you can call SA
> from sieve. If not, you can setup procmail as an LDA (or others), and
> call SA from there.

I don't currently use it, but Exim has a "transport filter" feature
where a process is inserted in a pipeline before delivery, running with
the creds of the target user.  _Maybe_ postfix has similar.

-- 
Please *no* private Cc: on mailing lists and newsgroups
Personal signed mail: please _encrypt_ and sign
Don't clear-text sign: http://cr.yp.to/smtp/8bitmime.html


Re: Best place to filter spam (x-original-to, no_address_mappings)

2016-11-21 Thread @lbutlr
On Nov 18, 2016, at 10:18 PM, MRob  wrote:
> I am looking at a system where SpamAssassin is called out from the delivery 
> agent. I know there will be a difference here in terms of the envelope 
> information but I'm not familiar enough to know the pitfalls of this versus 
> calling SA from the postfix content_filter.

It’s unclear why you are doing this, but if you want to run SA after delivery 
then the time to do that is in your LDA. *HOW* to do that, depends on your LDA. 
If you are using dovecot, then you can call SA from sieve. If not, you can 
setup procmail as an LDA (or others), and call SA from there.

A quick google on setting up SA with procmail or sieve or maildrop should lead 
to profit.

(I use procmail, but do not recommend it as it has ceased active development. 
Still works fine, but maildrop is probably a better choice).




Re: Best place to filter spam (x-original-to, no_address_mappings)

2016-11-21 Thread MRob

Can anyone help with this please?

On 2016-11-18 21:18, MRob wrote:

Hello,

I posted this question to the Postfix list and it occurred to me that
the SA community could be just as (or more) informative:

I am looking at a system where SpamAssassin is called out from the
delivery agent. I know there will be a difference here in terms of the
envelope information but I'm not familiar enough to know the pitfalls
of this versus calling SA from the postfix content_filter.

Specifically, I believe it's recommended to call SA in context of
receive_override_options=no_address_mappings but this wouldn't be the
case when we are in the delivery agent I think. What are the effects
of this?

Also, if it's possible to have LMTP send the original envelope sender
(x-original-to?), would that help? And is that possible yet in the
newest version of Postfix?


Re: Best place to filter spam (x-original-to, no_address_mappings)

2016-11-19 Thread Ian Zimmerman
On 2016-11-18 21:18, MRob wrote:

> I am looking at a system where SpamAssassin is called out from the 
> delivery agent. I know there will be a difference here in terms of the 
> envelope information but I'm not familiar enough to know the pitfalls of 
> this versus calling SA from the postfix content_filter.
> 
> Specifically, I believe it's recommended to call SA in context of 
> receive_override_options=no_address_mappings but this wouldn't be the 
> case when we are in the delivery agent I think. What are the effects of 
> this?

I do a similar thing, but with Exim.

I preserve the envelope information by configuring Exim to insert
Return-Path and X-Envelope-To headers.

Any way you can do this with Postfix is probably quite specific to that
MTA.

-- 
Please *no* private Cc: on mailing lists and newsgroups
Personal signed mail: please _encrypt_ and sign
Don't clear-text sign: http://cr.yp.to/smtp/8bitmime.html


Best place to filter spam (x-original-to, no_address_mappings)

2016-11-18 Thread MRob

Hello,

I posted this question to the Postfix list and it occurred to me that 
the SA community could be just as (or more) informative:


I am looking at a system where SpamAssassin is called out from the 
delivery agent. I know there will be a difference here in terms of the 
envelope information but I'm not familiar enough to know the pitfalls of 
this versus calling SA from the postfix content_filter.


Specifically, I believe it's recommended to call SA in context of 
receive_override_options=no_address_mappings but this wouldn't be the 
case when we are in the delivery agent I think. What are the effects of 
this?


Also, if it's possible to have LMTP send the original envelope sender 
(x-original-to?), would that help? And is that possible yet in the 
newest version of Postfix?