Skip to content
Permalink
Browse files

Run the filters listed in $QMAILQUEUEFILTERS.

  • Loading branch information...
schmonz committed Nov 26, 2018
1 parent baeb9e7 commit cc9cf06cbcd24f0eed09cbc2e4593c58e4eeca5b
Showing with 7 additions and 4 deletions.
  1. +2 −2 Makefile
  2. +5 −2 qmail-qfilter-smtpd-queue.c
@@ -1357,9 +1357,9 @@ compile qmail-qfilter-ofmipd-queue.c control.h stralloc.h wait.h
./compile qmail-qfilter-ofmipd-queue.c

qmail-qfilter-smtpd-queue: \
load qmail-qfilter-smtpd-queue.o control.o error.a fs.a getln.a \
load qmail-qfilter-smtpd-queue.o control.o env.a error.a fs.a getln.a \
open.a stralloc.a substdio.a str.a alloc.a wait.a
./load qmail-qfilter-smtpd-queue control.o error.a fs.a getln.a \
./load qmail-qfilter-smtpd-queue control.o env.a error.a fs.a getln.a \
open.a stralloc.a substdio.a str.a alloc.a wait.a

qmail-qfilter-smtpd-queue.o: \
@@ -1,6 +1,7 @@
#include <unistd.h>
#include "alloc.h"
#include "control.h"
#include "env.h"
#include "str.h"
#include "stralloc.h"
#include "wait.h"
@@ -50,9 +51,11 @@ static void run_qmail_qfilter(stralloc *filters) {

int main(int argc, char **argv) {
stralloc filters = {0};
char *filterfile;

if (control_readfile(&filters,"control/smtpfilters",0) == -1)
unable_to_verify();
if ((filterfile = env_get("QMAILQUEUEFILTERS")))
if (control_readfile(&filters,filterfile,0) != 1)
unable_to_verify();

run_qmail_qfilter(&filters);
}

0 comments on commit cc9cf06

Please sign in to comment.
You can’t perform that action at this time.