blob: 91dee6bc82f530aeaea859786f3704b585763421 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49#!/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:/
|