Re: [courier-users] locking $HOME (~) directories (temporarily deferring delivery)
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. pgp3VRWsr9z0S.pgp Description: 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
Re: [courier-users] locking $HOME (~) directories (temporarily deferring delivery)
Hi Sam, Thanks for your reply, I'm sorry I haven't noticed it until just recently. I do not seem to be properly getting mail from the sourceforge mailing lists. I've had to go through and read the lists web archives to get anything. I'm glad that you're going to correct either courier or the courier documentation so the behavior regarding the sticky bit is consistent. 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. Best regards, -Fred -- 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
Re: [courier-users] locking $HOME (~) directories (temporarily deferring delivery)
Fred Drueck writes: However, on both Debian and Ubuntu (also Arch Linux, using a package built from the AUR), even with courier-maildrop installed, it does not appear that maildrop is invoked by default to deliver local mail. Either that, or when maildrop is invoked in this manner, it *will* deliver mail to a user home directory with the sticky bit set. The default Courier configuration does not use maildrop. The courier online documentation suggests this should not be the case: http://www.courier-mta.org/local.html > Output module > > setuids to the user indicated in the host parameter. > If $HOME has the sticky bit set, defers the mail. That's going to be corrected. there are 2 points I'm trying to make in pointing this out, I guess: 1) the documentation is confusing, especially since courier-mta appears to differ from qmail in it's default behavior 2) I would welcome suggestions on how to temporarily defer mail delivery for one particular user, for both local and remote mail deliveries. You could set DEFAULTDELIVERY to something like this: DEFAULTDELIVERY='| test -k $HOME && echo "Unavailable" && exit 1; exit 0 ./Maildir' DEFAULTDELIVERY is the default contents of $HOME/.courier, and can contain multiline delivery instructions. Watch out for variables in the courierd config file. It is sourced as a shell script, hence the apostrophes. pgpsPRluxhRrl.pgp Description: 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/zohomanageengine___ courier-users mailing list courier-users@lists.sourceforge.net Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users