On 9 February 2018 at 16:59, Markus Clardy <[email protected]> wrote: > On Fri, Feb 9, 2018 at 4:23 PM, Dominic Raferd <[email protected]> > wrote: >> >> Is there a way to have the presence of a specific header (or, better, >> a specific beginning to a header, where the later text might vary) >> causing quarantining by amavis. Use case is that postfix header_checks >> will identify a suspect mail and add the header before the mail is >> passed to amavis. >> >> Example header which should lead to amavis quarantining the mail: >> >> X-Hold: mydomain.tld; Withheld by order of check_header.pcre (.world >> domain) >> >> I feel sure amavis is powerful enough to do this but the plethora of >> options, and the perl terminology, leave me baffled. Thanks for any >> help. >> > What you can do is have a port/policy in Amavisd for Quarantining > everything, then just instead of adding a header in Postfix, have the mail > redirect to that port. > > This way, mail that is meant to be held as designated by Postfix, will go to > the quarantine that way. >
Thanks Marcus but I want amavis to continue doing its own stuff as normal as well as quarantining these extra mails. Also it sounds complicated to resubmit mails via a different port but it is very easy to add a header using the postfix PREPEND option.
