* Fix my own queue display patch - if a message has multiple recipients,
only display it once :)
+ * Refresh some other patches due to the line added at the start of dma.c.
-- Peter Pentchev <roam@ringlet.net> Tue, 24 Mar 2009 16:06:57 +0200
struct config *config;
+static const char *username;
+static uid_t uid;
+ static struct strlist seenmsg[16][16];
static int open_locked(const char *, int);
-
-@@ -117,6 +119,45 @@
+@@ -118,6 +120,45 @@
return name;
}
static char *
set_from(const char *osender)
{
-@@ -125,7 +166,7 @@
+@@ -126,7 +167,7 @@
if ((config->features & VIRTUAL) != 0) {
SLIST_FOREACH(v, &virtusers, next) {
sender = strdup(v->address);
if (sender == NULL)
return(NULL);
-@@ -139,7 +180,7 @@
+@@ -140,7 +181,7 @@
if (sender == NULL)
return (NULL);
} else {
return (NULL);
}
-@@ -367,7 +408,7 @@
+@@ -368,7 +409,7 @@
\tid %"PRIxMAX"\n\
\tby %s (%s)\n\
\t%s\n",
sender,
queue->id,
hostname(), VERSION,
-@@ -1121,6 +1162,7 @@
+@@ -1182,6 +1223,7 @@
opterr = 1;
openlog(tag, LOG_PID | LOG_PERROR, LOG_MAIL);
static const char *username;
static uid_t uid;
+static FILE *scanfile;
+ static struct strlist seenmsg[16][16];
static int open_locked(const char *, int);
-
-@@ -396,11 +397,307 @@
+@@ -397,11 +398,307 @@
}
static int
error = snprintf(line, sizeof(line), "\
Received: from %s (uid %d)\n\
-@@ -418,8 +715,12 @@
+@@ -419,8 +716,12 @@
if (write(queue->mailfd, line, error) != error)
return (-1);
break;
linelen = strlen(line);
if (linelen == 0 || line[linelen - 1] != '\n') {
-@@ -433,6 +734,8 @@
+@@ -434,6 +735,8 @@
}
if (fsync(queue->mailfd) != 0)
return (-1);
return (0);
}
-@@ -1104,14 +1407,14 @@
+@@ -1165,14 +1468,14 @@
struct queue queue;
struct queue lqueue;
int i, ch;
switch (ch) {
case 'A':
/* -AX is being ignored, except for -A{c,m} */
-@@ -1153,6 +1456,10 @@
+@@ -1214,6 +1517,10 @@
doqueue = 1;
break;
/* Ignored options */
case 'B':
case 'C':
-@@ -1225,12 +1532,19 @@
+@@ -1286,12 +1593,19 @@
errx(1, "invalid recipient `%s'\n", argv[i]);
}