aboutsummaryrefslogtreecommitdiffstats
path: root/roles/mail/files/sieve/after.d/51-msgid.sieve
blob: ea0e55d7da06580648b325d9d7125b1471205aa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#
# /usr/local/etc/dovecot/sieve/after.d/51-msgid.sieve
#
# Global filters to filter messages with invalid "message-id".
#
# Aaron LI
# 2017-04-24
#

 
require "fileinto";
require "mailbox";
require "imap4flags";
require "regex";


# Trash messages with improperly formed "message-id"
if not header :regex "message-id" ".*@.*\\." {
    fileinto :create "Trash";
    setflag "\\Seen";
    stop;
}