Expirable Email Addresses
Using the Mail Avenger macutil command

Create a file called $HOME/.avenger/.macutil containing a single line of text that will be your password for macutil. (It doesn't matter what you put in there, as long as it is hard for spammers to guess.)

If your primary email address is user@your.host.com, then add the following to your .login (for users of csh and derived shells):

setenv MACUTIL_SENDER 'user+return+*@your.host.com'
or the following to your .profile (for Boune-derived shell users):
MACUTIL_SENDER='user+return+*@your.host.com'
export MACUTIL_SENDER
Then place the following in $HOME/.avenger/rcpt+return+default:
macutil -c "$SUFFIX" 2> /dev/null \
    || reject "<$RECIPIENT>... unknown or expired address"

Integrating with /usr/bin/Mail

Link the macutil command to a file named sendmac. For example, you might run the following commands:
mkdir $HOME/bin
ln -s /usr/local/bin/macutil $HOME/bin/sendmac
Put the following line in $HOME/.mailrc:
set sendmail="/PATH/TO/YOUR/HOME/bin/sendmac"

Integrating with emacs / Gnus

Link the macutil command to a file named sendmac. For example, you might run the following commands:
mkdir $HOME/bin
ln -s /usr/local/bin/macutil $HOME/bin/sendmac
Place the following in your .emacs or .gnus file:
(setq message-sendmail-f-is-evil t)
(setq sendmail-program "/PATH/TO/YOUR/HOME/bin/sendmac"

(setq macutil-expire "2M")
(defun av-from ()
  (with-temp-buffer
    (call-process "macutil" nil t nil
                  (concat "--expire=+" macutil-expire)
                  "--sender" "user+return+*@your.host.com"
                  "--from" "Your Full Name"
                  "--fromexp" "address expires")
    (goto-char (point-max))
    (delete-char -1)
    (search-backward " <")
    (insert "\n   ")
    (buffer-string)))

(setq message-generate-headers-first t)
(setq gnus-posting-styles
      '((".*"
         ("From" '(av-from)))
        ))

<<< Back to Tips page