vvrpgsporcupineorg relatively late change postfix 25 introduces data_directory confuration parameter specifies location caches postfixwritable files dont belong mail queue also dont belong rootowned configuration directory data directory contains files maintained singlewriter postfix process address verification cache maintained verify service pseudorandom pool tls session keys maintained tlsmgr service cache files maintained proxywrite service works fine single postfix instance systems unfortunately postfix 25 provide mechanism prevent conflicts multiple postfix instances attempt use data_directory setting absence exclusive lock could result mysterious failures multiple postfix instances update files maintained singlewriter processes verify8 tlsmgr8 especially likely happen postfix 25 automatically redirect write operations rootowned directories new data directory proposed fix master8 create exclusive lock file data_directory similar exclusive lock queue_directory wietse srcmastermasterc sat mar 17 135938 2007 srcmastermasterc tue feb 19 100239 2008 130138 mail system name prepended process name syslog records smtpd becomes example postfixsmtpd files etcpostfixmaincf global configuration file etcpostfixmastercf master server configuration file varspoolpostfixpidmasterpid master lock file see also qmgr8 queue manager verify8 address verification 130146 mail system name prepended process name syslog records smtpd becomes example postfixsmtpd files ad fi expand directory names actual values use command fbpostconf config_directoryfr etc na nf config_directorymaincf global configuration file config_directorymastercf master server configuration file queue_directorypidmasterpid master lock file data_directorymasterlock master lock file see also qmgr8 queue manager verify8 address verification 216222 224232 int mainint argc char argv static vstream lock_fp static vstream data_lock_fp vstring lock_path vstring data_lock_path off_t inherited_limit int debug_me 0 int ch 390395 400406 isnt locked lock_path vstring_alloc10 data_lock_path vstring_alloc10 vstring_alloc10 vstring_sprintflock_path sspid def_pid_dir var_procname 407414 418446 msg_fatalcannot update lock file vstring_strlock_path close_on_execvstream_filenolock_fp close_on_exec lock postfixwritable data directory vstring_sprintfdata_lock_path sslock var_data_dir var_procname set_eugidvar_owner_uid var_owner_gid data_lock_fp open_lockvstring_strdata_lock_path o_rdwr o_creat 0644 set_ugidgetuid getgid data_lock_fp 0 msg_fatalopen lock file vstring_strdata_lock_path vstring_strwhy vstream_fprintfdata_lock_fp lun int sizeofunsigned long 4 unsigned long var_pid vstream_fflushdata_lock_fp msg_fatalcannot update lock file vstring_strdata_lock_path close_on_execvstream_filenodata_lock_fp close_on_exec clean vstring_freewhy vstring_freelock_path vstring_freedata_lock_path optionally start debugger ourself 438443 470478 ifdef has_volatile_locks myflockvstream_filenolock_fp internal_lock myflock_op_exclusive 0 msg_fatalrefresh exclusive lock myflockvstream_filenodata_lock_fp internal_lock myflock_op_exclusive 0 msg_fatalrefresh exclusive lock endif thu 07 aug 2008 005757 0500 proposed patch fixing data_directory exclusive access