diff options
Diffstat (limited to 'web/attachments/117526-cel.diff')
-rw-r--r-- | web/attachments/117526-cel.diff | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/web/attachments/117526-cel.diff b/web/attachments/117526-cel.diff new file mode 100644 index 0000000..f205f63 --- /dev/null +++ b/web/attachments/117526-cel.diff | |||
@@ -0,0 +1,71 @@ | |||
1 | *** /tools/nagios/libexec/check_email_loop.pl.orig Fri Jan 28 08:08:29 2005 | ||
2 | --- /tools/nagios/libexec/check_email_loop.pl Fri Jan 28 08:38:01 2005 | ||
3 | *************** | ||
4 | *** 42,51 **** | ||
5 | my $state = "UNKNOWN"; | ||
6 | my ($sender,$receiver, $pophost, $popuser, $poppasswd, $smtphost); | ||
7 | my ($poptimeout,$smtptimeout,$pinginterval)=(60,60,5); | ||
8 | ! my ($lostwarn, $lostcrit,$pendwarn, $pendcrit); | ||
9 | |||
10 | # Internal Vars | ||
11 | my ($pop,$msgcount,@msglines,$statinfo,@messageids,$newestid); | ||
12 | my ($matchcount,$statfile) = (0,"check_email_loop.stat"); | ||
13 | |||
14 | # Subs declaration | ||
15 | --- 42,52 ---- | ||
16 | my $state = "UNKNOWN"; | ||
17 | my ($sender,$receiver, $pophost, $popuser, $poppasswd, $smtphost); | ||
18 | my ($poptimeout,$smtptimeout,$pinginterval)=(60,60,5); | ||
19 | ! my ($lostwarn, $lostcrit,$pendwarn, $pendcrit, $debug); | ||
20 | |||
21 | # Internal Vars | ||
22 | my ($pop,$msgcount,@msglines,$statinfo,@messageids,$newestid); | ||
23 | + my(%other_smtp_opts); | ||
24 | my ($matchcount,$statfile) = (0,"check_email_loop.stat"); | ||
25 | |||
26 | # Subs declaration | ||
27 | *************** | ||
28 | *** 65,70 **** | ||
29 | --- 66,72 ---- | ||
30 | my $status = GetOptions( | ||
31 | "from=s",\$sender, | ||
32 | "to=s",\$receiver, | ||
33 | + "debug", \$debug, | ||
34 | "pophost=s",\$pophost, | ||
35 | "popuser=s",\$popuser, | ||
36 | "passwd=s",\$poppasswd, | ||
37 | *************** | ||
38 | *** 101,108 **** | ||
39 | my $serial = time(); | ||
40 | $serial = "ID#" . $serial . "#$$"; | ||
41 | |||
42 | # sending new ping email | ||
43 | ! my $smtp = Net::SMTP->new($smtphost,Timeout=>$smtptimeout) | ||
44 | || nsexit("SMTP connect timeout ($smtptimeout s)",'CRITICAL'); | ||
45 | ($smtp->mail($sender) && | ||
46 | $smtp->to($receiver) && | ||
47 | --- 103,116 ---- | ||
48 | my $serial = time(); | ||
49 | $serial = "ID#" . $serial . "#$$"; | ||
50 | |||
51 | + | ||
52 | # sending new ping email | ||
53 | ! %other_smtp_opts={}; | ||
54 | ! if ( $debug == 1 ) { | ||
55 | ! $other_smtp_opts{'Debug'} = 1; | ||
56 | ! } | ||
57 | ! | ||
58 | ! my $smtp = Net::SMTP->new($smtphost,Timeout=>$smtptimeout, %other_smtp_opts) | ||
59 | || nsexit("SMTP connect timeout ($smtptimeout s)",'CRITICAL'); | ||
60 | ($smtp->mail($sender) && | ||
61 | $smtp->to($receiver) && | ||
62 | *************** | ||
63 | *** 216,221 **** | ||
64 | --- 224,230 ---- | ||
65 | print " -lostcrit=num CRITICAL \n"; | ||
66 | print " -pendwarn=num WARNING-state if more than num pending emails\n"; | ||
67 | print " -pendcrit=num CRITICAL \n"; | ||
68 | + print " -debug send SMTP tranaction info to stderr\n"; | ||
69 | print " Options may abbreviated!\n"; | ||
70 | print " LOST mails are mails, being sent before the last mail arrived back.\n"; | ||
71 | print " PENDING mails are those, which are not. (supposed to be on the way)\n"; | ||