This section describes how to integrate premail with MH, emacs,
and UCBMail. With these mailers, premail will only handle outgoing
mail automatically. To decode incoming mail, you still need to invoke
premail -decode
by hand.
To add premail support to emacs, just add this line to your .emacs file:
(setq sendmail-program "/your/path/to/premail")
In whatever directory you keep the premail executable, create a symbolic link as follows:
ln -s premail prepost
Under the name ``prepost'', premail will masquerade as MH's post program rather than sendmail. You can get MH to call premail instead of post by adding this line to your .mh_profile:
postproc: /your/path/to/prepost
One thing to keep in mind is that premail's processing is done before that of post. Thus, if you have MH aliases, they will get expanded after the call to premail. If you use only premail aliases, only MH aliases, or neither, this won't be a problem.
Alternatively, if you have appropriate privileges, you can add this line to /usr/lib/mh/mtstailor:
sendmail: /your/path/to/premail
You may also have to configure MH to call sendmail locally rather than connecting to an SMTP server. Don't do both the mtstailor and mh_profile methods -- that would run premail twice.
UCBmail is a simple mailer front-end (also known as Mail and mailx). If, when you type ``mail user@site.dom'', the mailer asks you for a ``Subject: '' line, you are undoubtedly using UCBmail. If so, you are in luck - it integrates very easily with premail. Just add this line to your ~/.mailrc file:
set sendmail=/your/path/to/premail
Using premail with UCBmail is not very different from using premail by itself, but you do get some handy features, such as including files and using an editor on the mail.