[Rspamd-Users] Custom Ratelimit help
George Asenov
george.asenov at wpxhosting.com
Thu Aug 18 12:07:29 UTC 2022
Hello,
We now have one simple and old setup with postfix + milter graylist as
non-smtp and smtp-milter which was working ok for us using the "bug"
that milter protocol does not support reject on non-smtp milter
connections. Because when postfix receive reject on non-smtp milter it
return the message in the queue.
So when some user send many emails using php mail() milter greylist
count them and when exceed the threshold (30 mails per 30 min)it return
the message to the queue and after 30 minutes it send another 30 and so on.
When the account is compromised and send spam this fill up the queue
which we monitor and act based on messages contents and headers. If the
messages are normal mass mail we leave them and they are send on batches
of 30 per 30 minutes.
Now we are looking forward to remove spamassassin and milter greylist
and replace them with RSPAMD.
But we are struggling to do something similar with RSPAMD.
As I understand the ratelimit module can do something similar but only
with authenticated users. All that come trough non-smtp milter are accepted.
So y tried to use custom LUA script for ratelimit. With custom defined
Symbol with
task:set_pre_result('reject', 'some message')
in order to be able to reject the message. But in this case postfix just
bonce back the message to the user executed the script which is not what
we want.
The main question is how to send such response to postfix from
non-smtp-milter to return the message to the queue when the rate limit
kick in?
Thank you in advance!
--
Warm regards
George A.
WPXHosting
More information about the Users
mailing list