Josh Kramer <kramer(_at_)gfs(_dot_)pvt(_dot_)k12(_dot_)pa(_dot_)us> writes:
Is there a way to set up procmail so that it omits your .sig text from
incoming mail? Some messages at my site receive enough replies to have 6 or
more copies of many different people's sig files - annoying, to say the
least.
Not perfect but this is what I use:
:0 f
| formail -c | kill.sig.perl
When I see an evil signature I save it to a file named after the 'From
user ' text. So my signature 'From rory(_at_)wolfram(_dot_)com' is saved in a
file
.../Mail/signatures/rory. When the signature changes I'll see it again
but mostly this scheme them go away. [I haven't found people to
reliably use '--' to mark the start of signatures.]
This solution doesn't really address folks citing other's sigs and
sending them on.
"kill.sig.perl" is this:
#!/usr/local/bin/perl
undef $/ ;
$message = <STDIN> ;
( $from ) = ( $message =~ /From ([^ ]+)/ );
$from =~ s/\(_at_)wri(_dot_)com//i;
open( SIG, "/home3/rory/Mail/signatures/$from" ) ;
chop( $sig = <SIG> );
$sig =~ tr/a-zA-Z0-9_\-\n/\./c ;
$message =~ s/$sig//mgi if ( $sig ) ;
$message =~ s/[\n]+$//; # kill trailing newlines
print $message;
print "\n\n" ; # or you'll upset vm