C++ wxWidgets Linux Win32 macOS GCC GNU IMAP MSVC Perl Python SMTP STL TCP/IP Unix ZSH

Nous sommes désolés, cette page n'est pas encore disponible en Français donc nous vous proposons sa version anglaise, veuillez nous en excuser.

mladmin

Overview

mladmin main purpose in the life is to automatically discard the messages held for administrative approval by Mailman mailing list manager. If you use Mailman (for example because your mailing lists are hosted by SourceForge) you probably get as much spam as I do, that is anything between 1 and 10 messages daily. I got tired of having to click on half a dozen checkboxes in my browser to delete them manually and so wrote this tiny script to do it automatically. It is especially useful for the announcement lists where normally no messages are posted at all so there is no danger of discarding a legitimate message.

License

This script is Free Software released under BSD license.

Requirements

You need Perl 5.004 (it might work with the previous versions but this is the least one I tested it with) and a bunch of modules all of which can be retrieved from CPAN including (but possibly not limited to) HTTP::Cookies, LWP::UserAgent, HTML::Parser and Crypt::SSLeay.

Under Unix you may wish to additionally install Term::Size module if you are using a terminal of non standard (i.e. different from 80) width.

The program has been tested under Linux with Perl 5.004 and 5.005 and Windows 2000 with ActivePerl build 631 but it should work on the other platforms as well.

Download

You can get the version 0.12 of the script here:

Usage instructions

The script has one required parameter: the admindb URL of the list, for example http://lists.sourceforge.net/lists/admindb/list-name for the lists hosted on SourceForge.

By default, it will list the messages being held for approval, if any, and ask you if you want to discard all the messages which is the most common action. If the second parameter is specified it can be one of list, discard or accept. The first just lists the messages without proposing to discard them, the others discard or accept all (if there are no more parameters) or just the specified (after them on command line) messages.

Please note that there is no way to undelete discarded messages later, so use the discard command carefully!

Other supported options are:

  • --help, --version: self explanatory.
  • --pass=password: specify the administrative password on the command line (otherwise you'll be asked for it).
  • --cookies=file: if this option is given, the administrative cookie will be saved to the specified file and you won't have to enter the password again until it expires. You should understand that storing Mailman cookies is a security risk and use this options with care.
  • --proxy=url: specify the proxy to use.

Example of a session using this script:

% ./mladmin.pl --cookies=list.cookies \
    		http://lists.sf.net/lists/admindb/list-name list
Administrative password for list-name: *****
password will be saved in list.cookies file
Logging in to list-name... ok.
2 messages held for approval for the list list-name:

 N From                  Subject                 Reason
-------------------------------------------------------------------
 1 spammer@yahoo.com     ...                     Post by non-member
 2 someone@somewhe.re    Best online!!!          Post by non-member
 2 spammer@lycos.co.kr   YOU WON 1 TRILLION   Post by non-member
-------------------------------------------------------------------
% ./mladmin.pl --cookies=list.cookies \
    http://lists.sf.net/lists/admindb/list-name accept 2
Preparing to accept 1 message... 1 message accepted.
% ./mladmin.pl --cookies=list.cookies \
    http://lists.sf.net/lists/admindb/list-name discard
Preparing to discard all messages... 2 messages discarded.

Security considerations

If you are concerned about security, you should only use the script via HTTPS (simply replace http: with https: above) to avoid the passwords being sent in clear text. For HTTPS support to work, you will need have Crypt::SSLEay and Net::SSLEay Perl modules installed.

Of course, using the --cookies option is also a bad idea from the security view point.

Change log

0.12
Fixed behaviour with Getopt::Long 2.37 and later.
0.11
Added --dry-run option.
0.10
Page layout used by mailman 0.10 is now supported.
0.03
Better handling of terminals of width different from 80.
Propose to discard all messages after listing them in interactive mode.
0.02
Added accept command and operation on individual messages.
0.01
Initial release.
June 23, 2015
Un nouveau outil where-included pour aider les programmeurs C/C++ de trouver les dépendances entre les fichiers d'en-tête vient d'être publié.
July 28, 2014
Une nouvelle version de Bakefile, un générateur de fichiers make, vient d'être publiée.
20 Juillet 2014
Nous avons réalisé un plugin pour Munin permettant de monitorer les caractéristiques de la Freebox.
11 Novembre 2013
wxWidgets 3.0, la première release dans la nouvelle stable branche de wxWidgets, est maintenant disponible.
1 Septembre 2013
Malheureusement, les derniers changements de Yahoo! Groups ont cassé le fonctionnement de notre très populaire outil yahoo2mbox.
31 Mars 2013
Nouveau article sur la migration de svn à git ajouté.
6 Août 2012
Une mise à jour mineure pour mladmin: correction d'un problème avec les versions récentes de Perl.
25 Juillet 2012
Un nouveau outil diff-pdf ajouté à la page de nos produits.
27 Avril 2012
Le cours sur wxWidgets proposé par TT-Solutions a été mis à jour pour wxWidgets 3.0, contactez-nous si vous êtes intéressé.