Mailman3 / Exim4: Router fails
After updating my Linux server, my old Mailman 2.1 was wiped out. I now spend 2 full days desperately trying to get Mailman3 to work with Exim4 (and Apache2) Nothing works so far.
At this point I am stuck with a failing Exim4 "Router" I have set Mailman3 to use Exim in the config. In Exim4 I have set all required Mailman3 options.
But it fails with this: MM3_LISTCHK=/var/lib/mailman3/lists/${local_part}@${domain} (Email to: templist@sartrack.nz - The list exists in Mailman3)
Exim4 debug: 19:15:47 100472 --------> mailman3_router router <-------- 19:15:47 100472 local_part=info domain=sartrack.nz 19:15:47 100472 checking domains 19:15:47 100472 sartrack.nz in "sartrack.nz"? yes (matched "sartrack.nz") 19:15:47 100472 data from lookup saved for cache for +mm_domains: key 'sartrack.nz' value 'sartrack.nz' 19:15:47 100472 sartrack.nz in "+mm_domains"? yes (matched "+mm_domains") 19:15:47 100472 checking require_files 19:15:47 100472 ╭considering: /var/lib/mailman3/lists/${local_part}@${domain} 19:15:47 100472 ├──expanding: /var/lib/mailman3/lists/${local_part}@${domain} 19:15:47 100472 ╰─────result: /var/lib/mailman3/lists/info@sartrack.nz 19:15:47 100472 ╰──(tainted) 19:15:47 100472 file check: /var/lib/mailman3/lists/${local_part}@${domain} 19:15:47 100472 expanded file: /var/lib/mailman3/lists/info@sartrack.nz 19:15:47 100472 stat() yielded -1 19:15:47 100472 errno = 2 19:15:47 100472 mailman3_router router skipped: file check
Can somebody please help. I have no idea what is wrong here.
I copied the wrong debug data in my original post, it should be this:
--------> mailman3_router router <-------- 2023-05-22 05:13:59 115223 local_part=templist domain=sartrack.nz 2023-05-22 05:13:59 115223 checking domains 2023-05-22 05:13:59 115223 sartrack.nz in "sartrack.nz"? yes (matched "sartrack.nz") 2023-05-22 05:13:59 115223 data from lookup saved for cache for +mm_domains: key 'sartrack.nz' value 'sartrack.nz' 2023-05-22 05:13:59 115223 sartrack.nz in "+mm_domains"? yes (matched "+mm_domains") 2023-05-22 05:13:59 115223 checking require_files 2023-05-22 05:13:59 115223 file check: /var/lib/mailman3/lists/${local_part}@${domain} 2023-05-22 05:13:59 115223 expanded file: /var/lib/mailman3/lists/templist@sartrack.nz 2023-05-22 05:13:59 115223 stat() yielded -1 2023-05-22 05:13:59 115223 errno = 2 2023-05-22 05:13:59 115223 mailman3_router router skipped: file check
On 5/21/23 14:50, ceo@sartrack.nz wrote:
I copied the wrong debug data in my original post, it should be this:
--------> mailman3_router router <-------- 2023-05-22 05:13:59 115223 local_part=templist domain=sartrack.nz 2023-05-22 05:13:59 115223 checking domains 2023-05-22 05:13:59 115223 sartrack.nz in "sartrack.nz"? yes (matched "sartrack.nz") 2023-05-22 05:13:59 115223 data from lookup saved for cache for +mm_domains: key 'sartrack.nz' value 'sartrack.nz' 2023-05-22 05:13:59 115223 sartrack.nz in "+mm_domains"? yes (matched "+mm_domains") 2023-05-22 05:13:59 115223 checking require_files 2023-05-22 05:13:59 115223 file check: /var/lib/mailman3/lists/${local_part}@${domain} 2023-05-22 05:13:59 115223 expanded file: /var/lib/mailman3/lists/templist@sartrack.nz 2023-05-22 05:13:59 115223 stat() yielded -1
I'm not an Exim expert although I have used it. The above says Exim was unable to stat /var/lib/mailman3/lists/templist@sartrack.nz - does that file exist. Does exim have search permission on all the directories in the path and read permission on the file?
2023-05-22 05:13:59 115223 errno = 2 2023-05-22 05:13:59 115223 mailman3_router router skipped: file check
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Mark. I have no idea if that file exists. As far as I can see, it cannot exist. It must be some virtual file. And it would have to be created by Mailman3 just for a short moment, for Exim to pick it up. It looks very weird to me, but the old Mailman 2.1 worked in the same way.... and I can no longer see how that would have worked as it has been wiped out by the OS upgrade. And yes, I generated the mailing list as (from memory) : mailman3 create templist@sartrack.nz templist.lists.sartrack.nz (?) I tried to create it as: create templist@sartrack.nz templist@sartrack.nz but it would not accept that. This all was done while I war trying to *import* the existing list, but this keeps failing with a 'mailing list does not exist' until I after much Googling found a comment somewhere that I first has to Create a list (not to be found in any documentation).
Somehow Mailman must create this weird file for Exit to be able to read it, and then it would have to dissapear, because it makes no sence if that file would be sitting in the mail 'lists' directory. I do not understand this system at all.
From: "Stephen J. Turnbull" <turnbull.stephen.fw@u.tsukuba.ac.jp> To: ceo@sartrack.nz Cc: mailman-users@mailman3.org Subject: [MM3-users] Mailman3 / Exim4: Router fails In-Reply-To: <168469116281.118014.2976538609194809676@mail.mailman3.org> References: <168469116281.118014.2976538609194809676@mail.mailman3.org> X-Mailer: VM 8.0.12-devo-585 under 21.5 (beta34) "kale" 5b7378119a27 XEmacs Lucid (x86_64-apple-darwin21.6.0) --text follows this line-- ceo@sartrack.nz writes:
But it fails with this: MM3_LISTCHK=/var/lib/mailman3/lists/${local_part}@${domain}
For reasons I do not understand, although Mailman 3 keeps list configurations in the RDBMS, when it creates a list it *also* "touches" a directory for that list in the directory $var_dir/lists. (If I remember correctly, these are empty. It's a real directory, not "virtual".) Since I already knew how to search for the lists/$LIST/config,pck file used by Mailman 2, I used the same method for Mailman 3.
$var_dir is set somewhere near the top of mailman.cfg. I don't know where to find that file in your installation, it's often in /etc/mailman3.
Compare $var_dir with MM3_LISTCHK. If the prefix /var/lib/mailman3 is not the same as $var_dir, check that the lists directory exists in $var_dir and is populated with the list posting addresses you expect. Then fix up MM3_LISTCHK to match.
If anything looks suspicious, feel free to ask, even if it works.
Later you wrote:
mailman3 create templist@sartrack.nz templist.lists.sartrack.nz (?) I tried to create it as: create templist@sartrack.nz templist@sartrack.nz but it would not accept that.
I believe that's because "mailman create" wants the posting address and the list ID. The posting address is a mailbox@domain address as usual, but the list ID is defined to be "dots only" so you can tell the difference. Normally the list ID just swaps "." for "@" in the posting address, but if you ever need to change domains, it saves your users hassle if their mail client understands the list ID. That can stay mailbox.domain even though you have to change the posting address to mailbox@newdomain. So
create templist@sartrack.nz templist.sartrack.nz
should work.
-- University of Tsukuba Faculty of Policy and Planning Sciences Tennodai 1-1-1, Tsukuba 305-8573 JAPAN tel/fax: +81-29-853-5091 turnbull@sk.tsukuba.ac.jp https://turnbull.sk.tsukuba.ac.jp/
On 5/22/23 07:44, Stephen J Turnbull wrote:
From: "Stephen J. Turnbull" <turnbull.stephen.fw@u.tsukuba.ac.jp> To: ceo@sartrack.nz ... > > But it fails with this: > MM3_LISTCHK=/var/lib/mailman3/lists/${local_part}@${domain}
For reasons I do not understand, although Mailman 3 keeps list configurations in the RDBMS, when it creates a list it *also* "touches" a directory for that list in the directory $var_dir/lists. (If I remember correctly, these are empty. It's a real directory, not "virtual".) Since I already knew how to search for the lists/$LIST/config,pck file used by Mailman 2, I used the same method for Mailman 3.
That directory is used to store messages being accumulated for the next digest in a digest.mmdf mailbox file.
$var_dir is set somewhere near the top of mailman.cfg. I don't know where to find that file in your installation, it's often in /etc/mailman3.
mailman conf -k var_dir
will show the setting for $var_dir for various
layouts and mailman conf -k layout
will show the layout in use.
Later you wrote:
> mailman3 create templist@sartrack.nz templist.lists.sartrack.nz (?) > I tried to create it as: > create templist@sartrack.nz templist@sartrack.nz > but it would not accept that.
I believe that's because "mailman create" wants the posting address and the list ID.
It just wants the posting address, not the list ID. I.e.
mailman create templist@sartrack.nz
create
is a subcommand of the mailman command.
createby itself as opposed to
mailman create` looks like an artifact from cPanel's Mailman
2.1.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
I found the problem with Exim4. The Exim4 config file should contain this:
MM3_LISTCHK=MM3_HOME/lists/${local_part}.${domain} and NOT MM3_LISTCHK=MM3_HOME/lists/${local_part}@${domain}
Somewhere the documentation is wrong.
But I now have the next problem: I send an email to a new mailing list called templist@sartrack.nz (I imported my old list members). in /var/log/mailman3 I get an error regarding this; The (final) error states: PermissionError: [Errno 13] Permission denied: '/var/lib/mailman3/lists/templist.sartrack.nz/digest.mmdf'
The file digest.mmdf does not exist there at all. The mailing server does not send out any emails for "templist"
On 5/22/23 12:42, ceo@sartrack.nz wrote:
I found the problem with Exim4. The Exim4 config file should contain this:
MM3_LISTCHK=MM3_HOME/lists/${local_part}.${domain} and NOT MM3_LISTCHK=MM3_HOME/lists/${local_part}@${domain}
Somewhere the documentation is wrong.
The documentation at https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/docs/mta.ht... has
MM3_LISTCHK=MM3_HOME/lists/${local_part}.${domain}
Where did you see
MM3_LISTCHK=MM3_HOME/lists/${local_part}@${domain}
But I now have the next problem: I send an email to a new mailing list called templist@sartrack.nz (I imported my old list members). in /var/log/mailman3 I get an error regarding this; The (final) error states: PermissionError: [Errno 13] Permission denied: '/var/lib/mailman3/lists/templist.sartrack.nz/digest.mmdf'
The file digest.mmdf does not exist there at all.
Because Mailman was trying to create it and couldn't.
I suspect you ran mailman create
as root and the
/var/lib/mailman3/lists/templist.sartrack.nz/ got created with
user:group as root:root rather than the mailman user and group.
Recent Mailman versions won't run the mailman
command as root without
a --run-as-root option for this reason.
How are you installing Mailman?
The mailing server does not send out any emails for "templist"
This is a separate issue from the above error, but it might also be a permissions error. What other errors do you see in /var/log/mailman3/mailman.log?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (3)
-
ceo@sartrack.nz
-
Mark Sapiro
-
Stephen J Turnbull