Re: Duplicate emails

Mathias Bauer <[email protected]> Thu, 23 Oct 2014 22:18:25 +0200
Newsgroups gmane.mail.procmail
Message-ID <[email protected]>
* Mathias Bauer wrote on Thu, 23 Oct 2014, at 20:59 (+0200):
> * Christopher P. Lindsey wrote on Thu, 23 Oct 2014, at 09:22 (-0500):
> > > On Oct 22, LuKreme wrote:
> >
> > > :0c
> > > /backups/imap.backups
> > >
> > > If that fails, the duplicate message falls through.
> > >
> > > Is there anyway to trap that so that a duplicate is not
> > > generated if the write of the copy fails?
> >
> > You could add an error-check right below it:
> >
> >    :0e
> >    /dev/null
>
> This is logically useless.  It is also a dangerous
> "error-check" because there is no message backup *and*
> processing the rcfile continues which may cause further errors.

Hm, I should have figured out that correctly:

If there is no error at writing /backups/imap.backups the else
recipe (":0e ...") will be ignored.  You have a backup and all is
fine.  Processing of the rcfile will continue.

But if there is an error at delivering to /backups/imap.backups
the else recipe will be triggered and the mail will be written to
/dev/null.  The rcfile processing also will stop in this case
because the mail has been delivered.  The else recipe, a
delivering recipe, is found to match.  This means: you have no
backup (because of the error) and the mail is lost, too (in
/dev/null)!

> Do not do it this way.

This still holds :-)

Regards,
Mathias

-- 
CAcert Assurer - See http://www.CAcert.org for details or ask me
GnuPG/OpenPGP: B100 5DC4 9686 BE64 87E9 0E22 44C3 983F A762 9DE8

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
[email protected]
http://mailman.rwth-aachen.de/mailman/listinfo/procmail
signature.asc (application/pgp-signature, 455 B)
-----BEGIN PGP SIGNATURE-----

iQEcBAEBCgAGBQJUSWKRAAoJEAC+R9yZE+vYQrcH/3n9eL3Nybfg5hNc5BulD1fK
psO2evVxuDecr8Bp2ZoHBLsYBuICfhYDzp9Df9HCSVKE/bvBhWtfWlsQwyqdh6qv
O2yE7eOwEi8nZ9dYy9Upq7WPxOX/b1qD4z4jHd58bj0anoDdOI38jv1KToAgS4KH
lmRbs2Z3OwxmziyFUDMPgxtEkahamdN1khpWSLHghxitd8LrgtnrhrdFFLgQBPnx
euEWYqHIaE2cUbKxvuH0gzVhKmxVCbtnnbqU+yNyHFT++aKb3UGukmJWS8VGkEvV
Nnzm1mn6wONixsHnjWq6AMOxyts7fKTyEiJh5LkvTiS2XKunn/kuRNsbgXOY1/E=
=PBsm
-----END PGP SIGNATURE-----