71 lines
1.9 KiB
HTML
71 lines
1.9 KiB
HTML
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
"http://www.w3.org/TR/html4/loose.dtd">
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>Postfix and NFS</title>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h1><img src="postfix-logo.jpg" width="203" height="98" ALT="">Postfix and NFS</h1>
|
|
|
|
<hr>
|
|
|
|
<p> This question was asked on the postfix-users mailing list a
|
|
while ago: </p>
|
|
|
|
<blockquote> <p> 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. </p> </blockquote>
|
|
|
|
<p> 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. </p>
|
|
|
|
<p> For queue locking within Postfix, NFS is not an issue because
|
|
you cannot share Postfix queues among multiple Postfix instances.
|
|
</p>
|
|
|
|
<p> 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).
|
|
</p>
|
|
|
|
<p> To turn on fcntl() mailbox locks with Postfix you specify: </p>
|
|
|
|
<blockquote>
|
|
<pre>
|
|
/etc/postfix/main.cf:
|
|
virtual_mailbox_lock = fcntl
|
|
mailbox_delivery_lock = fcntl
|
|
</pre>
|
|
</blockquote>
|
|
|
|
<p> Obviously, this approach is useful only if all other mailbox
|
|
access software also uses fcntl() locks. </p>
|
|
|
|
<p> You can also "play safe" and throw in <i>username</i>.lock files: </p>
|
|
|
|
<blockquote>
|
|
<pre>
|
|
/etc/postfix/main.cf:
|
|
virtual_mailbox_lock = fcntl, dotlock
|
|
mailbox_delivery_lock = fcntl, dotlock
|
|
</pre>
|
|
</blockquote>
|
|
|
|
<p> This is the combination that many applications end up using. </p>
|
|
|
|
</body>
|
|
|
|
</html>
|