aboutsummaryrefslogtreecommitdiffstats
path: root/libesmtp
Commit message (Collapse)AuthorAgeFilesLines
* Remove last traces of gethostbyname().Matthias Andree2017-04-222-331/+0
|
* Merge portability patch from Peter O'Gorman, fetchmail-devel 2007-10-31.Matthias Andree2007-12-261-1/+1
| | | | | | This requires some minor fixes though. svn path=/branches/BRANCH_6-3/; revision=5145
* Further cleanups to compile with C++ compiler.Matthias Andree2006-03-151-2/+2
| | | | svn path=/branches/BRANCH_6-3/; revision=4744
* Add gethostby* from libesmtpMatthias Andree2005-08-284-18/+361
| | | | svn path=/trunk/; revision=4278
* Remove excess imports.Matthias Andree2005-08-268-1424/+0
| | | | svn path=/trunk/; revision=4260
* Bring libesmtp import into trunk.Matthias Andree2005-08-254-0/+712
| | | | svn path=/trunk/; revision=4259
* Bring libesmtp import into trunk.Matthias Andree2005-08-256-0/+1093
svn path=/trunk/; revision=4254
olor: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/usr/bin/perl

# fetchmail -> procmail pretti-fier proxy thingamajig
# ver. 2000-04-01
#
# John Lim Eng Hooi <jleh@mail.com>
#

# Where's procmail located?
$proc_path = '/usr/bin/procmail';

# Define your ANSI color codes here, I've only bothered to define
# those I use :)
$ANSI_green = "\e[0;32m";
$ANSI_b_white = "\e[1;37m";
$ANSI_normal = "\e[0;39m";

# Open up procmail
open (PROCPIPE, "|$proc_path") || die "Can't open procmail pipe!";

# Analyze the message line by line
while (<STDIN>) {

   # Suck up the lines we want, in this case I just want From: and Subject:
   if (/^From:/) {
     $from = $_;
   }

   if (/^Subject:/) {
     $subj = $_;
   }

   # Stuff it out to the pipe too
   print PROCPIPE;
}

# Print it out
print "\n";
print $ANSI_green, "  ", $from;
print $ANSI_b_white, "  ", $subj, $ANSI_normal;

# fetchmail's status is appended after this
print "  -->";

# We're done
close (PROCPIPE);