-dma (0.0.2009.08.29-1) UNRELEASED; urgency=low
+dma (0.0.2010.07.16-1) UNRELEASED; urgency=low
* New upstream version:
- remove the 20-parse-recipient patch, implemented upstream in
Description: Several fixes to make dma build on Debian.
- - build and install the files in the etc/ subdirectory;
- - generate aliases_parse.h and let the others depend on it;
- - define the __DECONST macro;
- use mtime instead of mtimespec.
Origin: other: http://svn.ringlet.net/svn/ringlet/mail/dma/
Forwarded: not-needed
Author: Peter Pentchev <roam@ringlet.net>
-Last-Update: 2010-06-02
+Last-Update: 2010-06-18
---- a/Makefile
-+++ b/Makefile
-@@ -1,6 +1,8 @@
- # $DragonFly: src/libexec/dma/Makefile,v 1.5 2008/09/19 00:36:57 corecode Exp $
- #
-
-+SUBDIR= etc
-+
- CFLAGS+= -I${.CURDIR}
-
- DPADD= ${LIBSSL} ${LIBCRYPTO}
-@@ -16,4 +18,23 @@
- BINMODE=2555
- WARNS?= 6
-
-+# The pmake Debian package does not seem to deal properly with y.tab.h
-+
-+DPSRCS+= aliases_parse.h
-+CLEANFILES+= aliases_parse.h
-+
-+YFLAGS+= -d
-+
-+aliases_parse.c: aliases_parse.y
-+ ${YACC} ${YFLAGS} aliases_parse.y
-+ mv y.tab.c aliases_parse.c
-+
-+aliases_parse.h: aliases_parse.c
-+ mv y.tab.h aliases_parse.h
-+
-+aliases_parse.o: aliases_parse.h
-+aliases_scan.o: aliases_parse.h
-+
- .include <bsd.prog.mk>
-+
-+.include <bsd.subdir.mk>
--- a/dma.c
+++ b/dma.c
-@@ -276,7 +276,7 @@
+@@ -295,7 +295,7 @@
exit(1);
}
if (gettimeofday(&now, NULL) == 0 &&
-- (now.tv_sec - st.st_mtimespec.tv_sec > MAX_TIMEOUT)) {
+- (now.tv_sec - st.st_mtim.tv_sec > MAX_TIMEOUT)) {
+ (now.tv_sec - st.st_mtime > MAX_TIMEOUT)) {
asprintf(__DECONST(void *, &errmsg),
"Could not deliver for the last %d seconds. Giving up.",
MAX_TIMEOUT);
---- a/dma.h
-+++ b/dma.h
-@@ -48,6 +48,10 @@
- #endif /* __GNUC__ */
- #endif
-
-+#ifndef __DECONST
-+#define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var))
-+#endif /* __DECONST */
-+
- #define VERSION "DragonFly Mail Agent"
-
- #define BUF_SIZE 2048
Origin: other: http://svn.ringlet.net/svn/ringlet/mail/dma/
Forwarded: not-needed
Author: Peter Pentchev <roam@ringlet.net>
-Last-Update: 2010-06-02
+Last-Update: 2010-06-18
--- a/dma.8
+++ b/dma.8
.Xc
Path to the local aliases file.
Just stick with the default.
---- a/etc/dma.conf
-+++ b/etc/dma.conf
+--- a/dma.conf
++++ b/dma.conf
@@ -2,13 +2,15 @@
#
# Your smarthost (also called relayhost). Leave blank if you don't want
-#SMARTHOST
+# NOTE: on Debian systems this is handled via debconf!
+# Please use dpkg-reconfigure dma to change this value.
-+SMARTHOST mail.example.com
++#SMARTHOST mail.example.com
# Use this SMTP port. Most users will be fine with the default (25)
- PORT 25
+ #PORT 25
# Path to your alias file. Just stay with the default.
--ALIASES /etc/mail/aliases
-+ALIASES /etc/aliases
+-#ALIASES /etc/mail/aliases
++#ALIASES /etc/aliases
# Path to your spooldir. Just stay with the default.
- SPOOLDIR /var/spool/dma
+ #SPOOLDIR /var/spool/dma
@@ -39,7 +41,7 @@
# Uncomment if you want to defer your mails. This is useful if you are
# Uncomment if you want the bounce message to include the complete original
# message, not just the headers.
+--- a/dma.c
++++ b/dma.c
+@@ -70,12 +70,12 @@
+ struct config config = {
+ .smarthost = NULL,
+ .port = 25,
+- .aliases = "/var/mail/aliases",
++ .aliases = "/etc/aliases",
+ .spooldir = "/var/spool/dma",
+ .virtualpath = NULL,
+ .authpath = NULL,
+ .certfile = NULL,
+- .features = 0,
++ .features = DEFER,
+ .mailname = NULL,
+ .mailnamefile = NULL,
+ };
+++ /dev/null
-Description: Install the dma binary with the correct permissions.
- As per the Debian Policy, change the /usr/sbin/dma permissions from 2555
- to 2755, since removing root write access gains us nothing.
- Also, install the etc/ files with the correct owner and group; it seems
- that Debian pmake's bsd.files.mk does not understand SHAREOWN and SHAREGRP.
-Origin: other: http://svn.ringlet.net/svn/ringlet/mail/dma/
-Forwarded: not-needed
-Author: Peter Pentchev <roam@ringlet.net>
-Last-Update: 2010-06-02
-
---- a/Makefile
-+++ b/Makefile
-@@ -15,7 +15,7 @@
-
- BINOWN= root
- BINGRP= mail
--BINMODE=2555
-+BINMODE=2755
- WARNS?= 6
-
- # The pmake Debian package does not seem to deal properly with y.tab.h
---- a/etc/Makefile
-+++ b/etc/Makefile
-@@ -1,8 +1,8 @@
- # $DragonFly: src/etc/dma/Makefile,v 1.3 2008/02/12 22:10:20 matthias Exp $
-
- FILESDIR= /etc/dma
--SHAREOWN= root
--SHAREGRP= mail
-+FILESOWN= root
-+FILESGRP= mail
- FILESMODE= 640
-
- .if !exists(${DESTDIR}/etc/dma/auth.conf)
Origin: other: http://svn.ringlet.net/svn/ringlet/mail/dma/
Forwarded: not-needed
Author: Peter Pentchev <roam@ringlet.net>
-Last-Update: 2010-06-02
+Last-Update: 2010-06-18
---- a/Makefile
-+++ b/Makefile
-@@ -3,10 +3,11 @@
-
- SUBDIR= etc
-
-+CFLAGS+= -DHAVE_LIBLOCKFILE
- CFLAGS+= -I${.CURDIR}
-
--DPADD= ${LIBSSL} ${LIBCRYPTO}
--LDADD= -lssl -lcrypto
-+DPADD= ${LIBSSL} ${LIBCRYPTO} /usr/lib/liblockfile.a
-+LDADD= -lssl -lcrypto -llockfile
-
- PROG= dma
- SRCS= aliases_parse.y aliases_scan.l base64.c conf.c crypto.c
--- a/local.c
+++ b/local.c
@@ -7,8 +7,53 @@
close(mbox);
return (error);
}
+--- a/Makefile.plain
++++ b/Makefile.plain
+@@ -6,7 +6,9 @@
+
+ CC?= gcc
+ CFLAGS?= -O -pipe
+-LDADD?= -lssl -lcrypto -lresolv
++LDADD?= -lssl -lcrypto -lresolv -llockfile
++
++CFLAGS+= -DHAVE_LIBLOCKFILE
+
+ INSTALL?= install -p
+ PREFIX?= /usr/local
Origin: other: http://svn.ringlet.net/svn/ringlet/mail/dma/
Bug: http://bugs.dragonflybsd.org/issue1321
Author: Peter Pentchev <roam@ringlet.net>
-Last-Update: 2010-06-17
+Last-Update: 2010-06-18
--- a/conf.c
+++ b/conf.c
-@@ -236,6 +236,10 @@
- if (data != NULL)
- config->certfile = strdup(data);
- }
-+ else if (strcmp(word, "DBOUNCEPROG") == 0) {
-+ if (data != NULL)
-+ config->dbounceprog = strdup(data);
-+ }
- else if (strcmp(word, "MAILNAME") == 0) {
- if (data != NULL)
- config->mailname = strdup(data);
+@@ -256,6 +256,8 @@
+ config.authpath= data;
+ else if (strcmp(word, "CERTFILE") == 0 && data != NULL)
+ config.certfile = data;
++ else if (strcmp(word, "DBOUNCEPROG") == 0 && data != NULL)
++ config.dbounceprog = data;
+ else if (strcmp(word, "MAILNAME") == 0 && data != NULL)
+ config.mailname = data;
+ else if (strcmp(word, "MAILNAMEFILE") == 0 && data != NULL)
--- a/dma.8
+++ b/dma.8
@@ -240,6 +240,26 @@
option.
This option is handy if you are behind a dialup line.
+.It Ic DBOUNCEPROG Xo
-+(string, default=commented)
++(string, default=dbounce-simple-safecat)
+.Xc
+Comment if you want the default behavior of
+.Nm
.It Ic FULLBOUNCE Xo
(boolean, default=commented)
.Xc
+@@ -270,6 +290,7 @@
+ (e.g.\& user@localhost) so you have to rewrite your outgoing email
+ address to a valid address.
+ .Sh SEE ALSO
++.Xr dbounce-simple-safecat 1 ,
+ .Xr mailaddr 7 ,
+ .Xr mailwrapper 8 ,
+ .Xr sendmail 8
--- a/dma.h
+++ b/dma.h
-@@ -120,6 +120,7 @@
- char *certfile;
+@@ -111,6 +111,7 @@
+ const char *authpath;
+ const char *certfile;
int features;
- SSL *ssl;
-+ char *dbounceprog;
- char *mailname;
- char *mailnamefile;
- };
---- a/etc/dma.conf
-+++ b/etc/dma.conf
++ const char *dbounceprog;
+ const char *mailname;
+ const char *mailnamefile;
+
+--- a/dma.conf
++++ b/dma.conf
@@ -43,6 +43,12 @@
# behind a dialup line. You have to submit your mails manually with dma -q
DEFER
- exit(1);
+ syslog(LOG_INFO, "%s: bounce delivery failed, double-bouncing",
+ it->queueid);
-+ if (config->dbounceprog == NULL) {
++ if (config.dbounceprog == NULL) {
+ syslog(LOG_CRIT, "%s: delivery panic: can't bounce a bounce and no double-bounce program defined in the config file",
+ it->queueid);
+ exit(1);
+ dup2(pipefd[1], STDIN_FILENO);
+ dup2(pipefd[1], STDOUT_FILENO);
+ dup2(pipefd[1], STDERR_FILENO);
-+ execlp(config->dbounceprog, config->dbounceprog,
++ execlp(config.dbounceprog, config.dbounceprog,
+ "-t", "dma", "-a", it->addr, "-i", it->queueid,
+ "-f", it->queuefn, NULL);
-+ err(1, "Could not execute %s", config->dbounceprog);
++ err(1, "Could not execute %s", config.dbounceprog);
+ /* NOTREACHED */
+ }
+
+ exit(1);
+ }
+ syslog(LOG_ERR, "%s: double-bounce succeeded, message passed to handler `%s': %s",
-+ it->queueid, config->dbounceprog, buf);
++ it->queueid, config.dbounceprog, buf);
+ delqueue(it);
+ exit(0);
}
Author: Peter Pentchev <roam@ringlet.net>
Last-Update: 2010-06-02
---- a/etc/dma.conf
-+++ b/etc/dma.conf
+--- a/dma.conf
++++ b/dma.conf
@@ -59,4 +59,4 @@
# The name of the file to read the MAILNAME from; if this file is not
Bug-Debian: http://bugs.debian.org/544475
Forwarded: no
Author: Peter Pentchev <roam@ringlet.net>
-Last-Update: 2010-06-02
+Last-Update: 2010-06-18
---- a/Makefile
-+++ b/Makefile
-@@ -3,6 +3,7 @@
-
- SUBDIR= etc
-
-+CFLAGS+= -DHAVE_RANDOM
- CFLAGS+= -DHAVE_LIBLOCKFILE
- CFLAGS+= -I${.CURDIR}
-
--- a/dma.c
+++ b/dma.c
-@@ -356,6 +356,15 @@
+@@ -375,6 +375,15 @@
bzero(&queue, sizeof(queue));
LIST_INIT(&queue.queue);
#include <signal.h>
#include <syslog.h>
#include <unistd.h>
-@@ -514,8 +515,15 @@
+@@ -513,8 +514,15 @@
} else if (!had_messagid) {
/* XXX better msgid, assign earlier and log? */
had_messagid = 1;
} else if (!had_from) {
had_from = 1;
snprintf(line, sizeof(line), "From: <%s>\n", queue->sender);
+--- a/Makefile.plain
++++ b/Makefile.plain
+@@ -8,6 +8,7 @@
+ CFLAGS?= -O -pipe
+ LDADD?= -lssl -lcrypto -lresolv -llockfile
+
++CFLAGS+= -DHAVE_RANDOM -DHAVE_SRANDOM
+ CFLAGS+= -DHAVE_LIBLOCKFILE
+
+ INSTALL?= install -p
Bug-Debian: http://bugs.debian.org/547594
Forwarded: no
Author: Peter Pentchev <roam@ringlet.net>
-Last-Update: 2010-06-02
+Last-Update: 2010-06-18
--- a/net.c
+++ b/net.c
-@@ -329,12 +329,12 @@
+@@ -304,12 +304,12 @@
static void
close_connection(int fd)
{
-- if (((config->features & SECURETRANS) != 0) &&
-- ((config->features & NOSSL) == 0))
-- SSL_shutdown(config->ssl);
+- if (((config.features & SECURETRANS) != 0) &&
+- ((config.features & NOSSL) == 0))
+- SSL_shutdown(config.ssl);
-
-- if (config->ssl != NULL)
-+ if (config->ssl != NULL) {
-+ if (((config->features & SECURETRANS) != 0) &&
-+ ((config->features & NOSSL) == 0))
-+ SSL_shutdown(config->ssl);
- SSL_free(config->ssl);
+- if (config.ssl != NULL)
++ if (config.ssl != NULL) {
++ if (((config.features & SECURETRANS) != 0) &&
++ ((config.features & NOSSL) == 0))
++ SSL_shutdown(config.ssl);
+ SSL_free(config.ssl);
+ }
close(fd);
}
-@@ -387,7 +387,7 @@
+@@ -353,7 +353,7 @@
- if ((config->features & SECURETRANS) != 0) {
- error = smtp_init_crypto(fd, config->features);
-- if (error >= 0)
-+ if (error == 0)
+ if ((config.features & SECURETRANS) != 0) {
+ error = smtp_init_crypto(fd, config.features);
+- if (error == 0)
++ if (error >= 0)
syslog(LOG_DEBUG, "SSL initialization successful");
else
goto out;
+++ /dev/null
-Description: Use program_invocation_short_name() instead of getprogname().
-Origin: other: http://svn.ringlet.net/svn/ringlet/mail/dma/
-Forwarded: not-needed
-Author: Peter Pentchev <roam@ringlet.net>
-Last-Update: 2010-06-03
-
---- a/util.c
-+++ b/util.c
-@@ -32,6 +32,8 @@
- * SUCH DAMAGE.
- */
-
-+#define _GNU_SOURCE
-+
- #include <sys/param.h>
- #include <errno.h>
- #include <fcntl.h>
-@@ -121,10 +123,10 @@
-
- if (outs != NULL) {
- syslog(LOG_ERR, "%s: %m", outs);
-- fprintf(stderr, "%s: %s: %s\n", getprogname(), outs, strerror(oerrno));
-+ fprintf(stderr, "%s: %s: %s\n", program_invocation_short_name, outs, strerror(oerrno));
- } else {
- syslog(LOG_ERR, "%m");
-- fprintf(stderr, "%s: %s\n", getprogname(), strerror(oerrno));
-+ fprintf(stderr, "%s: %s\n", program_invocation_short_name, strerror(oerrno));
- }
-
- exit(exitcode);
-@@ -145,10 +147,10 @@
-
- if (outs != NULL) {
- syslog(LOG_ERR, "%s", outs);
-- fprintf(stderr, "%s: %s\n", getprogname(), outs);
-+ fprintf(stderr, "%s: %s\n", program_invocation_short_name, outs);
- } else {
- syslog(LOG_ERR, "Unknown error");
-- fprintf(stderr, "%s: Unknown error\n", getprogname());
-+ fprintf(stderr, "%s: Unknown error\n", program_invocation_short_name);
- }
-
- exit(exitcode);
+++ /dev/null
-Description: Allow an empty queue file field - only if it is the sender.
- I'll forward this patch as soon as I catch up with the dma upstream.
-Origin: other: http://svn.ringlet.net/svn/ringlet/mail/dma/
-Forwarded: no
-Author: Peter Pentchev <roam@ringlet.net>
-Last-Update: 2010-06-17
-
---- a/spool.c
-+++ b/spool.c
-@@ -171,9 +171,11 @@
- s++;
- while (isspace(*s))
- s++;
-+ if (s[0] == 0 && strcmp(line, "Sender") != 0)
-+ goto malformed;
-
- s = strdup(s);
-- if (s == NULL || s[0] == 0)
-+ if (s == NULL)
- goto malformed;
-
- if (strcmp(line, "ID") == 0) {
01-debian-build.patch
03-debian-locations.patch
-04-debian-setgid.patch
09-typos.patch
10-liblockfile.patch
11-double-bounce.patch
23-dirent-d_type.patch
24-random-message-id.patch
25-unsupported-starttls.patch
-26-getprogname.patch
27-int-size.patch
28-valid-recipient.patch
29-double-free.patch
-30-empty-sender.patch