September 9, 2019 3:37 PM, "Reio Remma" <> wrote:

> Hello!


> Slowly digging into filters.
> Now I'm curious if it's possible to modify the recipient after say spam check 
> in data-line? I get
> the impression that rewriting rcpt-to at that stage is impossible, but my 
> goal would be to
> redirect/quarantine high scoring spam to a special e-mail address.

By the time you start receiving DATA, the RCPT TO decision has already been 
in the SMTP transaction, so that would basically be a jump back in time.

> Would it be doable somehow?

If you want to rewrite the RCPT TO, then not doable without your filter issuing 
SMTP transaction itself by connecting and playing a session.

If you want to junk (add X-Spam header), then you can simply have you filter do 
buffering of DATA and prepend header on commit (what filter-rspamd does).

Reply via email to