bmf-milter

bmf filter milter daemon
git clone git://r-36.net/bmf-milter
Log | Files | Refs | LICENSE

commit f32ba1d473e410bdcbcd0cfbbe129d0ecb544e08
parent d79cf88df178f18663ef6e9102796a18a7a30c69
Author: Christoph Lohmann <20h@r-36.net>
Date:   Sun, 14 Jun 2020 17:43:09 +0200

Add manpage and rename port to conndef, which is more appropriate.

Diffstat:
Makefile | 6+++---
bmf-milter.c | 17++++++++---------
2 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/Makefile b/Makefile @@ -33,12 +33,12 @@ install: all cp -f ${NAME} "${DESTDIR}${BINDIR}" chmod 755 "${DESTDIR}${BINDIR}/${NAME}" mkdir -p "${DESTDIR}${MANDIR}" - #cp -f ${NAME}.8 "${DESTDIR}${MANDIR}" - #chmod 644 "${DESTDIR}${MANDIR}/${NAME}.8" + cp -f ${NAME}.8 "${DESTDIR}${MANDIR}" + chmod 644 "${DESTDIR}${MANDIR}/${NAME}.8" uninstall: rm -f "${DESTDIR}${BINDIR}/${NAME}" - #rm -f "${DESTDIR}${MANDIR}/${NAME}.8" + rm -f "${DESTDIR}${MANDIR}/${NAME}.8" dist: clean mkdir -p ${NAME}-${VERSION} diff --git a/bmf-milter.c b/bmf-milter.c @@ -381,16 +381,15 @@ void usage(char *argv0) { fprintf(stderr, - "Usage: %s [-hd] [-b bmfdb] [-f bmfpath] [-g group] " - "[-p portdef] [-t timeout] [-u user] " - "[-v loglevel]\n", + "Usage: %s [-hd] [-b bmfdb] [-c conndef] [-f bmfpath] " + "[-g group] [-t timeout] [-u user] [-v dbglevel]\n", argv0); } int main(int argc, char *argv[]) { - char *argv0, *user = NULL, *group = NULL, *port = "inet:9957"; + char *argv0, *user = NULL, *group = NULL, *conndef = "inet:9957"; int timeout = -1, dofork = 1; struct passwd *us = NULL; struct group *gr = NULL; @@ -399,6 +398,9 @@ main(int argc, char *argv[]) case 'b': bmfdb = EARGF(usage(argv0)); break; + case 'c': + conndef = EARGF(usage(argv0)); + break; case 'd': dofork = 0; break; @@ -408,9 +410,6 @@ main(int argc, char *argv[]) case 'g': group = EARGF(usage(argv0)); break; - case 'p': - port = EARGF(usage(argv0)); - break; case 't': timeout = atoi(EARGF(usage(argv0))); break; @@ -478,12 +477,12 @@ main(int argc, char *argv[]) return -1; } - if (smfi_setconn(port) == MI_FAILURE) { + if (smfi_setconn(conndef) == MI_FAILURE) { perror("smfi_setconn"); return 1; } if (dodebug) - fprintf(stderr, "port set to '%s'\n", port); + fprintf(stderr, "conn set to '%s'\n", conndef); if (timeout > 0) { if (smfi_settimeout(timeout) == MI_FAILURE) {