pkgsrc/mail/smtpfeed/patches/patch-ag

101 lines
3.3 KiB
Text
Raw Normal View History

$NetBSD: patch-ag,v 1.1 2006/07/23 15:00:41 taca Exp $
--- lmtp.c.orig 2002-01-20 23:19:42.000000000 +0900
+++ lmtp.c
@@ -67,8 +67,22 @@
static int state;
static int save_rcpts_trans;
+static void sig_quit P((int));
+static void lmtp_greeting P((void));
+static int lmtp_lhlo P((char *));
+static int lmtp_mail P((char *));
+static int lmtp_rcpt P((char *));
+static int lmtp_data P((char *));
+static int lmtp_quit P((void));
+static int lmtp_rset P((void));
+static int lmtp_noop P((void));
+static int lmtp_help P((char *));
+static int lmtp_nocmd P((void));
+static int read_message P((void));
+
static void
-sig_quit()
+sig_quit(dummy)
+ int dummy;
{
exit(EX_TEMPFAIL);
}
@@ -116,7 +130,7 @@
if (strcasecmp(lmtpbuf, cmdp->cmd) == 0) {
if (cnf.debug & DEBUG_LMTP)
- log(LOG_DEBUG, "LMTP input: %s %s", lmtpbuf,
+ mylog(LOG_DEBUG, "LMTP input: %s %s", lmtpbuf,
(p == NULL)?"":p);
ret = (*cmdp->func)(p);
fflush (LmtpOut);
@@ -242,7 +256,7 @@
return 0;
}
if (cnf.debug & DEBUG_LMTP)
- log(LOG_DEBUG, "MAIL FROM: %s size=%s body=%s envid=%s ret=%s", addr,
+ mylog(LOG_DEBUG, "MAIL FROM: %s size=%s body=%s envid=%s ret=%s", addr,
(env.size == NULL)?"":env.size, (env.body == NULL)?"":env.body,
(env.envid == NULL)?"":env.envid, (env.ret == NULL)?"":env.ret);
fprintf (LmtpOut, "250 %s Sender ok\n", addr);
@@ -358,7 +372,7 @@
deliver(); /* delivery with SMTP */
lmtp_data_response(1);
- log(LOG_INFO, "nquery=%d/%d nconnect=%d/%d ntimeout=%d ntrans=%d/%d nsent=%d/%d ndeferred=%d nerror=%d+%d dnsmaxcq=%d maxsock=%d tmx=%d tdelivery=%d/%d maxdelay=%d tdelay=%d tsendmail=%d dns_i/o=%d/%d smtp_i/o=%d/%d mem=%d",
+ mylog(LOG_INFO, "nquery=%d/%d nconnect=%d/%d ntimeout=%d ntrans=%d/%d nsent=%d/%d ndeferred=%d nerror=%d+%d dnsmaxcq=%d maxsock=%d tmx=%d tdelivery=%d/%d maxdelay=%d tdelay=%d tsendmail=%d dns_i/o=%d/%d smtp_i/o=%d/%d mem=%d",
sti.nanswers, sti.nqueries, sti.nquitok, sti.nconnect,
sti.ntimeout, sti.noktrans, sti.ntrans, sti.nsent, sti.nrcpt,
sti.ndeferred, sti.nnsfailed, sti.nsmtpfailed,
@@ -521,7 +535,7 @@
if (strstr(rcptp->response, rcptp->address) == NULL)
{
if (cnf.debug & DEBUG_LMTP)
- log(LOG_DEBUG, "%d %s... %s",
+ mylog(LOG_DEBUG, "%d %s... %s",
rcptp->result, rcptp->address,
rcptp->response);
fprintf (LmtpOut, "%d %s... %s\n",
@@ -529,7 +543,7 @@
rcptp->response);
} else {
if (cnf.debug & DEBUG_LMTP)
- log(LOG_DEBUG, "%d %s",
+ mylog(LOG_DEBUG, "%d %s",
rcptp->result, rcptp->response);
fprintf (LmtpOut, "%d %s\n",
rcptp->result, rcptp->response);
@@ -542,7 +556,7 @@
sti.ndeferred++;
if (cnf.debug & DEBUG_LMTP)
- log(LOG_DEBUG, "%d %s... %s",
+ mylog(LOG_DEBUG, "%d %s... %s",
SMTP_TEMPFAIL(51), rcptp->address, msg);
fprintf (LmtpOut, "%d %s... %s\n",
SMTP_TEMPFAIL(51), rcptp->address, msg);
@@ -709,7 +723,7 @@
{
msgp->data = (char *)MALLOC(CHUNKSIZE);
if (cnf.debug & DEBUG_LMTP)
- log(LOG_DEBUG, "new chunk %d", ++chunk_num);
+ mylog(LOG_DEBUG, "new chunk %d", ++chunk_num);
if (msgp->data == NULL)
{
outofmemory = 1;
@@ -725,7 +739,7 @@
if (outofmemory)
{
- log(LOG_NOTICE, "out of memory (LMTP data buffer allocation)");
+ mylog(LOG_NOTICE, "out of memory (LMTP data buffer allocation)");
return -1;
}
return 0;