[PLUG] procmail pipe and bash script

Seth seth at gummydrops.com
Thu May 21 04:40:22 UTC 2009


Hi all,

I often get emails that are way too long. I'd like to "twitterize" my  
email and limit senders to a set number of characters. I believe I can  
achieve this with procmail and a Bash script but I can't figure out  
how to do the test in procmail and make it bounce with a friendly  
message.

I thought the script could look something like this

#/bin/bash

charCount=`wc -m`

if [[ $charCount -gt 200 ]]; then
   exit 1	
fi

exit 0


Then make procmail deliver the message if exit code is 0 and bounce if  
1.

-Seth



More information about the PLUG mailing list