Previous Next Table of Contents

8. Command line

Hopefully, you have integrated premail into your mail client, and you won't have to invoke it from the command line. However, there may still be times when it is convenient to use premail from the command line.

The most basic use of premail is as a replacement for sendmail. For example, you can send mail directly from the command line, as follows (here, the > represents the Unix prompt):

> premail -t
To: raph@cs.berkeley.edu ((sign))
Subject: premail bug report

Here's a bug in premail: ...
.
>

The -t option specifies that the recipients are extracted from the header fields (To:, Cc:, Bcc:, and the Resent- variants of each). As in sendmail, you can specify the recipients on the command line instead of using the -t option.

In addition, you can set configuration options from the command line, using the +option=value syntax. This is especially useful with the debug option (see section Debugging. For example, to show you what happens when formatting mail for remailers, but not actually send the message:


> premail +debug=ry -t
To: raph@cs.berkeley.edu ((chain=1))
Subject: test of remailer

test
.
Chose chain exon
/usr/lib/sendmail -oi remailer\@remailer\.nl\.com << -eof-
To: remailer@remailer.nl.com

::
Encrypted: PGP

-----BEGIN PGP MESSAGE----- remailer@remailer.nl.com
::
Request-Remailing-To: raph@cs.berkeley.edu

##
Subject: test of remailer

test
-----END PGP MESSAGE-----
-eof-

There is one configuration option that can only be set from the command line in this fashion, which is the location of the preferences file itself. The configuration option is preferences, and the default value is ~/.premail/preferences.


Previous Next Table of Contents