I am using the following lines in my /etc/maildroprc to
prevent duplicate mails from delivering to the users maildir
reformail -D 8192 duplicate.cache
if ( $RETURNCODE == 0 )
exit
it is working great as long as delivery to maildir is successful
but if delivery to maildir fails due to quota limit reached
then for first time the getmail polls for the message and handovers to
maildrop
   maildrop returns proper error message saying that " maildrop: maildir
over quota"
but the duplicate.cache is updated with the message-id of the mail even if
the delivery failed
so next time getmail tries to delivery the same message maildrop returns 0
due to the entry in
duplicate.cache and getmail removes the message from server and the mail is
lost
is there anyway to update duplicate.cache only on successful delivery to the
maildir
It's not pretty, but something like this:
dotlock "duplicate.lock" {
`cp duplicate.cache duplicate.cache.new`
`reformail -D 8192 duplicate.cache.new`
if ( $RETURNCODE == 0 )
{
exit
}
cc "./Maildir"
`cp duplicate.cache.new duplicate.cache`
}
exit