[mdlug] mailman on ubuntu

Ron / BCLUG admin at bclug.ca
Mon Apr 29 07:06:22 EDT 2024


A couple more thoughts about Mailman3 that may not be in the notes...


I found putting these into user mailman's .bashrc file let me easily run 
commands as mailman:

## ===%<--- .bashrc --->%===
# pip bash completion start
_pip_completion()
{
     COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \
                    COMP_CWORD=$COMP_CWORD \
                    PIP_AUTO_COMPLETE=1 $1 2>/dev/null ) )
}
complete -o default -F _pip_completion pip
# pip bash completion end

source /opt/mailman/venv/bin/activate

export MAILMAN_CONFIG_FILE=/etc/mailman3/mailman.cfg
export MAILMAN_WEB_CONFIG=/etc/mailman3/settings.py
export PYTHONPATH=/etc/mailman3/:/opt/mailman/venv
## ===%<--- .bashrc --->%===


When running `mailman-web hyperkitty_import`, be sure to *first* run 
something like `cleanarch < $list_name.mbox > $list_name.fixed.mbox`, as 
  advised. It made a difference on my stuff.


If creating a list into which to import a mm2.1 list, don't forget 
`--owner`. I got myself in some mess by neglecting that during testing.

May not be necessary if one also runs `mailman-web createsuperuser ...`.



If running `mailman addmembers`, note the --no-welcome-msg option. Might 
not want to notify members they've joined a list they're already 
subscribed to.



Let us know how it goes!

rb


More information about the mdlug mailing list