[Mimedefang] sendmail 8.13.0
    David F. Skoll 
    dfs at roaringpenguin.com
       
    Mon Jun 21 15:06:21 EDT 2004
    
    
  
On Mon, 21 Jun 2004, Matthew Schumacher wrote:
[SOCKETMAP]
> It allows you to have sendmail connect to a daemon and ask if the email
> address is valid or not.
Actually, it's far more than that.  You can implement *any* Sendmail map
with a daemon, including mailertable, access_db, virtusertable, ...
> I'm not sure how mimedefang would use this.... David, what is
> mimedefangs role in this?
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.
Regards,
David.
    
    
More information about the MIMEDefang
mailing list