Re: Formatting of SA score in Subject?

2016-11-29 Thread MI




$sa_spam_subject_tag = '*** Spam (_SCORE_) *** ';

which produces a format like:

*** Spam (5.124) ***  Regrow Thicker, Longer, Stronger, Healthier Hair



Thanks, but that doesn't seem to be "working". There is no padding as should be 
produced by "_SCORE(0)_" or "_SCORE( )_". Without padding, the spams cannot be sorted 
by score, which is what we are after.


MI


Re: Formatting of SA score in Subject?

2016-11-29 Thread Admin Beckspaced




And this one rewrites the subject literally with "[SPAM _SCORE(0)_] 
...", as Jeff already said:


# grep -r SCORE /etc/spamassassin/ /etc/amavis/
/etc/spamassassin/local.cf:rewrite_header subject [SPAM-t5 
_SCORE(0)_]:
/etc/amavis/conf.d/50-user:$sa_spam_subject_tag = '[SPAM 
_SCORE(0)_] ';



Has anyone got this score formatting working with Amavis?



I got score formatting working, but without any 0

I'm running it on OpenSUSE 42.1 and in /etc/amavisd.conf

$sa_spam_subject_tag = '*** Spam (_SCORE_) *** ';

which produces a format like:

*** Spam (5.124) ***  Regrow Thicker, Longer, Stronger, Healthier Hair

greeting
Becki


Re: Formatting of SA score in Subject?

2016-11-29 Thread MI

Has anyone found a solution for this?

I have tried various combinations of "$sa_spam_subject_tag" in 
/etc/amavis/conf.d/..., and "rewrite_header Subject" in /etc/spamassassin/local.cf, 
but nothing works (I have restarted amavis between the tests):


All these do not rewrite the subject at all:

# grep -r SCORE /etc/spamassassin/ /etc/amavis/
/etc/spamassassin/local.cf:rewrite_header Subject [SPAM-t1 _SCORE( )_]:
/etc/amavis/conf.d/50-user:$sa_spam_subject_tag = undef; #'[SPAM _SCORE_] ';

# grep -r SCORE /etc/spamassassin/ /etc/amavis/
/etc/spamassassin/local.cf:rewrite_header subject [SPAM-t2 _SCORE( )_]:
/etc/amavis/conf.d/50-user:$sa_spam_subject_tag = undef; #'[SPAM _SCORE_] ';

# grep -r SCORE /etc/spamassassin/ /etc/amavis/
/etc/spamassassin/local.cf:rewrite_header subject [SPAM-t3 _SCORE( )_]:
/etc/amavis/conf.d/50-user:$sa_spam_subject_tag = ''; #'[SPAM _SCORE_] ';

# grep -r SCORE /etc/spamassassin/ /etc/amavis/
/etc/spamassassin/local.cf:rewrite_header subject [SPAM-t4 _SCORE(0)_]:
/etc/amavis/conf.d/50-user:$sa_spam_subject_tag = undef; #'[SPAM _SCORE_] ';

And this one rewrites the subject literally with "[SPAM _SCORE(0)_] ...", as Jeff 
already said:


# grep -r SCORE /etc/spamassassin/ /etc/amavis/
/etc/spamassassin/local.cf:rewrite_header subject [SPAM-t5 _SCORE(0)_]:
/etc/amavis/conf.d/50-user:$sa_spam_subject_tag = '[SPAM _SCORE(0)_] ';


Has anyone got this score formatting working with Amavis?




Re: Formatting of SA score in Subject?

2016-11-03 Thread Indunil Jayasooriya
On Fri, Nov 4, 2016 at 3:18 AM, Jeff Morris  wrote:

> On 11/3/2016 11:15 AM, Gregory Sloop wrote:
>
>
>
>
>
>
>
>
>
>
>
>
>
> *D> Am 02.11.2016 um 23:58 schrieb Jeff Morris: >> When I asked before, it
> was suggested that I change "_SCORE_" to >> "_SCORE(0)_", however that did
> not work, it caused the literal string >> "_SCORE(0)_" to be inserted into
> my subject lines, rather than the >> formatted score being substituted. >>
> Is there any way to do this? D> Not with $sa_spam_subject_tag, but
> apparently with spamassassin: *D> https://spamassassin.apache.
> org/full/3.0.x/dist/doc/Mail_SpamAssassin_Conf.html#template_tags
> 
>
> I believe Amavis ignores all subject tagging settings from SA. Thus the
> only way to set SA tagging options if you use Amavis is to use Amavis
> specific settings.
>
>
> Exactly, and that's the problem that I'm running in to, anything I put in
> my Spamassassin config gets overridden when Amavis calls Spamassassin.
>
>


 https://wiki.apache.org/spamassassin/IntegratedInPostfixWithAmavis


* got the below lines from above URL (Pls check I have NOT done it )*

Go to /etc/mail/spamassassin and edit local.cf. My file looks like this.

Be sure to doublecheck this options with amavisd.conf. If one of these
options is in amavisd.conf, the one in local.cf will not be used.

# Add your own customisations to this file.  See 'man
Mail::SpamAssassin::Conf'# for details of what can be tweaked.## How
many hits before a message is considered spam.required_hits
5.0# Whether to change the subject of suspected spamrewrite_subject
 0# Text to prepend to subject if rewrite_subject is
usedsubject_tag *SPAM*# Encapsulate spam in an
attachmentreport_safe 1









> Does Amavis pass the contents of $sa_spam_subject_tag directly to
> Spamassassin? If so, I would think I would be able to put "_SCORE(0)_" and
> have it work, since the Spamassassin docs say that's supported, yet it
> doesn't work. Perhaps my version of Spamassassin doesn't support that? I'm
> running Spamassassin 3.4.0-2.
>
>


-- 
cat /etc/motd

Thank you
Indunil Jayasooriya
http://www.theravadanet.net/
http://www.siyabas.lk/sinhala_how_to_install.html   -  Download Sinhala
Fonts


Re: Formatting of SA score in Subject?

2016-11-03 Thread Damian
Am 02.11.2016 um 23:58 schrieb Jeff Morris:
>
> When I asked before, it was suggested that I change "_SCORE_" to
> "_SCORE(0)_", however that did not work, it caused the literal string
> "_SCORE(0)_" to be inserted into my subject lines, rather than the
> formatted score being substituted.
>
> Is there any way to do this? 

Not with $sa_spam_subject_tag, but apparently with spamassassin:

https://spamassassin.apache.org/full/3.0.x/dist/doc/Mail_SpamAssassin_Conf.html#template_tags


Re: Formatting of SA score in Subject?

2016-11-03 Thread Jeff Morris

On 11/2/2016 8:19 PM, Indunil Jayasooriya wrote:


On Thu, Nov 3, 2016 at 4:28 AM, Jeff Morris > wrote:



I asked this question a few months ago, but still haven't found a
solution, so thought I'd try again.

I currently have the following line in my amavisd.conf:

 $sa_spam_subject_tag = '[SPAM: _SCORE_] ';



 can You try this ?

$sa_spam_subject_tag = '[SPAM: _(0)SCORE_] ';


Same thing as with '[SPAM: _SCORE(0)_] ', it causes the literal string 
'[SPAM: _(0)SCORE_] ' to be inserted into the subject, i.e. '_(0)SCORE_' 
does not get interpolated.




Re: Formatting of SA score in Subject?

2016-11-02 Thread Indunil Jayasooriya
On Thu, Nov 3, 2016 at 4:28 AM, Jeff Morris  wrote:

>
> I asked this question a few months ago, but still haven't found a
> solution, so thought I'd try again.
>
> I currently have the following line in my amavisd.conf:
>
>  $sa_spam_subject_tag = '[SPAM: _SCORE_] ';
>


 can You try this ?

$sa_spam_subject_tag = '[SPAM: _(0)SCORE_] ';




>
> This causes Amavis to cause Spamassassin to rewrite my spammy Subject
> headers like this:
>
>  Subject: [SPAM: 8.353] Some Spammy Subject Here
>
> I'd like to tweak the score format here so it has a leading zero. i.e. I'd
> like to change the formatting from "%.3f" to "%06.3f", so my spammy Subject
> headers will instead look like this:
>
>  Subject: [SPAM: 08.353] Some Spammy Subject Here
>
> When I asked before, it was suggested that I change "_SCORE_" to
> "_SCORE(0)_", however that did not work, it caused the literal string
> "_SCORE(0)_" to be inserted into my subject lines, rather than the
> formatted score being substituted.
>
> Is there any way to do this?
>
>
>
>


-- 
cat /etc/motd

Thank you
Indunil Jayasooriya
http://www.theravadanet.net/
http://www.siyabas.lk/sinhala_how_to_install.html   -  Download Sinhala
Fonts


Re: Formatting of SA score in Subject?

2016-09-28 Thread @lbutlr
On Wed Sep 28 2016 00:54:12 Jeff Morris  said:
> 
> On 9/18/2016 8:32 AM, @lbutlr wrote:
>> On Fri Sep 16 2016 01:22:20 Jeff Morris   said:
>>> On 9/12/2016 4:15 PM, Jeff Morris wrote:
 On 9/4/2016 7:22 AM, @lbutlr wrote:
 Thank you! I'm not sure how I missed that when I looked for it, but 
 indeed, that works like a charm.
>>> Sigh. Well, it would appear that I spoke too soon. I *thought* it was 
>>> working like a charm; turns out I was looking at already delivered spam on 
>>> which I had already run a search and replace on the spam tag to make it 
>>> sortable. When I went back and looked at my spam folder again today I 
>>> realized that on new incoming spam, Amavisd is actually tagging with the 
>>> literal string "_SCORE(0)_". So for some reason, Amavisd doesn't recognize 
>>> this padded version of score for me. Was this a feature only added recently 
>>> perhaps? I'm running Centos7, using the amavisd-new-2.10.1-5 rpm. Any other 
>>> way to do this?
>> The _SCORE(PAD)_ is a spamassassin setting, not an amavis setting. Where are 
>> you setting it?
> 
> In amavisd.conf. The following was from my original question, looks like it 
> got snipped from the quotes above, sorry. I thought that things like this had 
> to be set in amavisd.conf, because amavis' config would override 
> spamassassin's own?


It’s my impression that the user_conf file would do this, but I cannot get 
amavisd to tag any messages (or even insert headers), though it does reject 
mail with high scores, so don’t really on me on that score.




Re: Formatting of SA score in Subject?

2016-09-28 Thread Jeff Morris

On 9/18/2016 8:32 AM, @lbutlr wrote:

On Fri Sep 16 2016 01:22:20 Jeff Morris  said:

On 9/12/2016 4:15 PM, Jeff Morris wrote:

On 9/4/2016 7:22 AM, @lbutlr wrote:

On 01 Sep 2016, at 13:18, Jeff Morris  wrote:

$sa_spam_subject_tag = sprintf( "[SPAM: %06.3f]", _SCORE_ );

Or is there a better way to do what I want? Maybe there's a token like _ZSCORE_ 
? :-)

Close.

 _SCORE(PAD)_  message score, if PAD is included and is either 
spaces or
   zeroes, then pad scores with that many spaces or 
zeroes
   (default, none)  ie: _SCORE(0)_ makes 2.4 become 
02.4,
   _SCORE(00)_ is 002.4.  12.3 would be 12.3 and 012.3
   respectively.

_SCORE(0)_ will pad with 0’s and _SCORE( )_ will pad with spaces

Thank you! I'm not sure how I missed that when I looked for it, but indeed, 
that works like a charm.

Sigh. Well, it would appear that I spoke too soon. I *thought* it was working like a 
charm; turns out I was looking at already delivered spam on which I had already run a 
search and replace on the spam tag to make it sortable. When I went back and looked at my 
spam folder again today I realized that on new incoming spam, Amavisd is actually tagging 
with the literal string "_SCORE(0)_". So for some reason, Amavisd doesn't 
recognize this padded version of score for me. Was this a feature only added recently 
perhaps? I'm running Centos7, using the amavisd-new-2.10.1-5 rpm. Any other way to do 
this?

The _SCORE(PAD)_ is a spamassassin setting, not an amavis setting. Where are 
you setting it?


In amavisd.conf. The following was from my original question, looks like 
it got snipped from the quotes above, sorry. I thought that things like 
this had to be set in amavisd.conf, because amavis' config would 
override spamassassin's own?


---

I currently have the following line in my amavisd.conf:

$sa_spam_subject_tag = '[SPAM: _SCORE_] ';

I'd just like to tweak the score format here so it has a leading zero. 
(This way in my email client I can go into my spam folder, click on the 
subject header and get the mailbox sorted by score, so I can peruse the 
low-scoring messages for possible false-positives/ham.)


Can I change this to something like the following? Or is the _SCORE_ 
token getting parsed by something outside of Perl?


$sa_spam_subject_tag = sprintf( "[SPAM: %06.3f]", _SCORE_ );

Or is there a better way to do what I want? Maybe there's a token like 
_ZSCORE_ ?




Re: Formatting of SA score in Subject?

2016-09-21 Thread @lbutlr
On Fri Sep 16 2016 01:22:20 Jeff Morris  said:
> 
> On 9/12/2016 4:15 PM, Jeff Morris wrote:
>> On 9/4/2016 7:22 AM, @lbutlr wrote:
>>> On 01 Sep 2016, at 13:18, Jeff Morris  wrote:
$sa_spam_subject_tag = sprintf( "[SPAM: %06.3f]", _SCORE_ );
 
 Or is there a better way to do what I want? Maybe there's a token like 
 _ZSCORE_ ? :-)
>>> Close.
>>> 
>>> _SCORE(PAD)_  message score, if PAD is included and is either 
>>> spaces or
>>>   zeroes, then pad scores with that many spaces or 
>>> zeroes
>>>   (default, none)  ie: _SCORE(0)_ makes 2.4 become 
>>> 02.4,
>>>   _SCORE(00)_ is 002.4.  12.3 would be 12.3 and 
>>> 012.3
>>>   respectively.
>>> 
>>> _SCORE(0)_ will pad with 0’s and _SCORE( )_ will pad with spaces
>> 
>> Thank you! I'm not sure how I missed that when I looked for it, but indeed, 
>> that works like a charm.
> 
> Sigh. Well, it would appear that I spoke too soon. I *thought* it was working 
> like a charm; turns out I was looking at already delivered spam on which I 
> had already run a search and replace on the spam tag to make it sortable. 
> When I went back and looked at my spam folder again today I realized that on 
> new incoming spam, Amavisd is actually tagging with the literal string 
> "_SCORE(0)_". So for some reason, Amavisd doesn't recognize this padded 
> version of score for me. Was this a feature only added recently perhaps? I'm 
> running Centos7, using the amavisd-new-2.10.1-5 rpm. Any other way to do this?

The _SCORE(PAD)_ is a spamassassin setting, not an amavis setting. Where are 
you setting it?




Re: Formatting of SA score in Subject?

2016-09-13 Thread Jeff Morris

On 9/4/2016 7:22 AM, @lbutlr wrote:

On 01 Sep 2016, at 13:18, Jeff Morris  wrote:

$sa_spam_subject_tag = sprintf( "[SPAM: %06.3f]", _SCORE_ );

Or is there a better way to do what I want? Maybe there's a token like _ZSCORE_ 
? :-)

Close.

 _SCORE(PAD)_  message score, if PAD is included and is either 
spaces or
   zeroes, then pad scores with that many spaces or 
zeroes
   (default, none)  ie: _SCORE(0)_ makes 2.4 become 
02.4,
   _SCORE(00)_ is 002.4.  12.3 would be 12.3 and 012.3
   respectively.

_SCORE(0)_ will pad with 0’s and _SCORE( )_ will pad with spaces


Thank you! I'm not sure how I missed that when I looked for it, but 
indeed, that works like a charm.


Re: Formatting of SA score in Subject?

2016-09-04 Thread @lbutlr
On 01 Sep 2016, at 13:18, Jeff Morris  wrote:
> 
>$sa_spam_subject_tag = sprintf( "[SPAM: %06.3f]", _SCORE_ );
> 
> Or is there a better way to do what I want? Maybe there's a token like 
> _ZSCORE_ ? :-)

Close.

_SCORE(PAD)_  message score, if PAD is included and is either 
spaces or
  zeroes, then pad scores with that many spaces or 
zeroes
  (default, none)  ie: _SCORE(0)_ makes 2.4 become 02.4,
  _SCORE(00)_ is 002.4.  12.3 would be 12.3 and 012.3
  respectively.

_SCORE(0)_ will pad with 0’s and _SCORE( )_ will pad with spaces