Achim's Mozilla Extensions » 10 Years «
 
 
 About
 Introduction 
 Contributors 
 Press 
 Links 
 ToDo 
 Sitemap 

 Thunderbird
 Signature Switch 
     » Screenshots 
     » Download 
     » FAQ 
 NestedQuote Remover 
     » Screenshots 
     » Download 
 NewMail Execute 
     » Screenshots 
     » Download 

 Firefox
 Save Link in Folder 
     » Screenshots 
     » Download 
     » FAQ 
 Save Image in Folder 
     » Screenshots 
     » Download 
     » FAQ 

 Contact
 eMail 


Developed withThe best Java IDE
 
Linux Mint
 
 
Signature Switch   Signature Switch - Pre-Load-Executable

Using the Pre-Load-Executable-feature you can launch an external program to do specific tasks which should be done before actually loading the signature-file.

The following items get handed over to the "Pre-Load-Executable"-program (in listed order):
  • the full path of the sig-file to be loaded
  • the subject of the current message
  • the "from:"-email-address
  • the "to:"-email-address(es) (if present when switching)
  • the "cc:"-email-address(es) (if present when switching)
  • the "bcc:"-email-address(es) (if present when switching)
  • the addressed newsgroups (if present when switching)
Note:
When this feature is activated the executable will be launched whenever a signature gets loaded. If you only want to take action on specific signatures then the program has to deal with that itself (see third example below).



Here are some basic usage examples...

Invoking a shell-script that puts your Linux-version and Uptime into the sig-file:


#!/bin/sh
echo    "-- "          > "$1"
echo -n "My Linux: "  >> "$1"
cat  /proc/version    >> "$1"
echo -n "My Uptime: " >> "$1"
uptime                >> "$1"

Check for a certain recipient and add extra information:


#!/bin/sh

SIGFILE="$1"

echo "-- "                           > "$SIGFILE"
echo "Business Phone Number: 12345" >> "$SIGFILE"

until [ -z "$1" ]
do
	
  if [ "$1" == "moe@zilla.org" ]; then
    echo "Private Phone Number: 67890" >> "$SIGFILE"
  fi
  
  shift
  
done

Do some manipulation only when a certain signature was selected:


#!/bin/sh

SIGNAME=`basename "$1"`
IPADDRESS=`/sbin/ifconfig eth0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'` >> "$1"

if [ "$SIGNAME" == "internal.txt" ]; then
  echo    "-- "              > "$1"
  echo -n "My current IP: " >> "$1"
  echo     $IPADDRESS       >> "$1"
fi