[prev in list] [next in list] [prev in thread] [next in thread] 

List:       courier-users
Subject:    Re: [courier-users] locking $HOME (~) directories (temporarily deferring delivery)
From:       Sam Varshavchik <mrsam () courier-mta ! com>
Date:       2016-07-15 1:27:10
Message-ID: cone.1468546030.932361.3148.1004 () monster ! email-scan ! com
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Fred Drueck writes:

> I'm glad that you're going to correct either courier or the courier
> documentation so the behavior regarding the sticky bit is consistent.

The online documentation was updated.

> Ultimately, I have decided to forego locking home directories and have
> rewritten my admin scripts to make atomic changes to .courier files,
> (write tempfile, then mv tempfile to replace the current .courier
> file) which should prevent me from having to lock home directories.

This is the correct approach in any case. A locking-based strategy should  
always be the last resort, only if no other alternatives are possible.  
Locking is fragile. If the process gets killed, the directory remains  
locked, interrupting mail delivery.

A file rename-based solution is the same general approach for implementing a  
wide variety of critical functions, that has been battle-tested for decades.  
The kernel guarantees that the file rename will either succeed, or not  
succeed. There is no compromise. Renaming to replace an existing file is  
guaranteed to either succeed or not succeed, and whatever is the outcome  
either the original file remains in place, or the new file renamed in place  
of the original file remains, and at all times the pathname resolves to  
either the old or the new file.

This is the basis for all maildir-based operations, where mail integrity is  
critical. sqwebmail does this to update the .mailfilter file, that maildrop  
reads. The process of inserting a new mail into the mail queue is also based  
on renaming a file, as an atomic operation that commits the new mail into  
the mail queue. The list goes on. This is how these things must be done.

[Attachment #5 (application/pgp-signature)]

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev

_______________________________________________
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic