You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by ma...@animalhead.com on 2011/03/01 15:00:05 UTC

report_safe 0 doesn't work

In my file /usr/local/etc/mail/spamassassin/local.cf there are 4  
comment lines
and 1 active line:

## SA-VINSTALL VERSION: 3.2.5
# Add your own customisations to this file.  See 'man  
Mail::SpamAssassin::Conf'
# for details of what can be tweaked.
#
report_safe 0

The active line ends with a return.  I've grepped all the  
configuration files and
directories noted in the man pages, and can see no non-comment line that
changes report_safe.

Since a recent upgrade to SA 3.3.1, SA attaches emails that it tags,  
rather
than just adding headers as the report_safe line above intends.

This complaint is similar to one sent to this forum on or about April  
1 2010.
That correspondent had to reinstall SA and the local.cf file in order  
to get
his report_safe 0 to work.  I'm lazy and hope that someone who reads  
this
will know a simpler solution.

Thanks,
cmac
www.animalhead.com


Re: report_safe 0 doesn't work

Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Wed, 2011-03-02 at 08:00 -0800, mackenna@animalhead.com wrote:
> On Mar 1, 2011, at 9:50 AM, Karsten Bräckelmann wrote:

> > > Mar  1 09:12:23.566 [68051] dbg: generic: Perl 5.010001, PREFIX=/usr/
> > > local, DEF_RULES_DIR=/usr/local/share/spamassassin, LOCAL_RULES_DIR=/
> > > etc/mail/spamassassin, LOCAL_STATE_DIR=/var/lib/spamassassin
> >   ^^^^^^^^^^^^^^^^^^^^^
> > There's a severe difference to the man-pages you just quoted.
> >
> > How did you install SA? It appears you ended up with two different
> > installations, though both being 3.3.1.
> 
> Installing SA 3.3.1 via CPAN cleared up problems from a failed attempt
> by our hosting provider to update something on the server (they never
> said exactly what), which left SA inoperative.  (It cleared up problems
> except for this one -- how SA tagged spam.)  The original SA install
> years ago was using a script from our hosting provider.

Indeed, two different installations. It appears, the man-page is the one
installed by your hosting provider, showing paths that actually are not
used life.

The correctly working executable you do use, installed via CPAN, uses
the SA default paths. That explains why it didn't clear up this problem
of report_safe -- it's non-0 by default.


> animalhead:~ $ spamassassin -D --lint 2>&1 | grep "site rules"
> Mar  2 07:33:27.529 [75068] dbg: config: using "/etc/mail/ 
> spamassassin" for site rules pre files

> So I edited etc/mail/spamassassin/local.cf to include report_safe 0.
> Probably all will be well now.
> 
> This problem may go back further than the 3.1.1 install.  I have a vague
> memory of trying to tweak some scoring coefficients years ago, without
> SA noticing those changes.

Well, you need to edit cf files in the site-config path your executable
actually uses. ;)


> Thanks very much,

Glad we've tracked down the bugger. :)


-- 
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}


Re: report_safe 0 doesn't work

Posted by ma...@animalhead.com.
On Mar 1, 2011, at 9:50 AM, Karsten Bräckelmann wrote:
> On Tue, 2011-03-01 at 09:28 -0800, mackenna@animalhead.com wrote:
>> On Mar 1, 2011, at 6:35 AM, Karsten Bräckelmann wrote:
>
>>> Since an upgrade. Sounds like the new SA installation actually  
>>> uses a
>>> different site-config dir -- and probably prefix altogether.
>>>
>>> The spamassassin(1) man page will tell you, section Configuration  
>>> Files.
>>> Note that in the same list of paths also is a version tagged one,  
>>> just
>>> in case you're looking at the old man page.
>>
>> I grepped all the files/direcs noted in SPAMASSASSIN(1) and
>> Mail::SpamAssassin::Conf(3), the former included
>>
>> /var/db/spamassassin/3.003001       in its "default" list and
>> /usr/local/etc/mail/spamassassin    in its "site-specific" list
>>      (the latter is where my local.cf with report_safe 0 is located)
>>
>>> Running spamassassin with the -D debug switch also will tell you the
>>> correct path.
>>
>> animalhead:~ $ spamassassin -D
>> Mar  1 09:12:23.566 [68051] dbg: logger: adding facilities: all
>> Mar  1 09:12:23.566 [68051] dbg: logger: logging level is DBG
>> Mar  1 09:12:23.566 [68051] dbg: generic: SpamAssassin version 3.3.1
>> Mar  1 09:12:23.566 [68051] dbg: generic: Perl 5.010001, PREFIX=/usr/
>> local, DEF_RULES_DIR=/usr/local/share/spamassassin, LOCAL_RULES_DIR=/
>> etc/mail/spamassassin, LOCAL_STATE_DIR=/var/lib/spamassassin
>   ^^^^^^^^^^^^^^^^^^^^^
> There's a severe difference to the man-pages you just quoted.
>
> How did you install SA? It appears you ended up with two different
> installations, though both being 3.3.1.
>
Installing SA 3.3.1 via CPAN cleared up problems from a failed attempt
by our hosting provider to update something on the server (they never
said exactly what), which left SA inoperative.  (It cleared up problems
except for this one -- how SA tagged spam.)  The original SA install
years ago was using a script from our hosting provider.
>
> [...]
>> Mar  1 09:12:23.605 [68051] dbg: dns: is Net::DNS::Resolver  
>> available? yes
>> Mar  1 09:12:23.605 [68051] dbg: dns: Net::DNS version: 0.66
>
> At this point, spamassassin waits for input on STDIN. Run the  
> debugging
> with lint, which uses an internal mail. The command below will grep  
> out
> the site-config directory used.
>
>   spamassassin -D --lint 2>&1 | grep "site rules"
animalhead:~ $ spamassassin -D --lint 2>&1 | grep "site rules"
Mar  2 07:33:27.529 [75068] dbg: config: using "/etc/mail/ 
spamassassin" for site rules pre files
Mar  2 07:33:27.566 [75068] dbg: config: using "/etc/mail/ 
spamassassin" for site rules dir
animalhead:~ $ sudo find /etc -name "local.cf"
/etc/mail/spamassassin/local.cf
animalhead:~ $ sudo find /usr -name "local.cf"
/usr/local/etc/mail/spamassassin/local.cf

So I edited etc/mail/spamassassin/local.cf to include report_safe 0.
Probably all will be well now.

This problem may go back further than the 3.1.1 install.  I have a vague
memory of trying to tweak some scoring coefficients years ago, without
SA noticing those changes.

> A plain 'spamassassin --lint' does not generate any warnings, right?
Right.

Thanks very much,
cmac


Re: report_safe 0 doesn't work

Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Tue, 2011-03-01 at 09:28 -0800, mackenna@animalhead.com wrote:
> On Mar 1, 2011, at 6:35 AM, Karsten Bräckelmann wrote:

> > Since an upgrade. Sounds like the new SA installation actually uses a
> > different site-config dir -- and probably prefix altogether.
> >
> > The spamassassin(1) man page will tell you, section Configuration Files.
> > Note that in the same list of paths also is a version tagged one, just
> > in case you're looking at the old man page.
> 
> I grepped all the files/direcs noted in SPAMASSASSIN(1) and
> Mail::SpamAssassin::Conf(3), the former included
> 
> /var/db/spamassassin/3.003001       in its "default" list and
> /usr/local/etc/mail/spamassassin    in its "site-specific" list
>      (the latter is where my local.cf with report_safe 0 is located)
> 
> 
> > Running spamassassin with the -D debug switch also will tell you the
> > correct path.
> 
> animalhead:~ $ spamassassin -D
> Mar  1 09:12:23.566 [68051] dbg: logger: adding facilities: all
> Mar  1 09:12:23.566 [68051] dbg: logger: logging level is DBG
> Mar  1 09:12:23.566 [68051] dbg: generic: SpamAssassin version 3.3.1
> Mar  1 09:12:23.566 [68051] dbg: generic: Perl 5.010001, PREFIX=/usr/ 
> local, DEF_RULES_DIR=/usr/local/share/spamassassin, LOCAL_RULES_DIR=/ 
> etc/mail/spamassassin, LOCAL_STATE_DIR=/var/lib/spamassassin
  ^^^^^^^^^^^^^^^^^^^^^
There's a severe difference to the man-pages you just quoted.

How did you install SA? It appears you ended up with two different
installations, though both being 3.3.1.


[...]
> Mar  1 09:12:23.605 [68051] dbg: dns: is Net::DNS::Resolver available? yes
> Mar  1 09:12:23.605 [68051] dbg: dns: Net::DNS version: 0.66

At this point, spamassassin waits for input on STDIN. Run the debugging
with lint, which uses an internal mail. The command below will grep out
the site-config directory used.

  spamassassin -D --lint 2>&1 | grep "site rules"

A plain 'spamassassin --lint' does not generate any warnings, right?


-- 
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}


Re: report_safe 0 doesn't work

Posted by ma...@animalhead.com.
On Mar 1, 2011, at 6:35 AM, Karsten Bräckelmann wrote:

> On Tue, 2011-03-01 at 06:00 -0800, mackenna@animalhead.com wrote:
>> In my file /usr/local/etc/mail/spamassassin/local.cf there are 4
>> comment lines and 1 active line:
>
>> report_safe 0
>
>> Since a recent upgrade to SA 3.3.1, SA attaches emails that it  
>> tags, rather
>> than just adding headers as the report_safe line above intends.
>
> Since an upgrade. Sounds like the new SA installation actually uses a
> different site-config dir -- and probably prefix altogether.
>
> The spamassassin(1) man page will tell you, section Configuration  
> Files.
> Note that in the same list of paths also is a version tagged one, just
> in case you're looking at the old man page.

I grepped all the files/direcs noted in SPAMASSASSIN(1) and
Mail::SpamAssassin::Conf(3), the former included

/var/db/spamassassin/3.003001       in its "default" list and
/usr/local/etc/mail/spamassassin    in its "site-specific" list
     (the latter is where my local.cf with report_safe 0 is located)


>
> Running spamassassin with the -D debug switch also will tell you the
> correct path.
>
animalhead:~ $ spamassassin -D
Mar  1 09:12:23.566 [68051] dbg: logger: adding facilities: all
Mar  1 09:12:23.566 [68051] dbg: logger: logging level is DBG
Mar  1 09:12:23.566 [68051] dbg: generic: SpamAssassin version 3.3.1
Mar  1 09:12:23.566 [68051] dbg: generic: Perl 5.010001, PREFIX=/usr/ 
local, DEF_RULES_DIR=/usr/local/share/spamassassin, LOCAL_RULES_DIR=/ 
etc/mail/spamassassin, LOCAL_STATE_DIR=/var/lib/spamassassin
Mar  1 09:12:23.566 [68051] dbg: config: timing enabled
Mar  1 09:12:23.567 [68051] dbg: config: score set 0 chosen.
Mar  1 09:12:23.569 [68051] dbg: util: running in taint mode? yes
Mar  1 09:12:23.569 [68051] dbg: util: taint mode: deleting unsafe  
environment variables, resetting PATH
Mar  1 09:12:23.569 [68051] dbg: util: PATH included '/sbin', keeping
<snip>
Mar  1 09:12:23.583 [68051] dbg: util: final PATH set to: /sbin:/bin:/ 
usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/usr/ 
local/apache2/bin:/home/sakomina/bin:/usr/local/bin/db47
Mar  1 09:12:23.605 [68051] dbg: dns: no ipv6
Mar  1 09:12:23.605 [68051] dbg: dns: is Net::DNS::Resolver  
available? yes
Mar  1 09:12:23.605 [68051] dbg: dns: Net::DNS version: 0.66

Should it say when it reads a config file?

Thanks,
cmac


Re: report_safe 0 doesn't work

Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Tue, 2011-03-01 at 06:00 -0800, mackenna@animalhead.com wrote:
> In my file /usr/local/etc/mail/spamassassin/local.cf there are 4  
> comment lines and 1 active line:

> report_safe 0

> Since a recent upgrade to SA 3.3.1, SA attaches emails that it tags, rather
> than just adding headers as the report_safe line above intends.

Since an upgrade. Sounds like the new SA installation actually uses a
different site-config dir -- and probably prefix altogether.

The spamassassin(1) man page will tell you, section Configuration Files.
Note that in the same list of paths also is a version tagged one, just
in case you're looking at the old man page.

Running spamassassin with the -D debug switch also will tell you the
correct path.


-- 
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}


Re: report_safe 0 doesn't work

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
On 01.03.11 06:00, mackenna@animalhead.com wrote:
> In my file /usr/local/etc/mail/spamassassin/local.cf there are 4 comment
> lines and 1 active line:
>
> ## SA-VINSTALL VERSION: 3.2.5
> # Add your own customisations to this file.  See 'man  
> Mail::SpamAssassin::Conf'
> # for details of what can be tweaked.
> #
> report_safe 0
>
> The active line ends with a return.  I've grepped all the configuration
> files and directories noted in the man pages, and can see no non-comment
> line that changes report_safe.
>
> Since a recent upgrade to SA 3.3.1, SA attaches emails that it tags,
> rather than just adding headers as the report_safe line above intends.

isn't the report_safe set somewhere else?
Aren't you using e.g. amavis?
-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Nothing is fool-proof to a talented fool.