procmail
[Top] [All Lists]

Re: Using procmail to filter my outgoing mail?

1996-06-20 08:35:09
-----BEGIN PGP SIGNED MESSAGE-----

On Thu, 20 Jun 1996, Gilles Carmel wrote:

The problem is that the recipient will get a message from me with no
subject and no body in the
message.  I would like this to be avoid.   I would think that if procmail
could filter my outgoing
mail, I could for example kill all message I sent with no subject in them.
But I do not
find any example of this in the man pages.

Just a rough sketch:

:0
<conditions to determine if the mail is related to the game>
{
# Generate a reply header
:0fh
| formail -r ...

# Process the command
:0f
| your_program

# If the command contains an error, the subject header if empty
SUBJECT=`formail -zxSubject:`

# If we have a subject, the command was processed correct, so we send the 
# mail 
:0
* SUBJECT ?? .
| $SENDMAIL -t

# Otherwise, we put the message in a folder for manual intervention
:0:
typo_folder
}

This will only work if your command parser leaves the original message 
when it can't process a command.

- --
Guy Geens <guy(_dot_)geens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be>: Ph.D. 
student at ELIS -- TFCG / IMEC 
Home Page: http://www.elis.rug.ac.be/ELISgroups/tfcg/staff/gg.html 
finger ggeens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be for PGP public keys (or use 
keyserver) 

"We had two bags of grass, seventy-five pellets of mescaline, five sheets of
high-powered blotter acid, a salt shaker half full of cocaine, and a whole
galaxy of multi-coloured uppers, downers, screamers, laughers.. and also a
quart of tequila, a quart of rum, a case of Budweiser, a pint of raw ether
and two dozen amyls. The only thing that really worried me was the ether. 
There is nothing in the world more helpless and irresponsible and 
depraved than a man in the depths of an ether binge..."
                "Fear and loathing in Las Vegas", Hunter S. Thompson



-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
Comment: pgp fingerprints in message headers

iQBVAwUBMclucnwHoCha5QR1AQGuLQH/TWU026f+Hot5N2bs5axM0TPJmpCc9Xe4
6aXZpsXMSmxuVcvNAn/hZEloIypFzxB8eMETkHPy8cOFQdoXiCbliA==
=fd7K
-----END PGP SIGNATURE-----

<Prev in Thread] Current Thread [Next in Thread>