[Mimedefang] Sendmail::Milter
Michiel Brandenburg
apex at xepa.nl
Tue Nov 24 14:46:04 EST 2009
David F. Skoll wrote:
>> Anyway I guess we're getting away from what the OP was asking
>> (rate-limiting with a milter) but I don't have any ideas about
>> that.
>
> Rate-limiting with a milter is not a good idea; it's very heavy-weight
> even if the milter is written in finely-honed C. You're much better off
> using the built-in Sendmail 8.14 rate-limiting facilities or even OS-level
> packet-filtering facilities.
What might be a nice tradeoff is using the socket map feature of
sendmail to hook sendmail into mimedefang that way. Dunno how that
would impact performance but it might be a nice tradeoff.
As I recall the socket map protocol is pretty lightweight but might
still be too slow, in my case it works fine even with about 1/2 mails
per sec.
---
small consept for the greetpause everyone onFriendsList would get
a greet pause of 0 sec the rest the default one set in sendmail.mc
---
# sendmail.mc
FEATURE(`access_db',`socket -T<TMPF> inet:11111 at localhost')dnl
# mimedefang config
MX_MAP_SOCKET=inet:11111 at 127.0.0.1
# mimedefang-filter
sub filter_map {
my($mapname, $key) = @_;
switch( $mapname ) {
case "access" {
my ($left, $right) = split(':', lc($key));
switch( lc($left) ) {
case "greetpause" {
if (defined onFriendsList($right)) { return ("OK", 0); }
return ("NOTFOUND", "");
}
}
}
}
}
That might work for you, ps warning do not return too much in the second
argument of the filter_map function, it will desyncronize mimedefang,
this is a known problem David made this less likely to happen when he
increased the allowed size but no check is made to see if it's too large
( around 16k should still be ok I think, check the mailing list).
--
Michiel Brandenburg
More information about the MIMEDefang
mailing list