[Mimedefang] Storing "per SMTP session" data (?)

Jan Pieter Cornet johnpc at xs4all.nl
Mon Mar 9 19:08:00 EDT 2009


On Sat, Mar 07, 2009 at 08:39:47AM -0500, David F. Skoll wrote:
> Andrzej Adam Filip wrote:
> 
> > 1) Which directory would you suggest for keeping "per connecting ip"
> >    information in filter_relay and later?
> 
> Any directory in the current working directory.  You can call it "state",
> for example.

Err... "per IP" isn't the same as "per connection".

The trouble with "per IP" is that access to that may be concurrent.
There may well be 2 connections from the same IP, both active at the
exact same time.

If you really want to do that -- handle per IP connections -- I'd
suggest to use a real database, preferably one that has an "inet" type,
like postgresql. You may even want to consider storing IPv6 info per /64
and possibly IPv4 info per /24, depending on your needs.

If, however, you really meant "per SMTP session" information, for
example to remember state between "RCPT" commands, then David's
suggestions are perfect. Particularly, do look at "MAINTAINING STATE" in
the manual.

-- 
Jan-Pieter Cornet <johnpc at xs4all.nl>
!! Disclamer: The addressee of this email is not the intended recipient. !!
!! This is only a test of the echelon and data retention systems. Please !!
!! archive this message indefinitely to allow verification of the logs.  !!



More information about the MIMEDefang mailing list