aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgarga <garga@FreeBSD.org>2005-12-12 22:36:13 +0800
committergarga <garga@FreeBSD.org>2005-12-12 22:36:13 +0800
commit92e0563c6c2fbb03eb66cb6a4b4a762a82fae5b5 (patch)
treedd5ae916ef110a2f464b5387e87c56818c17acdd
parente157401a02ccffd9120e7bc317b144ccd71dd29b (diff)
downloadfreebsd-ports-gnome-92e0563c6c2fbb03eb66cb6a4b4a762a82fae5b5.tar.gz
freebsd-ports-gnome-92e0563c6c2fbb03eb66cb6a4b4a762a82fae5b5.tar.zst
freebsd-ports-gnome-92e0563c6c2fbb03eb66cb6a4b4a762a82fae5b5.zip
- Add SMTP Authentication on qmail-tls slave port, after that, i'll remove
port mail/qmail-smtp_auth+tls, since it won't be necessary anymore
-rw-r--r--mail/qmail/Makefile14
-rw-r--r--mail/qmail/files/auth.patch.patch-tls88
2 files changed, 99 insertions, 3 deletions
diff --git a/mail/qmail/Makefile b/mail/qmail/Makefile
index 389d5edc757e..0359b9885846 100644
--- a/mail/qmail/Makefile
+++ b/mail/qmail/Makefile
@@ -55,10 +55,16 @@ BARRIER_RFC2821_PATCH= yes
.if defined(SLAVE_LDAP) || \
defined(SLAVE_MYSQL) || \
defined(SLAVE_SMTP_AUTH_TLS) || \
+ defined(SLAVE_SPAMCONTROL)
+BARRIER_SMTP_AUTH_PATCH= yes
+.endif
+
+.if defined(SLAVE_LDAP) || \
+ defined(SLAVE_MYSQL) || \
+ defined(SLAVE_SMTP_AUTH_TLS) || \
defined(SLAVE_SPAMCONTROL) || \
defined(SLAVE_TLS)
BARRIER_SPF_PATCH= yes
-BARRIER_SMTP_AUTH_PATCH= yes
.endif
.if !defined(SLAVE_SMTP_AUTH_TLS)
@@ -519,9 +525,11 @@ post-extract:
post-patch:
.if defined(WITH_SMTP_AUTH_PATCH)
@${CP} ${SMTP_AUTH_DIR}/base64.[ch] ${WRKSRC}
-.if defined(WITH_SPF_PATCH)
+. if defined(WITH_SPF_PATCH)
@${PATCH} -d ${SMTP_AUTH_DIR} < ${FILESDIR}/auth.patch.patch
-.endif
+. elif defined(SLAVE_TLS)
+ @${PATCH} -d ${SMTP_AUTH_DIR} < ${FILESDIR}/auth.patch.patch-tls
+. endif
@${PATCH} -d ${WRKSRC} < ${SMTP_AUTH_DIR}/auth.patch
.endif
.if defined(SLAVE_MYSQL)
diff --git a/mail/qmail/files/auth.patch.patch-tls b/mail/qmail/files/auth.patch.patch-tls
new file mode 100644
index 000000000000..7e59739051a4
--- /dev/null
+++ b/mail/qmail/files/auth.patch.patch-tls
@@ -0,0 +1,88 @@
+--- auth.patch.orig Mon Dec 12 12:23:49 2005
++++ auth.patch Mon Dec 12 12:25:57 2005
+@@ -14,29 +14,31 @@
+ binm1.sh conf-qmail
+ cat binm1.sh \
+ ***************
+-*** 1536,1547 ****
++*** 1537,1549 ****
+ timeoutwrite.o ip.o ipme.o ipalloc.o control.o constmap.o received.o \
+ date822fmt.o now.o qmail.o cdb.a fd.a wait.a datetime.a getln.a \
+ open.a sig.a case.a env.a stralloc.a alloc.a substdio.a error.a str.a \
+ ! fs.a auto_qmail.o socket.lib
+ ./load qmail-smtpd rcpthosts.o commands.o timeoutread.o \
+ timeoutwrite.o ip.o ipme.o ipalloc.o control.o constmap.o \
++ tls.o ssl_timeoutio.o ndelay.a -L/usr/local/ssl/lib -lssl -lcrypto \
+ received.o date822fmt.o now.o qmail.o cdb.a fd.a wait.a \
+ datetime.a getln.a open.a sig.a case.a env.a stralloc.a \
+ ! alloc.a substdio.a error.a str.a fs.a auto_qmail.o `cat \
+ socket.lib`
+
+ qmail-smtpd.0: \
+---- 1540,1551 ----
++--- 1541,1553 ----
+ timeoutwrite.o ip.o ipme.o ipalloc.o control.o constmap.o received.o \
+ date822fmt.o now.o qmail.o cdb.a fd.a wait.a datetime.a getln.a \
+ open.a sig.a case.a env.a stralloc.a alloc.a substdio.a error.a str.a \
+ ! fs.a auto_qmail.o base64.o socket.lib
+ ./load qmail-smtpd rcpthosts.o commands.o timeoutread.o \
+ timeoutwrite.o ip.o ipme.o ipalloc.o control.o constmap.o \
++ tls.o ssl_timeoutio.o ndelay.a -L/usr/local/ssl/lib -lssl -lcrypto \
+ received.o date822fmt.o now.o qmail.o cdb.a fd.a wait.a \
+ datetime.a getln.a open.a sig.a case.a env.a stralloc.a \
+-! alloc.a substdio.a error.a str.a fs.a auto_qmail.o base64.o `cat \
++! alloc.a substdio.a error.a str.a fs.a auto_qmail.o base64.o `cat \
+ socket.lib`
+
+ qmail-smtpd.0: \
+@@ -174,30 +176,38 @@
+ stralloc greeting = {0};
+
+ ***************
+-*** 229,235 ****
+- }
++*** 265,272 ****
+ void smtp_ehlo(arg) char *arg;
+ {
+-! smtp_greet("250-"); out("\r\n250-PIPELINING\r\n250 8BITMIME\r\n");
++ smtp_greet("250-");
++ #ifdef TLS
++! if (!ssl) out("\r\n250-STARTTLS");
++ #endif
++ out("\r\n250-PIPELINING\r\n250 8BITMIME\r\n");
+ seenmail = 0; dohelo(arg);
+- }
+- void smtp_rset()
+---- 241,255 ----
+- }
++--- 277,298 ----
+ void smtp_ehlo(arg) char *arg;
+ {
+-! smtp_greet("250-");
+-! #ifdef AUTHCRAM
++ smtp_greet("250-");
+++ #ifdef AUTHCRAM
++ #ifdef TLS
++! if (!ssl) out("\r\n250-STARTTLS AUTH LOGIN CRAM-MD5 PLAIN");
++! if (!ssl) out("\r\n250-STARTTLS AUTH=LOGIN CRAM-MD5 PLAIN");
++! #else
+ ! out("\r\n250-AUTH LOGIN CRAM-MD5 PLAIN");
+ ! out("\r\n250-AUTH=LOGIN CRAM-MD5 PLAIN");
++! #endif
++! #else
++! #ifdef TLS
++! if (!ssl) out("\r\n250-STARTTLS AUTH LOGIN PLAIN");
++! if (!ssl) out("\r\n250-STARTTLS AUTH=LOGIN PLAIN");
+ ! #else
+ ! out("\r\n250-AUTH LOGIN PLAIN");
+ ! out("\r\n250-AUTH=LOGIN PLAIN");
+ ! #endif
+-! out("\r\n250-PIPELINING\r\n250 8BITMIME\r\n");
++ #endif
++ out("\r\n250-PIPELINING\r\n250 8BITMIME\r\n");
+ seenmail = 0; dohelo(arg);
+- }
+- void smtp_rset()
+ ***************
+ *** 394,403 ****
+ --- 414,639 ----