log spam

Julian Field MailScanner at ecs.soton.ac.uk
Fri Jun 11 09:33:55 IST 2010


In addition to what John told you, you can't use Custom Functions like 
this. A Custom Function takes the message object as its parameter, and 
returns a string (or number) giving the value you want for this 
MailScanner.conf setting for this message. So in "Spam Actions =", a 
Custom Function could return something like "store forward 
wibble at foobar.com". Of course a Custom Function can have side effects 
such as extra logging, but fundamentally it is just a way to calculate 
the value of a MailScanner.conf setting programmatically. It isn't an 
additional Spam Action, which is what you are trying to do with it.

It's all a whole lot simpler than you are imagining.

Jules.

On 11/06/2010 07:50, Marc Lucke wrote:
> /etc/MailScanner/MailScanner.conf
> Spam Actions = &logspam store forward <email address>
>
> /usr/lib/MailScanner/MailScanner/CustomConfig.pm
> sub Initlogspam {};
> sub Endlogspam {};
> sub logspam {
>  my($message) = @_;
>  MailScanner::Log::InfoLog("MailScanner: spam: ".$message->{clientip});
> };
>
> this doesn't work.  Complains about @  If I put &logspam at the end, 
> it gets ignored.
>
> I want to log the ip address of the person sending me spam, store the 
> message and then forward it to my spam box.  Can I have my cake and 
> eat it to?  If so, how?
>
>
> Thanks in advance
> Marc

Jules

-- 
Julian Field MEng CITP CEng
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store

Need help customising MailScanner?
Contact me!
Need help fixing or optimising your systems?
Contact me!
Need help getting you started solving new requirements from your boss?
Contact me!

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
Follow me at twitter.com/JulesFM and twitter.com/MailScanner


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the MailScanner mailing list