From: Anthony Howe
Date: 2006-08-25 11:13:55 -0400
Subject: Re: Milter Creation Question
More information..: http://www.milter.info/#Support
Tyler G. Spires wrote:
> We are now looking to restrict the messages accepted by Sendmail through
> a milter based on the results of another query to another server.
> IE the SMTP gateways will “call ahead” (passing the MAIL FROM: & RCPT
> TO: values) to our mailing list server to see if the recipient is a mail
> group (list) and check to see if the sender is allowed to post to the group.
> I was wondering if you could offer some advice on how I could easily
> build this milter. I’ve looked at the source code for milter-ahead and
> I’m sure I could come up with something, however, any advice you could
> offer would probably aid me in my task.
> We already have the daemon running that will return the status codes as
> to if the user is allowed to post or not, I just need to integrate the
> call in to a milter for sendmail.
Simple solution. No milter required. Convert your daemon to be a
socket-map server. Add a Local_checkrcpt ruleset to sendmail.mc that
will consult the socket-map passing the table name and key that is the
combined "email@example.com;firstname.lastname@example.org". This should be fairly
easy to write the ruleset.
The comments in the socket-map patch should be sufficient explanation as
to the protocol the socket-map server needs to implement:
I recently added socket-map support libsnert (yet to be released) to
provide alternative means of consult access.db or for the call-ahead-db
option, so its not that complicated.
Anthony C Howe Skype: SirWumpus SnertSoft
+33 6 11 89 73 78 AIM: SirWumpus Sendmail Milter Solutions
http://www.snert.com/ ICQ: 7116561
Copyright 2009, 2012 by SnertSoft. All rights reserved.