Subject: Sendmail variants

From: [email-masked] (Gabriel Millerd)
Date: 2 Oct 1994 19:56:10 GMT

Hello all,

The object of the program is to shuffle my signature files around as 
frequently as possible.

I am trying to write a program that will shuffle all the files in 
$HOME/.sig directory and copy one to $HOME/.signature. Also I want the 
program to pass all of its arguments to "sendmail" so the actual mesasge 
will be sent.

This will work GREAT with pine, since pine allows you to specify your 
sendmail program in the $HOME/.pinerc file.

Can anyone help me?

Thanks {please respond in email as i cannot read news often}

---

From: Alex Lewin <[email-masked]>
Date: Sun, 2 Oct 1994 16:34:59 -0400 (EDT)

> program to pass all of its arguments to "sendmail" so the actual mesasge 

Instead of doing that, why don't you make .signature into a named pipe
instead of a regular file, and run a program which writes to it?

For example (bournish shell):

[512]$ mknod FOO p
[513]$ (while [ 1 ] ; do fortune > FOO ; done) &
[1] 24116
[514]$ cat FOO
"The C Programming Language -- A language which combines the
flexibility of assembly language with the power of assembly language."
[515]$ cat FOO
If I had any humility I would be perfect.
                -- Ted Turner
etc.

Alex

---

From: Roman Czyborra <[email-masked]>
Date: Thu, 06 Oct 1994 00:59:26 +0100

Gabriel Millerd wrote on October 2:
> This will work GREAT with pine, since pine allows you to specify
> your sendmail program in the $HOME/.pinerc file.

I am afraid you confused this with Mail's ~/.mailrc.  As far as I know
neither Pine nor Elm allow by default every user to customize the
sendmail program to use.

Often it is desirable for Unix virtuosos to plug in their own sendmail
wrapper that does some additional postprocessing on the composed
message before sending it out.

For Pine (and similarly for Elm) this can be achieved by compiling in
"${SENDMAIL=/usr/lib/sendmail}" instead of /usr/lib/sendmail.  Now, if
I setenv SENDMAIL mysendmail and have such a script in my path it will
be used.  This is exploiting a feature of sh's.

Such a script can do all sorts of fancy stuff.

Gabriel Millerd: The object of the program is to shuffle my signature
> files around as frequently as possible.

Nick Sushkin: In pine 3.90, is it possible to disable content encoding
> of 8-bit characters?

Paulo Magalhaes: I would like to run a script everytime that pine
> sends a message.  Using default-fcc=<a call to my script> seemed
> like a good idea, but I don't seem to be able to do this...

Here is a sample script to do all of this

	#!/usr/local/bin/procmail -m

	# No QP-encoding for certain recipients

		:2 fbw
		^Content-Transfer-Encoding: quoted-printable
		^To:.*(cs.tu|zib|fu|hu)-berlin.de
		| mmencode -undo -quoted-printable

		:a fhw
		| formail -I 'Content-Transfer-Encoding: 8bit'

	# Append one of my ten signatures

		:0 fbw
		| gawk 'BEGIN { ARGV[2] = "sig" systime() % 10 } /^/' - sig

	# Send out the mail

		:0c
		! -oi -t

	# And file a copy

		:B:
		pine
		pine-mail

		DEFAULT=sent

---

From: Roman Czyborra <[email-masked]>
Date: Thu, 06 Oct 1994 01:44:29 +0100

:2 fbw

		:a fhw

		:0 fbw

	# Send out the mail

		:0c
		! "$@"

	# And file a copy

		:B:
		pine
		pine-mail

		DEFAULT=sent