Victor Duchovni schrieb: > On Sat, Apr 04, 2009 at 07:01:08PM +0200, Robert Schetterer wrote: > >>> Here's my suggestion: >>> >>> - Create a second Postfix instance in the same file-system. >>> - Run a cron job to move (rename(2)) messages from the HOLD queue >>> of the main instance into the deferred queue of the second instance, >>> carefully respecting the hash_depth of each directory. >>> - In the second instance, deliver all mail via a suitable daemonized >>> SMTP server or via pipe(8) script. The daemon or script will be >>> the entry point into a quarantine system that eventualy expires >>> unclaimed mail, generates reports and allows other administrative >>> or user actions as you see fit. >>> >>> This means that "FILTER transport:nexthop" is perhaps a better choice than >>> "HOLD", but milters may not be able to express this action... >>> >>> I am not aware of an open-source quarantine add-on for Postfix. >> Hi Victor, this sounds very complicated > > Yes, I am proposing a robust, comprehensive system that could serve a > variety of needs. > >> i was thinking more about a cron cript like this ( surly modified to the >> hold issue ) > > What do mail-daemon messages have to do with junk placed in the HOLD > queue by a milter
you missunderstood it was only meant as a principle example script which i used times ago to delete mailerdaemon mails, it may be modified to fit new needs for sure mailer daemon has nothing to do with junk and milter my intention is to store junk mails in hold in a dir in filesystem and clean up hold by script, nothing more > >> TMPFILE=/tmp/clean.queue.$$ >> DEFERDIR=/var/spool/postfix/deferred >> >> # collect the filenames >> mailq |grep MAILER-DAEMON | cut -f1 -d ' ' > $TMPFILE >> >> for DEFERFILE in `cat $TMPFILE` >> do >> FILEPATH=`find $DEFERDIR -name $DEFERFILE` > > This is subject to race-conditions, because queue-ids can be re-used. > -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria