[Mimedefang] sendmail 8.13.0

Matthew Schumacher matt.s at aptalaska.net
Mon Jun 21 16:30:09 EDT 2004


David F. Skoll wrote:
> Actually, it's far more than that.  You can implement *any* Sendmail map
> with a daemon, including mailertable, access_db, virtusertable, ...

That is cool!!!

> MIMEDefang will allow you to define a function called filter_map
> that will be called with two arguments:  A map name, and a key.  It can
> then do whatever magic it likes to "look up" the key.
> 
> Here's an example I'm working on right now.
> 
> Sendmail config file:
> 
> 	V10/Berkeley
> 	Kmysock socket unix:/var/spool/MIMEDefang/map.sock
> 
> The MIMEDefang filter:
> 
> 	sub filter_map ($$) {
> 	    my($mapname, $key) = @_;
> 	    my $ans;
> 	    $ans = reverse($key) . " - " . reverse($mapname);
> 	    return ("OK", $ans);
> 	}
> 
> Results of a sendmail -bt test session:
> 
> 	$ /usr/sbin/sendmail -bt -C ./map.cf
> 	No local mailer defined
> 	ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
> 	Enter <ruleset> <address>
> 	> /map mysock Testing 1 2 3
> 	map_lookup: mysock (Testing 1 2 3) returns 3 2 1 gnitseT - kcosym (0)
> 
> Isn't that so cool? :-)  I defy anyone to write rules with Sendmail's .cf
> language that can reverse a string.
> 
> Of course, a non-toy example would do something real, like looking things
> up in an LDAP directory or a SQL database.
> 

I already have sendmail rules to check valid email addresses against a 
supported map backend (LDAP) so this basically a different way to do the 
same thing but would be a bit more flexible.  I wonder if their are any 
performance differences between having mimedefang doing the ldap lookup 
instead of sendmail.  Have you noticed any performance differences in 
your initial testing?

schu



More information about the MIMEDefang mailing list