![](https://secure.gravatar.com/avatar/72af569c6d91c76a9595e7acf66c642f.jpg?s=120&d=mm&r=g)
I have two smtp servers that we use dns round robin for load
balancing. I can run it one server at a time, but I am running into
some pid lock file issues when I try to run them simultaneously.
Any suggestions?
Thanks -Troy
![](https://secure.gravatar.com/avatar/7bdecdef03708b218939094eb05e8b35.jpg?s=120&d=mm&r=g)
On 12/18/07, Troy Knabe wrote:
Mailman is written in such a way that it should be as resistant as possible to problems that would be caused by mounting /usr/local/mailman on NFS, but there's only going to be so much that you can do. It will definitely use lock files to try to keep things straight.
The other alternative is to keep the /usr/local/mailman/qfiles and certain other directories mounted locally-only on each of the machines, and then to have the /usr/local/mailman/archives and certain other directories mounted shared via NFS. This way, individual incoming messages will be processed locally on a given server, although the archives and other stuff will be shared from a single central location. This should minimize most lock contention.
For your mail servers, you want to make sure that you don't try to share via NFS the /var/spool/mqueue type of directories, because most MTAs (e.g., sendmail, postfix, Exim, etc...) do not do well at all if those transactional directories are shared across multiple machines. You can share user mailboxes on /var/spool/mail via NFS, and there are certain Mailbox formats that make that sort of thing easier and more robust. But that's not the transactional queue files for the MTA.
-- Brad Knowles <brad@shub-internet.org> LinkedIn Profile: <http://tinyurl.com/y8kpxu>
![](https://secure.gravatar.com/avatar/14bef3ae6bbab47ef94e501de18e70d0.jpg?s=120&d=mm&r=g)
Troy Knabe wrote:
Troy, My configuration:
A carp machine answers "mailman.srv.ualberta.ca" and alternates inbound messages to two machines behind the carp machine, "mailman1" and "mailman2", NFS-mounted to a third machine, "mailmandb".
Mailman 2.1.9 and Postfix are installed on all three.
Beginning at about line 119, change /usr/local/bin/mailmanctl, so it reads:
# Locking contantsa fname = socket.gethostname() partz = fname.split('.') hostnamez = partz.pop(0) lyst = ['master-qrunner', hostnamez] osmyname = "-".join(lyst) LOCKFILE = os.path.join(mm_cfg.LOCK_DIR, osmyname) # Since we wake up once per day and refresh the lock, the LOCK_LIFETIME
Mount /usr/local/mailman/locks on NFS.
This creates lockfiles named by hosts:
/usr/local/mailman/locks
-rw-rw-r-- 2 mailman mailman 79 Dec 19 17:29 master-qrunner-mailman1 -rw-rw-r-- 2 mailman mailman 79 Dec 19 17:29 master-qrunner-mailman1.mailman1.srv.ualberta.ca.13791 -rw-rw-r-- 2 mailman mailman 78 Dec 19 15:45 master-qrunner-mailman2 -rw-rw-r-- 2 mailman mailman 78 Dec 19 15:45 master-qrunner-mailman2.mailman2.srv.ualberta.ca.5476 -rw-rw-r-- 2 mailman mailman 80 Dec 20 13:35 master-qrunner-mailmandb -rw-rw-r-- 2 mailman mailman 80 Dec 20 13:35 master-qrunner-mailmandb.mailmandb.srv.ualberta.ca.7897
As Brad points out, each of the two machines has its own queue, but the /lists and /archives are common NFS.
-- Dennis Black System Admin Academic Information and Communication Technologies (AICT) (780-)492-9329 This communication is intended for the use of the recipient to which it is addressed, and may contain confidential, personal, and/or privileged information. Please contact us immediately if you are not the intended recipient of this communication. If you are not the intended recipient of this communication, do not copy, distribute, or take action on it. Any communication received in error, or subsequent reply, should be deleted or destroyed.
![](https://secure.gravatar.com/avatar/72af569c6d91c76a9595e7acf66c642f.jpg?s=120&d=mm&r=g)
On Dec 19, 2007, at 7:30 AM, Dennis Black wrote:
Thanks to Dennis and Brad. It appears that I now have this working
perfectly, your instructions for mailmanctl were very easy to follow,
even for a non-programmer. I already had created /usr/local/mailman
so I took qfiles and sym linked it back to local disks (with the same
path on both hosts). Messages seem to flowing correctly now.
Thanks again!
-Troy
![](https://secure.gravatar.com/avatar/14bef3ae6bbab47ef94e501de18e70d0.jpg?s=120&d=mm&r=g)
Troy Knabe wrote:
-- Dennis Black System Admin Academic Information and Communication Technologies (AICT) (780-)492-9329 This communication is intended for the use of the recipient to which it is addressed, and may contain confidential, personal, and/or privileged information. Please contact us immediately if you are not the intended recipient of this communication. If you are not the intended recipient of this communication, do not copy, distribute, or take action on it. Any communication received in error, or subsequent reply, should be deleted or destroyed.
![](https://secure.gravatar.com/avatar/7bdecdef03708b218939094eb05e8b35.jpg?s=120&d=mm&r=g)
On 12/18/07, Troy Knabe wrote:
Mailman is written in such a way that it should be as resistant as possible to problems that would be caused by mounting /usr/local/mailman on NFS, but there's only going to be so much that you can do. It will definitely use lock files to try to keep things straight.
The other alternative is to keep the /usr/local/mailman/qfiles and certain other directories mounted locally-only on each of the machines, and then to have the /usr/local/mailman/archives and certain other directories mounted shared via NFS. This way, individual incoming messages will be processed locally on a given server, although the archives and other stuff will be shared from a single central location. This should minimize most lock contention.
For your mail servers, you want to make sure that you don't try to share via NFS the /var/spool/mqueue type of directories, because most MTAs (e.g., sendmail, postfix, Exim, etc...) do not do well at all if those transactional directories are shared across multiple machines. You can share user mailboxes on /var/spool/mail via NFS, and there are certain Mailbox formats that make that sort of thing easier and more robust. But that's not the transactional queue files for the MTA.
-- Brad Knowles <brad@shub-internet.org> LinkedIn Profile: <http://tinyurl.com/y8kpxu>
![](https://secure.gravatar.com/avatar/14bef3ae6bbab47ef94e501de18e70d0.jpg?s=120&d=mm&r=g)
Troy Knabe wrote:
Troy, My configuration:
A carp machine answers "mailman.srv.ualberta.ca" and alternates inbound messages to two machines behind the carp machine, "mailman1" and "mailman2", NFS-mounted to a third machine, "mailmandb".
Mailman 2.1.9 and Postfix are installed on all three.
Beginning at about line 119, change /usr/local/bin/mailmanctl, so it reads:
# Locking contantsa fname = socket.gethostname() partz = fname.split('.') hostnamez = partz.pop(0) lyst = ['master-qrunner', hostnamez] osmyname = "-".join(lyst) LOCKFILE = os.path.join(mm_cfg.LOCK_DIR, osmyname) # Since we wake up once per day and refresh the lock, the LOCK_LIFETIME
Mount /usr/local/mailman/locks on NFS.
This creates lockfiles named by hosts:
/usr/local/mailman/locks
-rw-rw-r-- 2 mailman mailman 79 Dec 19 17:29 master-qrunner-mailman1 -rw-rw-r-- 2 mailman mailman 79 Dec 19 17:29 master-qrunner-mailman1.mailman1.srv.ualberta.ca.13791 -rw-rw-r-- 2 mailman mailman 78 Dec 19 15:45 master-qrunner-mailman2 -rw-rw-r-- 2 mailman mailman 78 Dec 19 15:45 master-qrunner-mailman2.mailman2.srv.ualberta.ca.5476 -rw-rw-r-- 2 mailman mailman 80 Dec 20 13:35 master-qrunner-mailmandb -rw-rw-r-- 2 mailman mailman 80 Dec 20 13:35 master-qrunner-mailmandb.mailmandb.srv.ualberta.ca.7897
As Brad points out, each of the two machines has its own queue, but the /lists and /archives are common NFS.
-- Dennis Black System Admin Academic Information and Communication Technologies (AICT) (780-)492-9329 This communication is intended for the use of the recipient to which it is addressed, and may contain confidential, personal, and/or privileged information. Please contact us immediately if you are not the intended recipient of this communication. If you are not the intended recipient of this communication, do not copy, distribute, or take action on it. Any communication received in error, or subsequent reply, should be deleted or destroyed.
![](https://secure.gravatar.com/avatar/72af569c6d91c76a9595e7acf66c642f.jpg?s=120&d=mm&r=g)
On Dec 19, 2007, at 7:30 AM, Dennis Black wrote:
Thanks to Dennis and Brad. It appears that I now have this working
perfectly, your instructions for mailmanctl were very easy to follow,
even for a non-programmer. I already had created /usr/local/mailman
so I took qfiles and sym linked it back to local disks (with the same
path on both hosts). Messages seem to flowing correctly now.
Thanks again!
-Troy
![](https://secure.gravatar.com/avatar/14bef3ae6bbab47ef94e501de18e70d0.jpg?s=120&d=mm&r=g)
Troy Knabe wrote:
-- Dennis Black System Admin Academic Information and Communication Technologies (AICT) (780-)492-9329 This communication is intended for the use of the recipient to which it is addressed, and may contain confidential, personal, and/or privileged information. Please contact us immediately if you are not the intended recipient of this communication. If you are not the intended recipient of this communication, do not copy, distribute, or take action on it. Any communication received in error, or subsequent reply, should be deleted or destroyed.
participants (3)
-
Brad Knowles
-
Dennis Black
-
Troy Knabe