procmail
[Top] [All Lists]

Re: procmail and mail file locking

2020-05-17 06:44:06


On 5/16/20 4:01 PM, Ruud H.G. van Tol wrote:

On 2020-05-16 20:59, Andrey Repin wrote:
Greetings, Robert Moskowitz!
On 5/15/20 8:57 AM, Ruud H.G. van Tol wrote:
On 2020-05-15 04:26, Robert Moskowitz wrote:

Does procmail default lock the local delivery mail file

See also https://linux.die.net/man/5/procmailrc
which mentions using lock files.

I am piping the output of a formail command into procmail.  No receipts.

It was that man page that clued me into needing to do something about
locking the access to /var/spool/mail/$USER file.

But what is the 'common' lock file name?  The examples in the above mask
the file which is the lock file.

Did you consider using IMAP?

What does IMAP have to do with this?

I think he did mean Maildir rather than mbox.

Thanks, indeed, I meant Maildir, oops.

Yes.  I was really confused there.  But I have made bigger blubbers!

I considered maildir, but I cannot be assured that I will catch all local mail deliveries.  I set up cron to just my script.  That was 'easy'.  Then I was looking at logwatch, and I see that in /etc/logwatch/conf/logwatch.conf


mailer = "/usr/local/mycron"

I did not add that, some process corrected logwatch automagically for me.  I am not comfortable if I install some other package that does outputs to mail that it would get the change and perhaps deliver in the 'default' mbox manner.

Just a little paranoia here.  So I stay with mbox and have to be concerned with file locking....


The procmailrc(5) is a good read, look for lock.

Then https://linux.die.net/man/5/procmailex
mentions examples of implicit lockfiles.
(set VERBOSE to log more details)

Some user experience with procmail and lockfiles:
https://www.techrepublic.com/article/all-the-wonders-of-procmail-part-2-lockfiles-and-nondelivering-recipes/

-- Ruud
____________________________________________________________
procmail mailing list -- procmail(_at_)lists(_dot_)rwth-aachen(_dot_)de   Procmail homepage: http://www.procmail.org/
To unsubscribe send an email to 
procmail-leave(_at_)lists(_dot_)rwth-aachen(_dot_)de
https://lists.rwth-aachen.de/postorius/lists/procmail.lists.rwth-aachen.de
____________________________________________________________
procmail mailing list -- procmail(_at_)lists(_dot_)rwth-aachen(_dot_)de   
Procmail homepage: http://www.procmail.org/
To unsubscribe send an email to 
procmail-leave(_at_)lists(_dot_)rwth-aachen(_dot_)de
https://lists.rwth-aachen.de/postorius/lists/procmail.lists.rwth-aachen.de

<Prev in Thread] Current Thread [Next in Thread>