--- l2_ch_smtp.c 2002/07/30 19:08:24 1.10
+++ l2_ch_smtp.c 2003/01/06 11:41:51 1.11
@@ -1,9 +1,10 @@
/*
-** OSSP l2 - Logging Library
-** Copyright (c) 2001-2002 The OSSP Project (http://www.ossp.org/)
-** Copyright (c) 2001-2002 Cable & Wireless Deutschland (http://www.cw.com/de/)
+** OSSP l2 - Flexible Logging
+** Copyright (c) 2001-2003 Cable & Wireless Deutschland GmbH
+** Copyright (c) 2001-2003 The OSSP Project (http://www.ossp.org/)
+** Copyright (c) 2001-2003 Ralf S. Engelschall <rse@engelschall.com>
**
-** This file is part of OSSP L2, a flexible logging library which
+** This file is part of OSSP l2, a flexible logging library which
** can be found at http://www.ossp.org/pkg/lib/l2/.
**
** Permission to use, copy, modify, and distribute this software for
@@ -46,7 +47,7 @@
char *cpLocalProg;
char *cpLocalUser;
char *cpLocalHost;
- long nTimeout;
+ long nTimeout;
sa_addr_t *saaServer;
sa_t *saServer;
} l2_ch_smtp_t;
@@ -91,7 +92,7 @@
static l2_result_t hook_configure(l2_context_t *ctx, l2_channel_t *ch, const char *fmt, va_list ap)
{
l2_ch_smtp_t *cfg = (l2_ch_smtp_t *)ctx->vp;
- l2_param_t pa[10];
+ l2_param_t pa[10];
l2_result_t rv;
l2_env_t *env;
@@ -125,7 +126,7 @@
/* create socket address */
if ((rc = sa_addr_create(&cfg->saaServer)) != SA_OK)
return (rc == SA_ERR_SYS ? L2_ERR_SYS : L2_ERR_INT);
- if ((rc = sa_addr_u2a(cfg->saaServer, "inet://%s:%s",
+ if ((rc = sa_addr_u2a(cfg->saaServer, "inet://%s:%s",
cfg->cpHost, cfg->cpPort)) != SA_OK)
return (rc == SA_ERR_SYS ? L2_ERR_SYS : L2_ERR_INT);
@@ -158,8 +159,8 @@
struct tm *tm;
time_t t;
char caDate[80];
-
- /*
+
+ /*
* Sample SMTP transaction for reference:
*
* | 220 en1.engelschall.com ESMTP SMTP Sendmail 8.11.0+ ready
@@ -175,7 +176,7 @@
* | From: rse@en1.engelschall.com
* | To: rse@engelschall.com
* | Subject: [L2] log channel output on en1.engelschall.com
- * | User-Agent: L2/0.1.0
+ * | User-Agent: L2/0.1.0
* |
* | A program of user rse on host en1.engelschall.com logged:
* | [2001-09-10/01:02:03] <notice> sample logging message
@@ -198,7 +199,7 @@
/* | 220 en1.engelschall.com ESMTP SMTP Sendmail 8.11.0+ ready */
sa_rv = sa_readln(sa, caLine, sizeof(caLine), &n);
cu_on(!(sa_rv == SA_OK && n > 3 && atoi(caLine) == 220), L2_ERR_IO);
-
+
/* | HELO l2
* | 250 en1.engelschall.com Hello en1.engelschall.com [141.1.129.1], pleased to meet you */
sa_writef(sa, "HELO %s\r\n", cfg->cpLocalHost);
@@ -227,7 +228,7 @@
* | From: rse@en1.engelschall.com
* | To: rse@engelschall.com
* | Subject: [L2] log channel output on en1.engelschall.com
- * | User-Agent: L2/0.1.0
+ * | User-Agent: L2/0.1.0
* | */
t = time(NULL);
tm = localtime(&t);
@@ -237,7 +238,7 @@
sa_writef(sa, "To: %s\r\n", cfg->cpRcpt);
sa_writef(sa, "Subject: %s\r\n", cfg->cpSubject);
if (cfg->cpLocalProg != NULL)
- sa_writef(sa, "User-Agent: %s (%s)\r\n",
+ sa_writef(sa, "User-Agent: %s (%s)\r\n",
l2_version.v_web, cfg->cpLocalProg);
else
sa_writef(sa, "User-Agent: %s\r\n", l2_version.v_web);
@@ -246,10 +247,10 @@
/* | A program of user rse on host en1.engelschall.com logged:
* | [2001-09-10/01:02:03] <notice> sample logging message */
if (cfg->cpLocalProg != NULL)
- sa_writef(sa, "Program %s of user %s on host %s logged:\r\n",
+ sa_writef(sa, "Program %s of user %s on host %s logged:\r\n",
cfg->cpLocalProg, cfg->cpLocalUser, cfg->cpLocalHost);
else
- sa_writef(sa, "A program of user %s on host %s logged:\r\n",
+ sa_writef(sa, "A program of user %s on host %s logged:\r\n",
cfg->cpLocalUser, cfg->cpLocalHost);
cpB = buf;
cpE = buf;
|