Firma CHANGELOG --------------- 07/05/2005 - 07/05/2005 - 0.3-cvs (rev 1.13) - rhatto - Firma now uses sendmail or any smtp wrapper directly: - Specify your smtp wrapper through MAIL var, eg: MAIL=/usr/sbin/sendmail MAIL=/usr/bin/ssmtp - Command-line arguments passed to the wrapper must be specified in var MAIL_ARGS - Change in functions get_message and get_gpg_message, introducing the variable LINES (total lines of the received message). - New array: LIST_MESSAGE: keeps the encrypted message sent to each subscriber; needed to the smtp wrapper and will help PGP/MIME handling. 05/05/2005 - 0.3-cvs (rev 1.6) - luis - New functions: list_admin, choose_uid and version. - Renamed functions GPGSTDERR -> get_gpg_stderr SUBSCRIBERS -> get_subscribers_list get_headers -> get_message_headers - New args: -h: chama a usage() -v: chama a version() - Option -a passes STDIN line by line to list_admin - Added some checkings in the main procedure - Some minor syntax changes 02/08/2005 - 0.3-cvs - rhatto - Completed function newlist (still needs tests) - New function: gpg_args 25/05/2005 - v0.2.x - rhatto - Message is now stored in two arrays, MESSAGE and GPG_MESSAGE. Temporary files are no longer needed. Deleted TMP var. - Adapted firma to work with these two arrays. Lots of changes along the code. - Reorganized the code again, splitting part of the process_message function into three new functions (get_message, get_gpg_message and get_headers). - new functions: get_message, get_gpg_message, get_headers, - added export LANG=en_US 14/05/2005 - v0.2.3 - rhatto - Changed project description. - Two new variables: VERSION and CONFIG. The later stores the path to the configuration file. - Reorganized the code, splitting it into two functions (check_config and process_message). - An exit code of 1 is now given if an error occurs. - Implemented a simple command line syntax: firma now has to be called along with an option (e.g., -p to process a message), followed by the path to the configuration file to be used. - Created a new function (usage), which displays firma's usage if its called without a command line option. - Rearranged some comments along the code. - New functions are: check_config, eval_config, usage, process_message and splited the code into these routines 12/05/2005 - v0.2.2 - luis major code cleanup and bug fix release - New: Implemented size and complexity checks for the lists' passphrase. - firma would not work as expected if the PASSWD variable contained characters such as $, `, ', ", \. Fixed. Now PASSWD has to be^M enclosed in single quotes and cannot contain any single quote in its value. - Checked the entire code and tried to make it clearer and more consistent. Lots of small changes and minor fixes. - BASH was looking for the configuration file first on its PATH and only then on the current directory. Disabled sourcepath to avoid this behavior. - A From header containing more than one "<" would turn the variable FROMADD useless. Fixed. - When a message's signature is found invalid, the notification about it is now sent separately for the sender and the list administrators. - Other minor fixes and improvements. - fix LISTNAME and LISTADMIN case sensitiveness 18/04/2005 - v0.2.1 - luis - Added some simple checks for the values entered in the configuration file. If any of these checks fail, firma exits and shows what should be corrected in the file. - GPGLIST now lists public keys using the gpg option "--with-colons". Definitely much easier to parse. - added --no-permission-warning on $GPGCOMMAND. - first tests with --hidden-recipient, but not added - Fixed the FROMADD variable. It wasn't working on the last version - FROMADD=$(echo $FROMADD \ | if grep -q "<" ; \ then echo $FROMADD | grep -o "<.*>" | sed -e "s/[<>]//g" ; \ else echo $FROMADD ; \ fi) + FROMADD=$(echo $FROM \ | if grep -q "<" ; \ then echo $FROM | grep -o "<.*>" | sed -e "s/[<>]//g" ; \ else echo $FROM ; \ fi) - created routines to check config file vars - changed SUBJECT to SUBJECT=$(grep -m 1 "^Subject:" $TMP | cut -d : -f 2- | sed "s/^ //") - changed FROM to FROM=$(grep -m 1 "^From:" $TMP | cut -f 2 -d :) 17/04/2005 - v0.2 - luis - Lists can now have a passphrase. Added option "--passphrase-fd 0" to the GPGDECRYPT and GPGENCRYPT variables. - Added a new variable to the configuration file: LISTADMIN. It should contain the email address of one or more list administrator(s). - Added signature checking for received messages. If the signature is found valid, the message is sent to the list. If its invalid, its returned to the sender and to the list administrator(s). If the message was not encrypted and/or signed, a note is returned to the sender. - Added a few options to the GPGCOMMAND variable: "--batch", "--no-tty", "--no-use-agent" and "--no-permission-warning". GPGCOMMAND="$GPG \ --quiet \ --homedir $GPGDIR \ --batch \ --no-tty \ --no-use-agent" - Added two new functions: GPGSTDERR and SUBSCRIBERS. The first gets gpg STDERR and discards its STDOUT and the later returns the subscribers list. function GPGSTDERR { echo "$PASSWD" \ | ($GPGDECRYPT --status-fd 2 $TMP.gpg 1> /dev/null) 2>&1 ; } function SUBSCRIBERS { $GPGLIST \ | sed -n '/$LISTNAME/d;/pub/p' \ | grep -o '<.*>' \ | sed -e 's/[<>]//g' ; } - Added a new variable, FROMADD, which contains the sender's email address. FROMADD=$(echo $FROMADD \ | if grep -q '<' ; \ then echo $FROMADD | grep -o '<.*>' | sed -e 's/[<>]//g' ; \ else echo $FROMADD ; \ fi) TODO: find a better place to this var. Feb 2005 - v0.1 - rhatto - First public release and proof of concept - Based on pgplist (http://www.rediris.es/app/pgplist/index.en.html), but completely written from scratch - Strips all mail headers - Use keyring as database - List variables are sourced from a configuration file. - List subscription is managed through gpg public keyrings, one keyring for each mailing list. - Message is read from STDIN, passed to it by postfix or some other MTA. - Encrypted message is saved in a temporary file on disk. The decrypted message though is not stored in disk, but passed to the MTA through a pipe. - Message is then decrypted, re-encrypted and sent separately to each list subscriber.