diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2020-01-26 14:02:31 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2020-01-26 16:35:55 +0000 |
commit | 9438970c97adda0afb9b825b5beff5276a1d613d (patch) | |
tree | 72e9032fbef76da227c6dc31234e58e61c233011 /src | |
parent | e851856fc72bf126f7b649a007fb7040140d5d3c (diff) |
ACL: control = queue/first_pass_route
Diffstat (limited to 'src')
-rw-r--r-- | src/src/acl.c | 18 | ||||
-rw-r--r-- | src/src/daemon.c | 3 | ||||
-rw-r--r-- | src/src/transports/smtp.c | 4 |
3 files changed, 22 insertions, 3 deletions
diff --git a/src/src/acl.c b/src/src/acl.c index 938bea7d9..952195d4a 100644 --- a/src/src/acl.c +++ b/src/src/acl.c @@ -366,6 +366,7 @@ enum { CONTROL_NO_MULTILINE, CONTROL_NO_PIPELINING, + CONTROL_QUEUE, CONTROL_QUEUE_ONLY, CONTROL_SUBMISSION, CONTROL_SUPPRESS_LOCAL_FIXUPS, @@ -502,8 +503,16 @@ static control_def controls_list[] = { ACL_BIT_NOTSMTP | ACL_BIT_NOTSMTP_START }, +[CONTROL_QUEUE] = + { US"queue", TRUE, + (unsigned) + ~(ACL_BIT_MAIL | ACL_BIT_RCPT | + ACL_BIT_PREDATA | ACL_BIT_DATA | + // ACL_BIT_PRDR| /* Not allow one user to freeze for all */ + ACL_BIT_NOTSMTP | ACL_BIT_MIME) + }, [CONTROL_QUEUE_ONLY] = - { US"queue_only", FALSE, + { US"queue_only", TRUE, (unsigned) ~(ACL_BIT_MAIL | ACL_BIT_RCPT | ACL_BIT_PREDATA | ACL_BIT_DATA | @@ -3158,9 +3167,16 @@ for (; cb; cb = cb->next) cancel_cutthrough_connection(TRUE, US"item frozen"); break; + case CONTROL_QUEUE: case CONTROL_QUEUE_ONLY: f.queue_only_policy = TRUE; cancel_cutthrough_connection(TRUE, US"queueing forced"); + while (*p == '/') + if (Ustrncmp(p, "/first_pass_route", 17) == 0) + { + p += 17; + f.queue_smtp = TRUE; + } break; case CONTROL_SUBMISSION: diff --git a/src/src/daemon.c b/src/src/daemon.c index 61371f592..42e291cf8 100644 --- a/src/src/daemon.c +++ b/src/src/daemon.c @@ -640,7 +640,8 @@ if (pid == 0) If we are not root, we have to re-exec exim unless deliveries are being done unprivileged. */ - else if (!f.queue_only_policy && !f.deliver_freeze) + else if ( (!f.queue_only_policy || f.queue_smtp) + && !f.deliver_freeze) { pid_t dpid; diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index 6559d4170..b748b7657 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -4873,10 +4873,12 @@ retry_non_continued: &domainlist_anchor, NULL, MCL_DOMAIN, TRUE, NULL) == OK) ) { + DEBUG(D_transport) debug_printf("first-pass routing only\n"); expired = FALSE; for (address_item * addr = addrlist; addr; addr = addr->next) if (addr->transport_return == DEFER) - addr->message = US"domain matches queue_smtp_domains, or -odqs set"; + addr->message = US"first-pass only routing due to -odqs, " + "queue_smtp_domains or control=queue"; continue; /* With next host */ } |