LISTADMIN(1)

πŸ“¦
version 2.42 Β· 2 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’– LISTADMIN(1) πŸ’–

okay bestie, so this is listadmin from the General Commands Manual section β€” like, the manual page for listadmin(1). Pull up a chair, grab a boba, we're doing this. πŸ§‹βœ¨


✨ NAME ✨

listadmin β€” process messages held by Mailman for approval 🫢


🌸 SYNOPSIS 🌸

listadmin [-?] [-V] [-f configfile] [-t minutes] [--mail] [--nomail]
[{-a|-r} file] [--add-member address] [--remove-member address] [-l]
[listname]

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically, listadmin is a textual alternative to Mailman's WWW interface for administering mailing lists. no browser, no clicking, just vibes and a terminal. πŸ’…


πŸ‘‘ OPTIONS πŸ‘‘

  • -f configfile β€” grab the list of mailing lists from configfile instead of the default (~/.listadmin.ini). she's got a backup plan, we love her for that.
  • -t minutes β€” stop processing once minutes has passed. mostly for those fully-automated listadmin setups, iykyk. ⏰
  • --mail β€” addresses added as subscribers will have nomail turned off.
  • --nomail β€” addresses added as subscribers will have nomail turned on.
  • -a file β€” add every e-mail address listed in file (one address per line, pls, we're not monsters) to the subscriber list. the welcome message is suppressed. πŸ™ˆ
  • --add-member address β€” add address to the subscriber list, works exactly like above.
  • -r file β€” remove the e-mail addresses listed in file (yep, one address per line) from the subscriber list.
  • --remove-member address β€” remove address from the subscriber list. bye bestie πŸ‘‹
  • -l β€” display the subscriber list. show me the roster πŸ“‹
  • listname β€” only process the lists matching listname. you can give a complete address, a substring, or a regular expression. slay.
  • -? or --help β€” display the short usage description.
  • -V or --version β€” output the version number.

πŸ’œ CONFIGURATION SYNTAX πŸ’œ

the config file is just lines, and each line is either a comment, a directive, or a mailing list address. that's it, that's the whole vibe.

you can continue a line by slapping a backslash character \ at the end of it, and any leading whitespace on the following line gets removed. like a lil glue stick 🩹

comments start with the character # and extend to the end of the line. and ngl, backslash continuation is not applied to comments, so don't even try it.

the argument to a directive can be wrapped in double quotes to protect space characters. inside those double quotes, \" gets you a literal double quote, and \\ gets you a literal backslash. πŸŽ€


🌈 DIRECTIVES 🌈

so a directive affects all the mailing list addresses which follow after it in the configuration file. the directives are:

  • username username β€” specifies the username to use for authentication. (not all Mailman servers require a username, so don't stress if yours doesn't.)
  • password password β€” specifies the password to use for authentication.
  • adminurl url β€” the URL for maintaining Mailman requests. some substitutions get performed β€” the examples below refer to the hypothetical list foo-devel@example.net:
    • {list} β€” the local part of the list name, e.g., "foo-devel".
    • {domain} β€” the domain part of the list name, e.g., "example.net".
    • {subdomain} β€” the first component of the domain part, e.g., "example".
  • default action β€” specifies the action to take when the user presses just Return. the available actions are:
    • approve β€” the message will be sent to all member of the list.
    • reject β€” notify sender that the message was rejected.
    • discard β€” throw message away, don't notify sender.
    • skip β€” don't decide now, leave it for later.
    • none β€” reset to no default action.
  • action action β€” this action will be taken for all messages where none of the other rules apply (e.g., spamlevel, discard_if_from etc.), ie., whenever the user would have been asked what to do. the same actions as for default are available, although reject isn't very useful.
  • spamlevel number β€” this specifies the threshold for automatic discard of suspected spam messages. 12 is unlikely to have false positives. no user confirmation is needed, so it is best to play it safe. less than 5 is not recommended. 🚫
  • spamheader header-name β€” the name of the header which contains the spam score. it is assumed that the score is encoded as a sequence of characters, like "*****" for the value 5. by default it will look for all headers with names containing "spam" and "score" or "level", and pick the highest score if there is more than one. setting the header-name to default will restore this behaviour.
  • not_spam_if_from pattern β€” if the message's From header matches the pattern, all automatic actions will be cancelled and you will be asked what action to take explicitly. the pattern can use Perl regexp syntax. if enclosed in slashes, some modifiers can be added, a typical example being /pattern/i to match case-insensitively.
  • not_spam_if_subject pattern β€” as above, but matches against the Subject header.
  • discard_if_from pattern β€” if the message's From header matches the pattern, it will be discarded automatically.
  • discard_if_subject pattern β€” as above, but matches against the Subject header.
  • discard_if_reason pattern β€” as above, but matches against Mailman's reason for holding the message for approval.
  • subscription_default action β€” specifies the action to take when the user presses just Return while processing subscriptions. the available actions are:
    • accept β€” the new subscriber will be added.
    • reject β€” notify sender that s/he was not allowed to join the list.
    • skip β€” don't decide now, leave it for later.
    • none β€” reset to no default action.
  • subscription_action action β€” this action will be taken always for all new subscribers in the relevant lists, no user interaction will take place. the same actions as for subscription_default are available, although only skip is very useful. it is better to get automatic accept and reject behaviour by changing the Mailman configuration.
  • confirm yes|no β€” before submitting changes, ask for confirmation. default is "yes".
  • unprintable questionmark|unicode β€” if the subject or sender address contains characters the terminal can't display, they will be replaced by either "<?>" (in questionmark mode, the default) or something like "<U+86a8>" (in unicode mode).
  • log filename β€” changes submitted to the web interface are logged. all the changes for one list are sent in batches at the end of processing. the format in the log is first a line containing the list name and a time stamp in local time. then one line for each message, in the format
action D:[date] F:[sender] S:[subject]

this batch of lines is terminated by a line saying changes sent to server.

the same substitutions are performed on filename as on the argument to adminurl. tilde syntax can be used to refer to home directories. the filename none turns off logging.

  • meta_member_support yes|no β€” meta members are an experimental feature at the University of Oslo. this option is enabled by default for lists in uio.no, and is needed to avoid clearing the list of meta members when manipulating the list of ordinary members. Note: requires additional Perl module WWW::Mechanize.
  • cafile /path/to/CAcertificate β€” specify which CA certificate to use for all lists following. setting cafile to NONE will use the default cafile.
  • verify_peer yes|no β€” if set to no, SSL certificate verification will be disabled for all lists following.

πŸŽ€ INTERACTIVE USE πŸŽ€

the user interface to listadmin is line oriented with single letter commands. by pressing Return, the default action is chosen β€” and that default action is printed in brackets in the prompt, so you're never left guessing. the available actions are:

  • a β€” Approve sending the message to all members of the list. πŸ’Œ
  • r β€” Reject the message and notify sender of the decision.
  • d β€” Discard the message silently, don't notify sender. πŸ—‘οΈ
  • s β€” Skip the message, leave its status as pending unchanged.
  • b β€” View Body, display the first 20 lines of the message.
  • f β€” View Full, display the complete message, including headers.
  • t β€” View Time, display the Date header from the message. ⏳
  • number β€” jump forward or backward to message number.
  • u β€” go back to the previous message and undo the last approve, discard or reject action. the undo button we deserve πŸ™Œ
  • / pattern β€” search (case-insensitively) for the next message with matching From or Subject. if pattern is left out, the previous value will be used.
  • ? pattern β€” as above, but backwards.
  • . β€” redisplay information about current message.
  • add β€” add address as subscriber to the list. if address is left out, use the sender of the current message.
  • nomail β€” as add, but adds address with "nomail" enabled.
  • list β€” list subscriber addresses matching pattern, or the full list if no pattern is specified.
  • rem β€” remove address from the subscriber list. Note: there is no undo for this action. 😭
  • q β€” quit processing this list and go on to the next.
changes will not take effect until the end of the list has been reached. at that time, the user will be prompted whether the changes should be submitted to Mailman (see also the "confirm" directive above).

🌸 EXAMPLES 🌸

ok so real talk, here's how you actually use this thing πŸ’…

Want to only deal with one single domain's lists? Just hand listadmin the domain as your pattern, bestie:

listadmin example.com

Wanna turn off printing of characters outside US-ASCII? Set the locale like this, queen πŸ‘‘:

env LC_CTYPE=C listadmin

And now the moment you've been waiting for β€” a whole example configuration file, no cap ✨:

# A comment, it must appear on a line by itself.
#
# Settings affect all lists being listed after it.

username jdoe@example.com
password Geheim
default discard
# This one works for Sourceforge:
adminurl http://{domain}/lists/admindb/{list}

slartibartfast@lists.sourceforge.net

# This is how the default Mailman URLs look:
adminurl http://{domain}/mailman/admindb/{list}

# If the password contains quotes or spaces, you may need
# to put it in quotes.  A complex example:
password "\"lise\\ "

# These lists will still use the username [jdoe], but the
# password is now ["lise\ ].

default approve
discard_if_reason "Message has implicit|Too many recipients"
discard_if_from ^(postmaster|mailer(-daemon)?|listproc|no-reply)@

foo-devel@example.net

# No one should ever send e-mail to the next list, so throw it
# all away, without asking any questions
action discard
confirm no
foo-announce@example.net

like. look at that. that's a whole vibe πŸ¦‹


🌈 ENVIRONMENT 🌈

  • http_proxy or HTTP_PROXY β€” tells it which proxy to use for HTTP, fr fr.
  • https_proxy or HTTPS_PROXY β€” same energy but for HTTPS, obviously πŸ’….
  • LC_CTYPE β€” the character set support gets deduced from this variable, that's literally its whole job ✨.

πŸŽ€ FILES πŸŽ€

  • $HOME/.listadmin.ini β€” the default configuration file. the main character of files, honestly πŸ’–

πŸ’€ BUGS πŸ’€

okay bestie, warning time, not me being dramatic but listen:

The HTML parser is quite fragile and it depends on Mailman not changing the format of its generated code. like... it's holding on by a thread, ngl 😭

Also: an extra blank line is sometimes added to the subject when it contains double width characters (e.g. Chinese). This is probably a bug in Text::Reform. we blame Text::Reform, not ourselves πŸ™ˆ


πŸ‘‘ AUTHOR πŸ‘‘

Kjetil T. Homme <kjetilho+listadmin@ifi.uio.no>

Project manager: Johnny A. Solbu <johnny@solbu.net>


and that's the whole page, bestie!! you made it to the end, iconic behavior honestly 🫢✨ this was LISTADMIN(1), dated 2016-12-21 β€” go forth and moderate those lists like the main character you are πŸ’…πŸŒΈπŸ’œ

πŸ“¦ where this page comes from