Unix file semantics say that the APPEND is atomic. So, adding an address to the end of the automatic whitelist containing comments and a date and time is not a problem. You just dump something on the end of a file.
The larger problem is deleting stuff from a file "hot" (while mail reception is possible). If you want to "age out" old entries, I think the best way to do it is to keep one confirm-append file for each certain time period (say, for each month). Then, at some point you just delete the oldest file. So, for example, you might have 13 files (one for each of the past 13 months), and you just delete the oldest one. Of course, in the evolution of TMDA, it might be helpful NOW to go to a more general model (file locking?), which will make things easier in the future. Another possibility to keep things simple is to just keep two confirm-append files. An incoming mail causes both files (if they exist) to be checked. Let's call these files A and B. Let's say that normally only A exists. Here would be the processing steps. For incoming mail: If "A" exists, scan it for whitelist addresses. If "B" exists, scan it for whitelist addresses. For deleting old entries from the list: Create file "B". For each address in "A", if you don't want to delete it, copy it into "B". Close A and B. Delete B. Anyway, there may be some clever semantics to allow deletion. Dave. > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On > Behalf Of Andrew > Sent: Thursday, December 05, 2002 11:26 PM > To: [EMAIL PROTECTED] > Subject: Re: FEATURE REQUEST: Time stamp additions to whitelists > > > I'm wondering if having timestamps in the address lists would be handy > for expiring entries in the lists. Here is an example scenario: > > You have two whitelist files. One file is manually updated with > addresses of people you know and want to correspond with. The second > file is auto-updated using the CONFIRM-APPEND option. This second file > tends to fill up over time with addresses of people you corresponded > with only once and may never hear from again. With timestamps in the > list, you could write a script to go through the file and remove any > entry with a timestamp greater than a certain age. You could write the > script to do as much or as little checking as you want before removing > an entry. Any address that you know you want to keep you would move to > the first whitelist file. > > To make this useful, TMDA would have to update the timestamp whenever > mail was received from or sent to an address in a list file. I don't > know if it's convenient for TMDA to do this or if it would have to go > out of its way. This behaviour could be restricted only to the list > files you want with a new configuration option. > > Opinions anyone? > > Andrew > > > Jason R. Mastaler wrote: > > Roderick Mann <[EMAIL PROTECTED]> writes: > > > > > >>It would be handy if any automatic addition of an address to a list > >>would put a comment on the same line indicating the time and date of > >>the addition, along with why it was added (i.e. because of > >>tmda-pending release, or the user confirmed, etc.) > > > > > > This information is already recorded in LOGFILE_INCOMING, no? > > > > > >>Can these files take a comment on the same line as an address? > > > > > > Yes, see http://tmda.net/config-filter.html. But not in conjunction > > with the auto-database flags. > > > > _____________________________________________ > tmda-users mailing list ([EMAIL PROTECTED]) > http://tmda.net/lists/listinfo/tmda-users > _____________________________________________ tmda-users mailing list ([EMAIL PROTECTED]) http://tmda.net/lists/listinfo/tmda-users
