[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: getmail FAIL - lost email



On Wed, 5 Feb 2014 12:03:09 +0200
Andrei POPESCU <andreimpopescu@gmail.com> wrote:

> On Lu, 03 feb 14, 09:34:13, Celejar wrote:
> > 
> > Is there anything I can do to recover them? getmail is set to delete
> > messages on the server after successful retrieval, and it's apparently
> > doing so here, *even though the delivery is failing*!
>  
> That has not been my experience.

I just verified the behavior on my system (getmail4 4.32.0-2): if the
mbox is corrupt at getmail startup, then getmail will (correctly)
refuse to run, bailing with:

Configuration error: configuration file /home/username/.getmail/pop1
incorrect (/var/spool/mail/username: not an mboxrd file)

But if the file is good at getmail startup, and is corrupted during the
getmail run (I simulated by manually copying over a previously saved
corrupted mbox file after getmail startup), then getmail just drops the
mail, and it's apparently permanently gone:

Delivery error (mboxrd delivery 18572 error (127, mbox delivery process failed (not an mboxrd file (/var/spool/mail/username))))
  msg 4/4 (3507 bytes), delivery error (mboxrd delivery 18572 error (127, mbox delivery process failed (not an mboxrd file (/var/spool/mail/username))))

And as per my OP, getmail won't stop running because of this, and will
just brainlessly keep downloading and permanently (if the -d switch is
in use) destroying mail.

Have you tried this little experiment on your system? Make sure there's
nothing valuable in the spool, and that you can't have anything
incoming during the trial, of course ;)

> > This behavior is surely unacceptable. Is there a way to tell getmail to
> > wait to delete until successful delivery? How about a way to tell
> > getmail to abort if the mailbox is corrupt? What causes this corruption
> > (this is a laptop, no power failure or disk corruption AFAIK, etc.)?
> 
> fsck?

I'll try when I get a chance (can't fsck /var in normal operation -
will have to await a chance to go to single user mode, IIUC). But I've
never seen any trouble with the filesystem.

> > How to prevent it? Is there a better MRA / MDA the list recommends? Has
> > anyone seen this sort of thing with either getmail or other MRAs / MDAs?
> 
> I'm running getmail for years now and never had such issues. You might 
> want to report this upstream, the Author is usually very responsive on 
> the mailing list.

I will, if I don't get any further with the list.

> Kind regards,
> Andrei

Thanks,

Celejar


Reply to: