- update to 1.9

This commit is contained in:
Dirk Meyer 2012-01-11 06:42:53 +00:00
parent d08b35d871
commit f1ecf33f43
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=288946
4 changed files with 25 additions and 23 deletions

View file

@ -7,7 +7,7 @@
#
PORTNAME= milter-regex
PORTVERSION= 1.8
PORTVERSION= 1.9
CATEGORIES= mail
MASTER_SITES= http://www.benzedrine.cx/
@ -17,7 +17,6 @@ COMMENT= Milter plugin to sendmail for regular expression filtering
LICENSE= BSD
LICENSE_FILE= ${FILESDIR}/COPYRIGHT
DIST_SUBDIR= repacked
MAILUSER?= mailnull
MAN8= milter-regex.8
PLIST_FILES= libexec/milter-regex

View file

@ -1,2 +1,2 @@
SHA256 (repacked/milter-regex-1.8.tar.gz) = 6399ab230618a419c42b117e37fdb2def3c6e1ce368341df5105cd505f377c2e
SIZE (repacked/milter-regex-1.8.tar.gz) = 19545
SHA256 (milter-regex-1.9.tar.gz) = 6a708b0ff31d9f6db0e5b96915354c15f65ca09a730c599970b37e30699b18e4
SIZE (milter-regex-1.9.tar.gz) = 19880

View file

@ -1,14 +1,16 @@
--- milter-regex.8.orig Sat Mar 13 18:21:23 2004
+++ milter-regex.8 Tue Feb 20 17:31:46 2007
@@ -37,6 +37,7 @@
--- milter-regex.8.orig 2011-11-21 13:13:47.000000000 +0100
+++ milter-regex.8 2011-12-10 07:52:00.000000000 +0100
@@ -36,7 +36,9 @@
.Sh SYNOPSIS
.Nm
.Op Fl d
+.Op Fl q
.Op Fl c Ar config
+.Op Fl r Ar pid-file
.Op Fl j Ar dirname
.Op Fl p Ar pipe
.Op Fl u Ar user
.Sh DESCRIPTION
@@ -52,9 +53,14 @@
@@ -53,9 +55,14 @@
.It Fl d
Don't detach from controlling terminal and produce verbose debug
output on stdout.
@ -20,6 +22,6 @@
+.It Fl r Ar pid-file
+Use the specified pid file to write to. Default is:
+/var/spool/milter-regex/milter-regex.pid
.It Fl p Ar pipe
Use the specified pipe to interface
.Xr sendmail 8 .
.It Fl j Ar dirname
Change root to the specified directory.
.It Fl p Ar pipe

View file

@ -1,5 +1,5 @@
--- milter-regex.c.orig Sat Aug 4 00:11:48 2007
+++ milter-regex.c Tue Aug 7 10:20:43 2007
--- milter-regex.c.orig 2011-11-21 13:13:33.000000000 +0100
+++ milter-regex.c 2011-12-10 08:02:10.000000000 +0100
@@ -60,6 +60,7 @@
static const char *rule_file_name = "/etc/milter-regex.conf";
@ -8,7 +8,7 @@
static pthread_mutex_t mutex;
struct context {
@@ -93,6 +94,7 @@
@@ -95,6 +96,7 @@
#define USER "_milter-regex"
#define OCONN "unix:/var/spool/milter-regex/sock"
@ -16,7 +16,7 @@
#define RCODE_REJECT "554"
#define RCODE_TEMPFAIL "451"
#define XCODE_REJECT "5.7.1"
@@ -611,6 +613,9 @@
@@ -630,6 +632,9 @@
va_list ap;
char msg[8192];
@ -25,13 +25,14 @@
+
va_start(ap, fmt);
if (context != NULL)
snprintf(msg, sizeof(msg), "%s: ", context->host_addr);
@@ -647,14 +652,18 @@
snprintf(msg, sizeof(msg), "%s [%s]: ", context->host_name,
@@ -667,15 +672,19 @@
{
int ch;
const char *oconn = OCONN;
+ const char *pid_file_name = OPID;
const char *user = USER;
const char *jail = NULL;
sfsistat r = MI_FAILURE;
const char *ofile = NULL;
@ -41,12 +42,12 @@
tzset();
openlog("milter-regex", LOG_PID | LOG_NDELAY, LOG_DAEMON);
- while ((ch = getopt(argc, argv, "c:dp:u:")) != -1) {
+ while ((ch = getopt(argc, argv, "c:dp:qr:u:")) != -1) {
- while ((ch = getopt(argc, argv, "c:dj:p:u:")) != -1) {
+ while ((ch = getopt(argc, argv, "c:dj:p:qr:u:")) != -1) {
switch (ch) {
case 'c':
rule_file_name = optarg;
@@ -665,6 +674,12 @@
@@ -689,6 +698,12 @@
case 'p':
oconn = optarg;
break;
@ -59,8 +60,8 @@
case 'u':
user = optarg;
break;
@@ -734,9 +749,22 @@
fprintf(stderr, "daemon: %s\n", strerror(errno));
@@ -761,9 +776,22 @@
perror("daemon");
goto done;
}
- umask(0177);