Post msg says: To initialise Mailman's runtime directories, log files and database for the first time, run service mailman info You can then start Mailman by running: service mailman start service mailman info than fails with: $ sudo service mailman oneinfo Usage: mailman [OPTIONS] COMMAND [ARGS]... Try 'mailman -h' for help. Error: Invalid value for '-C' / '--config': File '/usr/local/mailman/etc/mailman.cfg' does not exist.
There should be a default mailman.cfg in named directory. During install, the mailman.cfg gets a patch in the [path.fhs] section. How ever: The default layout is "home". Also the default MTA is postfix. I would suggest to change that to sendmail for FreeBSD.
(In reply to Ekkehard 'Ekki' Gehm from comment #1) Thanks for pointing that out. I was thinking of just installing mailman.cfg.sample in %%PREFIX%%/${name}/etc and updating the install message to document that you need to copy the sample config and update it. The config file comes from upstream, so I would patch it to change the MTA, but since we use postfix in production, I might need some testing to see if the default config is badly wrong.
I will try to fix that. Mailman would create a default conf. Unfortunately not when started with -C. I installed mailman3 successfully by hand in a venv last week (without that rust huge rust thing). I am a bit time limited right now but will try to write a patch if you want....
(In reply to Ekkehard 'Ekki' Gehm from comment #3) I'm like 80% done with my patch, so I should be able to complete it over the weekend
Created attachment 248054 [details] Install mailman config file Install a default mailman config file
(In reply to Ekkehard 'Ekki' Gehm from comment #1) My current patch copies the default config to the right path, but it does not change from the default MTA. Mailman 3 does not include a class for sendmail. I'm open to a patch that fixes the default mailman.cfg to work with sendmail MTA, or add more details in the INSTALL message. If this is good for now, I'll nudge a committer to take a look and commit.
(In reply to Einar Bjarni Halldórsson from comment #6) I think you can use ${ETCDIR} directly for the destination path. It defaults to ${PREFIX}/etc/${PORTNAME}
(In reply to Fernando Apesteguía from comment #7) But the destination path isn't ${PREFIX}/etc/${PORTNAME}. mailman3 places files and dirs under ${PREFIX}/${PORTNAME}, so /usr/local/mailman by default and the default config file path is /usr/local/mailman/etc/mailman.cfg
Please check your changes with "portlint", "portfmt -D Makefile" and "portclippy Makefile" (ports-mgmt/portlint and ports-mgmt/portfmt ports). And should bump PORTREVISION too.
Created attachment 250850 [details] Add sample config file for mailman3 Fixed syntax errors reported by portlint and portfmt. Builds with poudriere on 13.2-RELEASE
Thanks. Now noticed you want install a file /usr/local/mailman/etc. Is it possible install to /usr/local/etc/mailman/? Would be better. Did you notice PR 254135 and 250362? Let's put those in order first.
(In reply to Zsolt Udvari from comment #11) I've commented on PR 254135 and 250362. 250362 was already fixed and has been closed. 254135 has been partly fixed, but what is left is a duplicate of this issue (default/sample config file missing). Regarding the path to the config file, the directory layout was put in place by previous maintainer/initial committer, and it places all files under /usr/local/mailman. I'd like to get this patch committed, and we can create a new PR regarding fixing the directory layout if you want.
(In reply to Einar Bjarni Halldórsson from comment #12) Sorry for late. I installed py311-mailman but there is no /usr/local/mailman/etc. I think only the rc-script is wrong (see https://cgit.freebsd.org/ports/tree/mail/mailman3/files/mailman.in#n23). Could you please overwrite your mailman rc-script (mailman/etc/ to etc/mailman/), move your configuration file to /usr/local/etc/mailman/ (from /usr/local/mailman/etc) and check? If it works IMHO only this modification is needed.
(In reply to Zsolt Udvari from comment #13) > I installed py311-mailman but there is no /usr/local/mailman/etc. I think only the rc-script is wrong (see https://cgit.freebsd.org/ports/tree/mail/mailman3/files/mailman.in#n23). That's the point with this ticket, that there is no sample config installed by the package, and no etc directory created. Whether that directory is /usr/local/mailman/etc or /usr/local/etc/mailman doesn't matter, we need this patch to actually install the sample config.
(In reply to Einar Bjarni Halldórsson from comment #14) Agree. But we respect the FHS too so the sample config should be in PREFIX/etc/mailman/.