aboutsummaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2009-07-07 13:29:02 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2009-07-07 13:29:02 +0000
commit6d8f6846628c043d27bae7deab1246029df1a6f3 (patch)
tree7dcc0bec394464a194561bbf1c58e200ac9f9c25 /mail
parentc1eba0ce9658c7f0eba7264d6809029890d04a6b (diff)
downloadports-6d8f6846628c043d27bae7deab1246029df1a6f3.tar.gz
ports-6d8f6846628c043d27bae7deab1246029df1a6f3.zip
Notes
Diffstat (limited to 'mail')
-rw-r--r--mail/dma/Makefile2
-rw-r--r--mail/dma/files/patch-libexec_dma_dma.c38
2 files changed, 39 insertions, 1 deletions
diff --git a/mail/dma/Makefile b/mail/dma/Makefile
index c6061f04fc48..86fdfccd7a3a 100644
--- a/mail/dma/Makefile
+++ b/mail/dma/Makefile
@@ -7,7 +7,7 @@
PORTNAME= dma
PORTVERSION= 20090208
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= mail ipv6
MASTER_SITES= http://mirror.roe.ch/dist/dma/
diff --git a/mail/dma/files/patch-libexec_dma_dma.c b/mail/dma/files/patch-libexec_dma_dma.c
new file mode 100644
index 000000000000..8361f7613744
--- /dev/null
+++ b/mail/dma/files/patch-libexec_dma_dma.c
@@ -0,0 +1,38 @@
+--- libexec/dma/dma.c.orig 2009-02-09 01:36:50.000000000 +0100
++++ libexec/dma/dma.c 2009-07-04 00:12:53.000000000 +0200
+@@ -612,6 +612,7 @@
+ const char *errmsg = "unknown bounce reason";
+ struct timeval now;
+ struct stat st;
++ struct flock fl;
+
+ syslog(LOG_INFO, "%s: mail from=<%s> to=<%s>",
+ it->queueid, it->sender, it->addr);
+@@ -620,11 +621,27 @@
+ syslog(LOG_INFO, "%s: trying delivery",
+ it->queueid);
+
++ bzero(&fl, sizeof(fl));
++ fl.l_type = F_WRLCK;
++ fl.l_whence = SEEK_SET;
++ if (fcntl(fileno(it->queuef), F_SETLKW, &fl) == -1) {
++ syslog(LOG_ERR, "%s: failed to lock queue file: %m",
++ it->queueid);
++ }
++
+ if (it->remote)
+ error = deliver_remote(it, &errmsg);
+ else
+ error = deliver_local(it, &errmsg);
+
++ bzero(&fl, sizeof(fl));
++ fl.l_type = F_UNLCK;
++ fl.l_whence = SEEK_SET;
++ if (fcntl(fileno(it->queuef), F_SETLKW, &fl) == -1) {
++ syslog(LOG_ERR, "%s: failed to unlock queue file: %m",
++ it->queueid);
++ }
++
+ switch (error) {
+ case 0:
+ unlink(it->queuefn);