Hi there,
I think I have (finally) set up a working instance of mailman 3 on a host separate from the companion postfix mail server actually sending out the mails. One server (postfix) is directly in the internet and the other one is in an internal network not directly reachable from the internet (but connected using a reverse proxy). The services on the hosts are available to one another (i. e. the postfix server is reachable using 127.0.0.1:25 from mailman and mailman is reachable using 127.0.0.1:8024 from postfix using a permanent ssh tunnel betwenn the two hosts). I think that this solution could work quite reliably... (at least I hope so.)
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. 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. 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
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? So, is it a bad idea to use sshfs?
Do I have to install an NFS server? But I am not sure if sharing directories using NFS across the Internet is a good idea... Any suggestions?
Best regards Tom