Re: update duplicate.cache only after successful delivery to maildir
Sam Varshavchik <[email protected]> Mon, 06 Oct 2014 08:32:46 -0400
| Newsgroups | gmane.mail.maildrop |
|---|---|
| Message-ID | <[email protected]> |
kml pryn writes:
> 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
------------------------------------------------------------------------------
Slashdot TV. Videos for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Courier-maildrop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
signature.asc
(application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJUMovuAAoJEGs6Yr4nnb8l4xMQAJDDdFettp7xxV8XflbtIMy0 2ExnY/yHZ5G6AYyjAI4fl++nHD5YJFCVgv0Wdji3vkDWaXiYNoTdQmqpUHADQsvO WrOpG4K8pIvzcnQ7KFLEczickpK9QxM4Z9kmuTjPbbUZZvIvHJ7uJFabBW/K2s6K zHHzL87QARyk2HmdTT57tI4oJWy1incHo44xyQIKeC8UzzNx0+guYj2t3/9FzKjE lGSJCDRg7taclF8B8cwjQpa4mgrvE1AReVFIoO5NWDOeL7t0DipXMKgIiHvt57C6 ZCbK3aY7GF9z78A106PK25kmzpZjqyklTM5e/vuIPw9DZ4R4a1dAJimiezc4CmTt rknR4Ro0vYIEjIwSDeG4H0WFnyYM/sP4aXgZova/9KcodhJC/F9ZR9PQOetEx/q0 FuKNSf2Cp4NDRgFVoOTc/R79CcWLjhQP4M6qsgHq+nppO/XI8lPTfEyoFGuPNdPV ulrFZEfis9m5T7q2o5Z37WpAx5NfivUVUIG8EYRTEzkSMur5rP1nLClZgd15/YD5 OjtTtP788GuGM+Z7tCeLo8Y0Pey7ZjeYVnv5AUFsX80pOwwlnE4usAYwo4yNWiD4 6lU29GqwB1IO3pC6RHom8JFzWzee/rHILIprahTSb4NTyQ1FMuAffZvQMLsfhMxB 55/q2hKBuVwU4uefhtdM =XqfB -----END PGP SIGNATURE-----