Re: BCC Rule and Subject change for specific rule

2021-01-04 Thread Giovanni Bechis
On Mon, Jan 04, 2021 at 05:23:30PM -0800, John Hardin wrote:
> On Mon, 4 Jan 2021, Joey J wrote:
> 
> > If I'm understanding things correctly, there is a way for me to BCC spam
> > messages which lets say score 10 and send a BCC to an email address, but
> > I'm trying to do it within only 1 rule, as well as modify the subject.
> >
> > What I don't want is a BCC sent for every messages which is scored a 10,
> > but only the specific rule.
> >
> > Is there a way for me to accomplish this set of actions?
> 
> You can't BCC the message within SpamAssassin, as SA only scores messages. 
> The MTA or glue layer (what ties SA into your MTA) is what determines 
> *delivery* of the message based on SA's score.
> 
> Potentially, your MTA or glue layer could be configured to look for a 
> specific scored rule name appearing in the header that lists rule hits and 
> if found deliver the message to another destination.
> 
> But specifically how to do that depends on your MTA and/or your glue. What 
> are you using?
> 
> I'm pretty sure SA only allows setting the subject tag by language, not 
> based on rule hits. You may beable to modify the subject in the MTA/glue 
> at the same point you do the extra delivery.
> 
Starting from 3.4.3 you can add a prefix to the email subject like that:
header  FROM_ME From:name =~ /Me/
subjprefix  FROM_ME [From Me]

 Giovanni


signature.asc
Description: PGP signature


Re: BCC Rule and Subject change for specific rule

2021-01-04 Thread Bill Cole

On 4 Jan 2021, at 20:49, Joey J wrote:


Thanks for the follow up.

I understand what you are saying.
This is SA within ProxMox Mail gateway, I added my custom rule via SA 
which

is working, just this additional function.


So this is really a question for Proxmox experts. There seems to be a 
user forum at https://forum.proxmox.com/#proxmox-mail-gateway.4 where 
you may find help specific to Proxmox.


In general, the way to handle messages differently based on specific SA 
test hits is to have whatever is calling SA look for the special rule 
name(s) in the list of hits returned by SA and change the handling based 
on what is found. Depending on how exactly the "glue" (e.g: a milter, a 
proxy filter, or a delivery filter) operates, that can mean examining a 
parsed rule list in the glue layer itself or examining a header added by 
the glue layer in the MTA or even downstream from the MTA in the 
delivery path.


--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire


Re: BCC Rule and Subject change for specific rule

2021-01-04 Thread Joey J
Thanks for the follow up.

I understand what you are saying.
This is SA within ProxMox Mail gateway, I added my custom rule via SA which
is working, just this additional function.

On Mon, Jan 4, 2021 at 8:23 PM John Hardin  wrote:

> On Mon, 4 Jan 2021, Joey J wrote:
>
> > If I'm understanding things correctly, there is a way for me to BCC spam
> > messages which lets say score 10 and send a BCC to an email address, but
> > I'm trying to do it within only 1 rule, as well as modify the subject.
> >
> > What I don't want is a BCC sent for every messages which is scored a 10,
> > but only the specific rule.
> >
> > Is there a way for me to accomplish this set of actions?
>
> You can't BCC the message within SpamAssassin, as SA only scores messages.
> The MTA or glue layer (what ties SA into your MTA) is what determines
> *delivery* of the message based on SA's score.
>
> Potentially, your MTA or glue layer could be configured to look for a
> specific scored rule name appearing in the header that lists rule hits and
> if found deliver the message to another destination.
>
> But specifically how to do that depends on your MTA and/or your glue. What
> are you using?
>
> I'm pretty sure SA only allows setting the subject tag by language, not
> based on rule hits. You may beable to modify the subject in the MTA/glue
> at the same point you do the extra delivery.
>
> --
>   John Hardin KA7OHZhttp://www.impsec.org/~jhardin/
>   jhar...@impsec.org pgpk -a jhar...@impsec.org
>   key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
> ---
>News flash: Lowest Common Denominator down 50 points
> ---
>   219 days since the first private commercial manned orbital mission
> (SpaceX)
>


-- 
Thanks!
Joey


Re: BCC Rule and Subject change for specific rule

2021-01-04 Thread John Hardin

On Mon, 4 Jan 2021, Joey J wrote:


If I'm understanding things correctly, there is a way for me to BCC spam
messages which lets say score 10 and send a BCC to an email address, but
I'm trying to do it within only 1 rule, as well as modify the subject.

What I don't want is a BCC sent for every messages which is scored a 10,
but only the specific rule.

Is there a way for me to accomplish this set of actions?


You can't BCC the message within SpamAssassin, as SA only scores messages. 
The MTA or glue layer (what ties SA into your MTA) is what determines 
*delivery* of the message based on SA's score.


Potentially, your MTA or glue layer could be configured to look for a 
specific scored rule name appearing in the header that lists rule hits and 
if found deliver the message to another destination.


But specifically how to do that depends on your MTA and/or your glue. What 
are you using?


I'm pretty sure SA only allows setting the subject tag by language, not 
based on rule hits. You may beable to modify the subject in the MTA/glue 
at the same point you do the extra delivery.


--
 John Hardin KA7OHZhttp://www.impsec.org/~jhardin/
 jhar...@impsec.org pgpk -a jhar...@impsec.org
 key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
---
  News flash: Lowest Common Denominator down 50 points
---
 219 days since the first private commercial manned orbital mission (SpaceX)


BCC Rule and Subject change for specific rule

2021-01-04 Thread Joey J
Hello All,

If I'm understanding things correctly, there is a way for me to BCC spam
messages which lets say score 10 and send a BCC to an email address, but
I'm trying to do it within only 1 rule, as well as modify the subject.

What I don't want is a BCC sent for every messages which is scored a 10,
but only the specific rule.

Is there a way for me to accomplish this set of actions?

Thanks!

-- 
Thanks!
Joey