MikeL's FreeBSD howto - MailMan

Mailman Online Docs at SourceForge.net.


[20240221]
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.

[20231217]
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:
  /usr/local/mailman/Mailman/mm_cfg.py
    SUBSCRIBE_FORM_SECRET="something"
"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.


[20200329]
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>
    main()
  File "./newlist", line 232, in main
    mlist.Save()
  File "/usr/local/mailman/Mailman/MailList.py", line 617, in Save
    self.CheckHTMLArchiveDir()
  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

[20200323]
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
/usr/local/mailman/archives
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:
./list_lists
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 pedicel)