Hello,

Sorry for so many emails, but it's sorted - removing "rewrite_subject 1"
from the config does not stop the subject line from being rewritten, so
i'm done!

However, with regards to the cronjob, i'd like some intelligent
reporting if possible, so i've constructed this:

======================================================================
echo "Updating rules..." && /usr/bin/sa-update && echo "Done, now
checking config syntax..." && spamassassin --lint && echo "Done, now
restarting spamd..." && /etc/init.d/spamassassin restart && echo "Done"
======================================================================

However, if there are no updates (and sa-update exits with an exit code
of 1) i would like to print "No updates, exiting" and then exit.

So i modified it to become this:

======================================================================
echo "Updating rules..." && /usr/bin/sa-update && echo "Done, now
checking config syntax..." || echo "No updates, exiting"; exit &&
spamassassin --lint && echo "Done, now restarting spamd..." &&
/etc/init.d/spamassassin restart && echo "Done"
======================================================================

However, whether there are updates or not, the script still exits - do
you know which syntax i need to use here (i'm using bash, btw).

Thanks again,
Richard.


Richard Hobbs wrote:
> Hello,
> 
> Don't worry - i know what lint does now, but when i run it, i get this:
> 
> mail:/etc/cron.weekly# spamassassin --lint
> [25465] warn: config: failed to parse line, skipping: rewrite_subject 1
> [25465] warn: lint: 1 issues detected, please rerun with debug enabled
> for more information
> mail:/etc/cron.weekly#
> 
> But, if i remove the "rewrite_subject 1" line, it stops rewriting the
> subject line (i think)!
> 
> Any suggestions?
> 
> Thanks again,
> Richard.
> 
> 
> John D. Hardin wrote:
>> On Wed, 29 Aug 2007, Richard Hobbs wrote:
>>
>>> Would you guys also recommend putting the command "/usr/bin/sa-update"
>>> in the crontab as well?
>>>
>>> If so, should i be using any particular parameters? And how often should
>>> it be run to be worthwhile?
>> I run it weekly...
>>
>> /etc/cron.weekly/spamassassin-update:
>>   /usr/bin/sa-update && spamassassin --lint && service spamassassin restart
>>
>> --
>>  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
>>  [EMAIL PROTECTED]    FALaholic #11174     pgpk -a [EMAIL PROTECTED]
>>  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
>> -----------------------------------------------------------------------
>>   The difference is that Unix has had thirty years of technical
>>   types demanding basic functionality of it. And the Macintosh has
>>   had fifteen years of interface fascist users shaping its progress.
>>   Windows has the hairpin turns of the Microsoft marketing machine
>>   and that's all.                                    -- Red Drag Diva
>> -----------------------------------------------------------------------
>>  21 days until Talk Like a Pirate day
>>
>>
>> _____________________________________________________________________
>> This e-mail has been scanned for viruses by Verizon Business Internet 
>> Managed Scanning Services - powered by MessageLabs. For further information 
>> visit http://www.verizonbusiness.com/uk
>>
>>
> 

-- 
Richard Hobbs (Systems Administrator)
Toshiba Research Europe Ltd. - Speech Technology Group
Email: [EMAIL PROTECTED]
Web: http://www.toshiba-europe.com/research/
Tel: +44 1223 376964        Mobile: +44 7811 803377

Reply via email to