Mark Sapiro wrote:
On 1/22/24 13:05, Thomas Schachtner via Mailman-users wrote:
Hi there,
But that's not the full deal. Postfix needs access to some hashed configuration files containing the transport maps and the domains of the mailman installation, and mailman needs the contents of the postfix configuration file.
Why do you think Mailman needs the contents of the postfix configuration file.. I don't think so. I thought so, as mailman does not start if there's not /etc/postfix/main.cf file is there.
The following messages are logged: Jan 23 21:20:35 mailman mailman3[491404]: RuntimeError: command failure: /usr/sbin/postmap /var/lib/mailman3/data/postfix_lmtp, 1, Operation not permitted Jan 23 21:20:35 mailman mailman3[491404]: command failure: /usr/sbin/postmap /var/lib/mailman3/data/postfix_domains, 1, Operation not permitted
If /etc/postfix/main.cf is there, mailman is starting perfectly fine. But in another anwer I learned that mailman might not need the contents of that file but rather change it (although I did not see any changes).
As a quick and dirty solution, I've established a process which periodically copies the /var/lib/mailman3 directory from the mailman box to the postfix box using rsync.
It appears you are using the Debian/Ubuntu package or at least have configured
layout: fhs
in the[mailman]
section of mailman.cfg. This is OK, but in any case, all Postfix needs is /var/lib/mailman3/data/*.
Thanks for this information. I already thought so, but I was not sure. Yes, I am using the Debian package. I also found the line with 'layout', but it reads 'layout: debian'. They write: "You should not change this variable"
But I would like to have a more professional solution, like a directly shared directory between both. I did not yet find any suggestions on how to achieve this. Are there any best practices recommendations? I already tried sharing the directories using sshfs, but that did not work.
I connected the remote directory postfix.example.com:/var/lib/mailman3 to my local directory /var/lib/mailman3 using
sshfs root@postfix.example.com:/var/lib/mailman3 /var/lib/mailman3
I would suggest the opposite. I.e. on the postfix machine
sshfs user@mailman_machine:/var/lib/mailman3/data /var/lib/mailman3/data
There are two reasons why I would like to do it the other way around: (1) I would like to make all changes on the mailman3 box and change as little as possible on the postfix server and (2) mailman is running on a system which does not have a fixed IP address. Mounting the file system from there can become complicated, as the IP address can change on a daily basis...
This seemed to work pretty fine, as all files and directories seemed to be available, but when starting mailman 3, the following error message was shown: FileExistsError: A race condition might have happened. /var/lib/mailman3 actually exists and is not a directory.
Any idea why this message is shown?
Possibly because the uid and gid of /var/lib/mailman3 on the postfix machine do not map to the appropriate Mailman uid and gid on the mailman machine. You refer to the uid and gid of the "list" user? They are both 38 (uid and gid) on both machines.
So, is it a bad idea to use sshfs?
If you do it the other way, it might work.
I try to work around the changing IP address challenge then. Thanks! Tom