svn commit: r304533 - vendor/dma/dist
Baptiste Daroussin
bapt at FreeBSD.org
Sat Aug 20 16:28:19 UTC 2016
Author: bapt
Date: Sat Aug 20 16:28:17 2016
New Revision: 304533
URL: https://svnweb.freebsd.org/changeset/base/304533
Log:
Import Dragonfly Mail agent snapshot from 2016-08-16
Modified:
vendor/dma/dist/VERSION
vendor/dma/dist/dma-mbox-create.c
vendor/dma/dist/dma.c
vendor/dma/dist/dma.h
vendor/dma/dist/dns.c
vendor/dma/dist/local.c
vendor/dma/dist/net.c
Modified: vendor/dma/dist/VERSION
==============================================================================
--- vendor/dma/dist/VERSION Sat Aug 20 16:23:19 2016 (r304532)
+++ vendor/dma/dist/VERSION Sat Aug 20 16:28:17 2016 (r304533)
@@ -1 +1 @@
-v0.10
+v0.11
Modified: vendor/dma/dist/dma-mbox-create.c
==============================================================================
--- vendor/dma/dist/dma-mbox-create.c Sat Aug 20 16:23:19 2016 (r304532)
+++ vendor/dma/dist/dma-mbox-create.c Sat Aug 20 16:28:17 2016 (r304533)
@@ -142,7 +142,7 @@ main(int argc, char **argv)
logfail(EX_CANTCREAT, "cannot build mbox path for `%s/%s'", _PATH_MAILDIR, user);
}
- f = open(fn, O_RDONLY|O_CREAT, 0600);
+ f = open(fn, O_RDONLY|O_CREAT|O_NOFOLLOW, 0600);
if (f < 0)
logfail(EX_NOINPUT, "cannt open mbox `%s'", fn);
Modified: vendor/dma/dist/dma.c
==============================================================================
--- vendor/dma/dist/dma.c Sat Aug 20 16:23:19 2016 (r304532)
+++ vendor/dma/dist/dma.c Sat Aug 20 16:28:17 2016 (r304533)
@@ -321,7 +321,7 @@ deliver(struct qitem *it)
snprintf(errmsg, sizeof(errmsg), "unknown bounce reason");
retry:
- syslog(LOG_INFO, "trying delivery");
+ syslog(LOG_INFO, "<%s> trying delivery", it->addr);
if (it->remote)
error = deliver_remote(it);
@@ -331,7 +331,7 @@ retry:
switch (error) {
case 0:
delqueue(it);
- syslog(LOG_INFO, "delivery successful");
+ syslog(LOG_INFO, "<%s> delivery successful", it->addr);
exit(EX_OK);
case 1:
Modified: vendor/dma/dist/dma.h
==============================================================================
--- vendor/dma/dist/dma.h Sat Aug 20 16:23:19 2016 (r304532)
+++ vendor/dma/dist/dma.h Sat Aug 20 16:28:17 2016 (r304533)
@@ -49,7 +49,7 @@
#define VERSION "DragonFly Mail Agent " DMA_VERSION
#define BUF_SIZE 2048
-#define ERRMSG_SIZE 200
+#define ERRMSG_SIZE 1024
#define USERNAME_SIZE 50
#define MIN_RETRY 300 /* 5 minutes */
#define MAX_RETRY (3*60*60) /* retry at least every 3 hours */
Modified: vendor/dma/dist/dns.c
==============================================================================
--- vendor/dma/dist/dns.c Sat Aug 20 16:23:19 2016 (r304532)
+++ vendor/dma/dist/dns.c Sat Aug 20 16:28:17 2016 (r304533)
@@ -34,6 +34,7 @@
*/
#include <sys/types.h>
+#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <arpa/nameser.h>
Modified: vendor/dma/dist/local.c
==============================================================================
--- vendor/dma/dist/local.c Sat Aug 20 16:23:19 2016 (r304532)
+++ vendor/dma/dist/local.c Sat Aug 20 16:28:17 2016 (r304533)
@@ -196,7 +196,7 @@ retry:
goto out;
}
- error = snprintf(line, sizeof(line), "%sFrom %s\t%s", newline, sender, ctime(&now));
+ error = snprintf(line, sizeof(line), "%sFrom %s %s", newline, sender, ctime(&now));
if (error < 0 || (size_t)error >= sizeof(line)) {
syslog(LOG_NOTICE, "local delivery deferred: can not write header: %m");
goto out;
Modified: vendor/dma/dist/net.c
==============================================================================
--- vendor/dma/dist/net.c Sat Aug 20 16:23:19 2016 (r304532)
+++ vendor/dma/dist/net.c Sat Aug 20 16:28:17 2016 (r304533)
@@ -372,11 +372,13 @@ deliver_to_host(struct qitem *it, struct
host->host, host->addr, c, neterr); \
snprintf(errmsg, sizeof(errmsg), "%s [%s] did not like our %s:\n%s", \
host->host, host->addr, c, neterr); \
- return (-1); \
+ error = -1; \
+ goto out; \
} else if (res != exp) { \
syslog(LOG_NOTICE, "remote delivery deferred: %s [%s] failed after %s: %s", \
host->host, host->addr, c, neterr); \
- return (1); \
+ error = 1; \
+ goto out; \
}
/* Check first reply from remote host */
@@ -426,7 +428,8 @@ deliver_to_host(struct qitem *it, struct
syslog(LOG_ERR, "remote delivery failed:"
" SMTP login failed: %m");
snprintf(errmsg, sizeof(errmsg), "SMTP login to %s failed", host->host);
- return (-1);
+ error = -1;
+ goto out;
}
/* SMTP login is not available, so try without */
else if (error > 0) {
More information about the svn-src-vendor
mailing list