Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Postfix Documentation
Previous Page Home Next Page

Postfix and NFS


This question was asked on the postfix-users mailing list a while ago:

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 within Postfix, NFS is not an issue because you cannot share Postfix queues among multiple 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:

/etc/postfix/main.cf:
    
virtual_mailbox_lock = fcntl
    
mailbox_delivery_lock = fcntl

Obviously, this approach is useful only if all other mailbox access software also uses fcntl() locks.

You can also "play safe" and throw in username.lock files:

/etc/postfix/main.cf:
    
virtual_mailbox_lock = fcntl, dotlock
    
mailbox_delivery_lock = fcntl, dotlock

This is the combination that many applications end up using.

Postfix Documentation
Previous Page Home Next Page