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

Re: save mail



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/21/08 10:23, Stephane Durieux wrote:
> Hello,
> 
> Newbie question:
> 
> What would you recommend to save mails. (I don t think it matters but I
> use postfix, courier-imap)
> I ve heard of mail sync for email but don t wanna used this solution to
> begin.
> A backup to a disk would be good for me.
> 
> The question I wonder is :
> What happen when a cron task is launched and that a mail is about to be
> delivered.
> Is it queued again ?
> Or perhaps worse, if a mail is about to be delivered and a cron task
> (backup task) is starting

Since emails in a Maildir system are separate files, the backup task
will miss any emails delivered after tar begins.

The first thing that my backup job does is to touch(1) a lock file.
 The last thing it does is remove the lock file.

I don't directly run fetchmail from a cron job, but wrap it in a
script.  The first thing it does is check to see whether the lock
file exists, and nicely exits if it does.  Otherwise, it runs fetchmail.

> More generally, can you explain me the mecanism of locks
> 
> I use maildirs but I would like also know how to do for mailboxes

This is the beauty of Maildir.  You never have to worry about locks.

- --
Ron Johnson, Jr.
Jefferson LA  USA

ESPN makes baseball players better.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFINEnWS9HxQb37XmcRAmrzAJ47x3BDLgnoltgcysU7uZ7JyJqKcgCg4vl2
ne5vxYGP98Vv+rawPf4X8s8=
=KtPm
-----END PGP SIGNATURE-----


Reply to: