#!/bin/sh # This is an amateur script to send mixmaster messages with # OpenPGP PGP/inline encrypted bodies with Sylpheed-Claws # from Kai Raven / OpenPGP: D6E995A0. # Maybe somebody with skills in scripting or graphical GUI design can # make a better one and/or a nice client. # License: GPL # # You need: # # Sylpheed-Claws # http://claws.sylpheed.org/ # # a mail server to send Mixmaster messages. You can use Mixmaster's own mail # sending capabilities, but than you loose additional encryption and encrypted transport # of your mail server password, because Mixmaster offers only plaintext LOGIN and AUTH. # # Mixmaster # http://mixmaster.sourceforge.net/ # and in Mixmaster's configuration file ~/.mixmaster/mix.cfg # PGPPUBRING /path/to/.gnupg/pubring.gpg # PGPSECRING /path/to/.gnupg/secring.gpg # CHAIN *...,fromremailer # exit remailer, which does allow from: headers # # Xdialog # http://xdialog.dyns.net/ # # GnuPG # http://www.gnupg.org/ # # a temp dir with tmpfs like this one (from fstab) or use simply /tmp # none /tmp/remail tmpfs defaults,size=1m 0 0 # # Usage: # 1. Save the script as "syl-mixmaster-pgpinline" in your path # 2. Make an action in Sylpheed-Claws: Configuration -> Actions: # Menu name: Mixmaster/Mixmaster-PGPinline # Command line: |syl-mixminion-pgpinline # 3. Write a new message and choose Tools -> Actions -> Mixmaster ->Mixmaster-PGPinline MIXTMP="/tmp/remail" SYLTMP="$MIXTMP/syltmp" MIXP="$HOME/.mixmaster/mixmaster" # ask for message headers, Sylpheed can't supply HEADER=`Xdialog --stdout --separator "|" \ --title "Mixmaster - PGPinline Ciphertext" --buttons-style text \ --left --ok-label Send --cancel-label Abort \ --3inputsbox "Fill in your pseudonym, recipient's e-mail address and subject" 0 0 \ "Pseudonym (nick's firstname surname):" "" \ "Recipient's e-mail address:" "" \ "Subject:" "" \ --no-close --no-cancel --no-buttons --infobox "Done" 0 0 1` ret=$? case $ret in 0) FROM=`echo $HEADER | awk --source 'BEGIN { FS="|" }' --source '{ print $1 }'` && echo From: $FROM > $SYLTMP TO=`echo $HEADER | awk --source 'BEGIN { FS="|" }' --source '{ print $2 }'` && echo To: $TO >> $SYLTMP SUBJ=`echo $HEADER | awk --source 'BEGIN { FS="|" }' --source '{ print $3 }'` && echo Subject: $SUBJ >> $SYLTMP ;; 1) shred -uz $MIXTMP/* exit 1 ;; 255) echo "Box closed." ;; esac # content headers for special characters. # comment, if you don't need them. echo "Content-Type: text/plain; charset=UTF-8" >> $SYLTMP echo "Content-Transfer-Encoding: 8bit" >> $SYLTMP # get message body from Sylpheed and encrypt it with GnuPG echo "" >> $SYLTMP cat - | gpg -r $TO --encrypt >> $SYLTMP echo "" >> $SYLTMP # send n dummy messages before the real messages # set NUMCOPIES n in mix.cfg $MIXP -d # send the OpenPGP encrypted Mixmaster message with (NUMCOPIES n) redundant copies. $MIXP $SYLTMP # eliminate any evidence shred -uz $SYLTMP exit 0