Michelle, et al -- ...and then M. Brownsworth said... % % >...and then M. Brownsworth said... % >% ... % >% this message so that it can be redelivered to the user's local % >% mailbox. % > % >In some recent posts there has been talk of SA automatically (that is, in % >the default configuration) pasing over, whitelisting, or otherwise ... % > % >An alternative, I suppose, could be having SA or procmail or whatever add % >a header all your own (X-PrimeLogic-SpamTag or such) as it gets delivered ...
%
% Some good info and suggestions in your reply. What do you think of
Happy to help!
% this brute-force approach?
Hrmmm...
%
% $cf = '/etc/mail/spamassassin/local.cf';
% system("cp -p $cf ${cf}.tmp"); # Preserve original
% open(CF, ">>$cf") || die "Can't open $cf $!\n";
% flock(CF, LOCK_EX); # Lock file to prevent updates during processing
Shouldn't you lock before opening?
% print CF "all_spam_to $username";
% system("/usr/local/bin/formail -s /usr/sbin/sendmail $username <
% /var/log/spam/$file
You're just pumping it back through sendmail again, so you're having to
rely on a whitelist, but you're doing it on a username basis -- and,
meanwhile, what about any other spam that shows up while you have the
file modified?
% flock(CF, LOCK_UN);
Shouldn't you unlock after you rewrite?
% close(CF);
% rename("${cf}.tmp", $cf); # Restore original
This last bit is definitely a pain; that's almost never the right way to
go.
Why not just add a permanent rule that whitelists your special header and
then let SA add it or a following procmail rule add it (before sending
it to your quarantine) or whatnot? That seems a lot easier and more
appropriate; you're tinkering with the messages rather than your config...
%
% The routine would probably work, but it seems like a crude solution.
% But perhaps it's better than some alternatives.
I'm sure there is *some* alternative which isn't as good :-) In general,
though, I agree that it's probably too crude.
%
% .\\ichelle
HTH & HAND
:-D
--
David T-G * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
msg05866/pgp00000.pgp
Description: PGP signature
