MikeL's FreeBSD howto - MailMan

Mailman Online Docs at SourceForge.net.

Renaming a mailman list.
Find actual directory where archives are stored - in my case, that's actually in the users dir tree, via a symbolic link in the /usr/local/mailman/archives/private dir. You'll find that dir and a matching '.mbox' dir - rename both.
Back to prev dir, delete the links, and recreate them to the new name.
Now to /usr/local/mailman/lists, rename the appropriate dir.
Edit /etc/mail/aliases.mailman, and change the list name appropriately.
service mailman restart
Go into admin webpage in browser using the new name in the URL, and make any name change edits necessary - mine were all in the intitial entry "General' page.
Note that I was unable to get in the first time, it refused the correct password. I had to update the 'site password" as follows:
cd /usr/local/mailman/bin
./mmsitepass [passwd]

Moving from old system again.
pkg install mailman
Edit mm_cfg.py as described below.
Bear in mind that all the other (e.g. sendmail) config should have already come over with your migration of that.
cd /usr/local
From your backup of /usr/local/mailman/:
tar -xvf mailman/archives
tar -xvf mailman/lists
Do more than one service stop/start to ensure it fixes dir perms.

In the last month or so, I've suddenly found myself drowning in bogus subscribe requests. Long story short - they've already implemented something for this issue. [Mailman-Users] Handling bogus subscribe requests. In a nutshell, add the following line to:
"something" should be some random text string - it will be used as part of a randomizing string for a hash key.

Note that if you have any hard-coded subscribe pages, this will break them.

I just tried to create a new mailman list, and got the following error:
  Traceback (most recent call last):
  File "./newlist", line 274, in <module>
  File "./newlist", line 232, in main
  File "/usr/local/mailman/Mailman/MailList.py", line 617, in Save
  File "/usr/local/mailman/Mailman/Archiver/Archiver.py", line 241, in CheckHTMLArchiveDir
    makelink(privdir, pubdir)
  File "/usr/local/mailman/Mailman/Archiver/Archiver.py", line 49, in makelink
    os.symlink(old, new)
OSError: [Errno 2] No such file or directory
To make a long story short, my archives/public dir was missing.
cd /usr/local/mailman/archives
ls -l
Note there's a 'private' dir, but no 'public'.
mkdir public
cd ../bin
service mailman stop
./check_perms -f
service mailman start

pkg install mailman
env "PKG_PREFIX=/usr/local" sh \
    /usr/local/mailman/bin/FreeBSD-post-install x POST-INSTALL
Just copy-n-paste this line -- when I did it showed no problems, but I feel better knowing that indeed there were no problems...

Look at /usr/local/mailman/Mailman/Defaults.py for default values and explanations. Do NOT change this file.

Make the actual changes in /usr/local/mailman/Mailman/mm_cfg.py - these will override the values in Defaults.py.
I had to change:
    SMTP_MAX_RCPTS = 500
as my sendmail log was showing "Too many recipients" from "sm-mta" after some of my mailman list sends. Note that I have max recips set lower (25) in sendmail due to morons who CC: a huge block causing all sorts of havoc.

Oh, and don't forget service mailman restart.

[20200328] Moving mailman from another server
Good reference found here
and here

Install mailman as above.
dup files from: /usr/local/mailman/lists
cd /usr/local/mailman/bin
./check_perms -f (re-run until clean)

FYI mailmain utilities help here

Do service mailman start; observe fixing dir permissions. If so, do stop, then start, and keep doing this until no errors reported at startup. (Should not be necessary if you did check_perms but I'm leaving it in for generic use.)

If you are changing server names, you might want to use the following:
cd /usr/local/mailman/bin
./withlist -l -r fix_url LIST_NAME -u [new-domain.example.org]

Ok, here's what I've learned, the hard way. when I went to the new admin URL, it gave me the generic "there are no publicly-advertised lists" page. Don't worry, they're there - they're just not "advertised". The only way I was able to get them to show up, is to do the fix_url (above), and change it to the fully-qualified host and domain name for this server. If you omit the hostname, or use a hostname that's aliased via DNS, mailman doesn't know or care - it will only show them if it's an exact match for the FQDN of this server.
If you only have a few lists, I'd suggest simply doing this by hand:
or better yet:
ls -l ../lists
Then do the fix_url magic incantation above for each.

Alternatively, here's some unix shell magic to do this for you:
cd /usr/local/mailman/lists
find . -type d -print | tr -d "./" | xargs -I '{}' ../bin/withlist -l -r fix_url '{}' -v -u [your new url here]
(Ref for xargs magic here google for xargs positional).

I moved my mailman.aliases with my sendmail configuration, but if you want to regenerate your sendmail aliases file, use the following:
cd /usr/local/mailman/bin
./genaliases > mailman.aliases

[from here on down was Dec-2006]
Install mailman via directions. Be sure to first read README.SENDMAIL and README.BSD. You will need to use --with-cgi-gid.

Put all your aliases into /etc/mail/aliases.mailman so it can put it's mailman-specific alias db here. (You can't put it in the mailman dir due to the group-writable dir which other parts of mailman need -- sendmail disallows aliases in a group-writable dir.) You'll add something like the following to your .mc file:
define(`ALIAS_FILE', `/etc/mail/aliases,/usr/local/majordomo/aliases.majordomo,/etc/mail/aliases.mailman')

Check /var/log/maillog for errors.

Creating a new list
Go to your favorite shell:
cd /usr/local/mailman/bin ./newlist

Be sure to add the -owner alias of all lists to your 'mailman' list.

Be sure that you keep around your 'mailman' list -- mailman will croak without it, as it is used for the overarching admin password. Be sure to follow the following steps for this list on making it announcement only.

Announcement-only lists:

Copyright © 1995-2024 Mike Lempriere (running on host bayanus)