Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] mx-syncing

2005-06-09 by Fredrik Nyberg DC

manu@... wrote:
> Fredrik Nyberg DC <nba@...> wrote:
> 
> 
>>>Not yet, but you can write it. That would be simple: a command to ask a
>>>peer to dump the whole database. 
>>
>>OK, I figured as much, just wanted to check that I don't start writing
>>code that exists. I'll look into it.
> 
> 
> See in sync.c. The current commands are
> add, del, help, quit
> 
> You can add two commands:
> dump greylist
> dump whitelist
> 
> That would perform a text dump. The easier was is probably to cat the
> dump file. You can also do a dump, but that would require adding locking
> logic for that (see dump.c)
> 

I'm working on a prototype, I'm using 'sync' to dump the entire textfile
with proper locking. However, I'll have to think about race-conditions a
bit, since I was thinking of locking _all_ the peers for the sync to
ensure that the databases are not flushed during the update. The peer
that is out of sync would then have to have some algortihm to decide
which database from the other peers it wants (oldest entry, newest
entry, most entries, etc) since the databases are not guaranteed to be
in sync (imagine a powerout in the server-room). I'll probably need some
kind of timeout for the actual transfer, too.

Thinking-cap turn-on.

Cheers,
Fredrik Nyberg

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.