Merge pull request #433 from mildred/delivered-to-hdr

Add original Delivered-To header to received messages
master
kaiyou 7 years ago committed by GitHub
commit e92113bd57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -138,7 +138,7 @@ service managesieve {
plugin { plugin {
sieve = file:~/sieve;active=~/.dovecot.sieve sieve = file:~/sieve;active=~/.dovecot.sieve
sieve_plugins = sieve_extdata sieve_imapsieve sieve_extprograms sieve_plugins = sieve_extdata sieve_imapsieve sieve_extprograms
sieve_global_extensions = +vnd.dovecot.extdata +spamtest +spamtestplus +vnd.dovecot.execute sieve_global_extensions = +vnd.dovecot.extdata +spamtest +spamtestplus +vnd.dovecot.execute +editheader
sieve_before = /var/lib/dovecot/before.sieve sieve_before = /var/lib/dovecot/before.sieve
sieve_default = /var/lib/dovecot/default.sieve sieve_default = /var/lib/dovecot/default.sieve
sieve_after = /var/lib/dovecot/after.sieve sieve_after = /var/lib/dovecot/after.sieve

@ -11,6 +11,14 @@ require "comparator-i;ascii-numeric";
require "vnd.dovecot.extdata"; require "vnd.dovecot.extdata";
require "vnd.dovecot.execute"; require "vnd.dovecot.execute";
require "spamtestplus"; require "spamtestplus";
require "editheader";
require "index";
if header :index 2 :matches "Received" "from * by * for <*>; *"
{
deleteheader "Delivered-To";
addheader "Delivered-To" "<${3}>";
}
if allof (string :is "${extdata.spam_enabled}" "1", if allof (string :is "${extdata.spam_enabled}" "1",
spamtest :percent :value "gt" :comparator "i;ascii-numeric" "${extdata.spam_threshold}") spamtest :percent :value "gt" :comparator "i;ascii-numeric" "${extdata.spam_threshold}")

Loading…
Cancel
Save