[Linux-disciples] Exporting /var/mail
Adam Rosi-Kessel
adam at rosi-kessel.org
Thu Jul 22 23:37:50 EDT 2004
On Thu, Jul 22, 2004 at 11:02:06PM -0400, Stephen R Laniel wrote:
> The client machine already mounts its /home directory via
> NFS from the server machine. Now I've added /var/mail to the
> server's export list. Is there any reason not to mount
> /var/mail via NFS from the client machine, thereby getting
> all my email on the server and not having to bother with
> Fetchmail?
There might be a locking issue. I know some locks are preserved across
nfs and others are not. Or maybe they all work with lockd? (you'll
notice lockd runs by default when you mount an nfs share). postfix locks
mail files when it is delivering to them, you want to make sure that your
client notices the lock.
Oh yeah, see /usr/share/doc/NFS_README:
> Also, what considerations are there for file locking or other potential
> problems when running Postfix with a Netapp-style box for /var/mail
> delivery? I know that FreeBSD has broken NFS file locking (both client
> and server?) but I'm not sure if this is something Postfix can work around
> or not.
Postfix jumps several hoops in order to deal with NFS-specific
problems. Thus, Postfix on NFS is slightly less reliable than
Postfix on a local disk. That is not a problem in Postfix; the
problem is in NFS and affects other MTAs as well.
For queue locking, NFS is not an issue because you cannot share
Postfix queues with other Postfix instances.
In order to have mailbox locking over NFS you have to configure
everything to use fcntl() locks for mailbox access (or switch to
maildir style, which needs no application-level lock controls).
To turn on fcntl mailbox locks with Postfix you specify:
virtual_mailbox_lock = fcntl
mailbox_delivery_lock = fcntl
This is useful only if all mailbox access software uses fcntl()
locks.
You can also "play safe" and throw in username.lock files:
virtual_mailbox_lock = fcntl, dotlock
mailbox_delivery_lock = fcntl, dotlock
this is the mix that many applications end up using.
--
Adam Rosi-Kessel
http://adam.rosi-kessel.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20040722/d3f2285a/attachment.pgp
More information about the Linux-disciples
mailing list