1
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
2
"http://www.w3.org/TR/html4/loose.dtd">
8
<title>Postfix and NFS</title>
10
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
16
<h1><img src="postfix-logo.jpg" width="203" height="98" ALT="">Postfix and NFS</h1>
20
<p> This question was asked on the postfix-users mailing list a
23
<blockquote> <p> Also, what considerations are there for file
24
locking or other potential problems when running Postfix with a
25
Netapp-style box for /var/mail delivery? I know that FreeBSD has
26
broken NFS file locking (both client and server?) but I'm not sure
27
if this is something Postfix can work around or not. </p> </blockquote>
29
<p> Postfix jumps several hoops in order to deal with NFS-specific
30
problems. Thus, Postfix on NFS is slightly less reliable than
31
Postfix on a local disk. That is not a problem in Postfix; the
32
problem is in NFS and affects other MTAs as well. </p>
34
<p> For queue locking within Postfix, NFS is not an issue because
35
you cannot share Postfix queues among multiple Postfix instances.
38
<p> In order to have mailbox locking over NFS, you have to configure
39
everything to use fcntl() locks for mailbox access (or switch to
40
maildir style, which needs no application-level lock controls).
43
<p> To turn on fcntl() mailbox locks with Postfix you specify: </p>
48
virtual_mailbox_lock = fcntl
49
mailbox_delivery_lock = fcntl
53
<p> Obviously, this approach is useful only if all other mailbox
54
access software also uses fcntl() locks. </p>
56
<p> You can also "play safe" and throw in <i>username</i>.lock files: </p>
61
virtual_mailbox_lock = fcntl, dotlock
62
mailbox_delivery_lock = fcntl, dotlock
66
<p> This is the combination that many applications end up using. </p>