[Mimedefang] allow local aliases w/ md_check_against_smtp_server

Ron Peterson rpeterso at mtholyoke.edu
Tue Sep 21 09:07:17 EDT 2004


On Tue, Sep 21, 2004 at 09:53:36AM +0200, Jan Pieter Cornet wrote:
> On Tue, Sep 21, 2004 at 12:11:06AM -0400, Ron Peterson wrote:
> > I'd use md_check_against_smtp_server in filter_recipient.  I'd like to
> > add some local aliases, and not have md_check_against_smtp_server stomp
> > them.
> > 
> > I can easily put a wrapper around the call to to
> > md_check_against_smtp_server which would build a hash table for my
> > aliases file and check whether the recipient exists there, and if so,
> > skip the remote username check, but I'm concerned about the overhead of
> > doing this.  Can I do something more efficient?
> 
> What? You're concerned about the overhead of a single hash lookup,
> compared to the time that md_check_against_smtp_server takes anyway?
> 
> Have you tried benchmarking, to see what is faster: the hash lookup,
> or md_check_against_smtp_server? :)

Yeah, I thought about that, but it just seems silly to be reading
/etc/aliases over and over every time a new message comes in (this is a
pretty busy server, too).  It's not the hash lookup time, really, it the
file access.  It would be nice to stuff the data somewhere static, that
could be periodically refreshed.  I'm going to chew on it this morning a
bit..

-- 
Ron Peterson
Network & Systems Manager
Mount Holyoke College



More information about the MIMEDefang mailing list