On Tue, 10 Nov 1998, Noah L. Meyerhans wrote: > -----BEGIN PGP SIGNED MESSAGE----- > > On Tue, 10 Nov 1998, Kent West wrote: > > > Is there a[n easy] way to set up your signature file in Pine so that a > > different fortune is sent with each signature? (I've come to realize that > > with Linux, yes, it's possible, because you can do just about anything, > > but is it _easily_ done?) > > Yes, it can be done, and it's not hard at all. I do something similar, > except instead of using fortune, I have a directory with a bunch of > different text files. Each text file contains 1 sig. I wrote a pine > filter to automatically append a random file from this directory to my > outgoing messages. This gives me a bit more control over what goes out, > as opposed to using fortune, where you never know what you'll get. > > Here is a one line script that might work for your purpose: > #!/bin/sh > fortune >> $1 > > $1 is the name of a temp file that contains the body of your outgoing > message. So you can see how the script will simply append the output of > fortune to your message. Now you need to tell Pine to use that script as > an outgoing filter. In Pine's config, find the "sending-filter" option, > and specify the filename of your script followed by _TMPFILE_, which is > the $1 option that your script expects. > > You'll also want to check compose-send-offers-first-filter if you'd like > your script to be the default filter, offered whenever you send a message. > > note that you won't see one of my sigs attached to this message. I have > sent it through a different filter to PGP sign it. > > noah > >
Thanks for the response. I almost understand. I sent myself a test message and the fortune did not show up. Two questions: 1) Does the filter run before I compose the message? In other words, should I be able to see the fortune in my sig below right now as I'm typing this, or does it get added when I actually send the message? 2) I named the temp file sigfortune, and in Pine's config I specified the sending-filter to be "sigfortune _TMPFILE_" (without the quotes). I assume the _TMPFILE_ is a filename that Pine uses, or was that just a dummy name you invented and I'm supposed to use some other real file name? Also, do I need to specify more of the sigfortune path, such as "./sigfortune" or "%homedir%/sigfortune" (can I even use a variable such as "%homedir%" in Linux?)? Do I need to modify permissions on sigfortune? Thanks! -- Kent West [EMAIL PROTECTED] KC5ENO - Amateur Radio: When all else fails. Linux - Finally! A real OS for the Intel PC!