This is a discussion on Re: [AMaViS-user] postfix delivers mail twice when amavisd-new is reloading within the Amavis User forums, part of the Anti-Spam and Anti-Virus Related Forums category; Vlada, > read_hash(\%whitelist_sender, '/etc/amavis/whitelist_sender_GENERATED'); > in my amavisd.conf and generate this file periodically from other > ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Vlada,
> read_hash(\%whitelist_sender, '/etc/amavis/whitelist_sender_GENERATED'); > in my amavisd.conf and generate this file periodically from other > sources. Then I always call /usr/sbin/amavisd-new reload > ...The F0B149C056 stayed in the queue and 14 minutes later it was really > delivered again and removed. So the mail is processed more than once, as > the log message warned me. > Previously I tried to find a way without the amavis reload: > use BerkeleyDB; > tie(%whitelist_sender, 'BerkeleyDB::Hash', > -Filename=>'/etc/amavis/whitelist.db', -Flags=>DB_RDONLY) > or die "Can't open whitelist db: $! $BerkeleyDB::Error"; > but I'm not fluent sufficiently in Perl or this way is impossible -- it > didn't work. In principle this could work, as amavisd really does a db lookup each time - but it practice it probably does not work, because to properly handling one-writer/many-readers simultaneous access to a bdb a more sophisticated interface and locking mechanism to BerkeleyDB is needed and a simple 'tie' does not offer it. One can provide replacement routines for a tie, but I don't have an example nor have ever tried it. Solutions welcome. > May I ask for how to solve my problem? (I'd really prefer the way of not > changing the distribution software or update to other than stable debian > packages.) For the moment the only truly dynamic and fast solution is to use SQL-based lookups, perhaps only for white/black list if this is all that is needed. Instead of preparing a file whitelist_sender_GENERATED, your script can update records in a database. A perfect and simple SQL database for your purpose is SQLite, which does not require any server setups, as the whole database is contained in a file. Mark ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click _______________________________________________ AMaViS-user mailing list AMaViS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/...fo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/ |