log spam
Marc Lucke
marc at marcsnet.com
Fri Jun 11 13:29:52 IST 2010
and now everything becomes clear! Very clever. So in fact all I would
need to have done was to have returned "store forward <email address>"
and that would have done what I wanted.
I was looking for a way to combine milter-greylist with fail2ban - i.e.
send me spam and you get banned for 4 hours (in my example) instead of
told do go away for 5 minutes. I've decied to turn milter-greylist off
altogether and use fail2ban on a "you abuse me, I block you" basis
rather than assume everyone's the enemy to begin with. milter-greylist
has the lag, but too (lol) it was pretty successful and I like some good
and varied spam samples to feed to SA.
fail2ban is a poor name. So far it hasn't failed to ban anything (boom
boom) :)
Julian Field wrote:
> 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
>
More information about the MailScanner
mailing list