summaryrefslogtreecommitdiffstats
path: root/conf/modules.d/multimap.conf
blob: b707ddfb130e659a4934dd8b11e3cfe92b7c05a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# Please don't modify this file as your changes might be overwritten with
# the next update.
#
# You can modify 'local.d/multimap.conf' to add and merge
# parameters defined inside this section
#
# You can modify 'override.d/multimap.conf' to strictly override all
# parameters defined inside this section
#
# See https://rspamd.com/doc/faq.html#what-are-the-locald-and-overrided-directories
# for details
#
# Module documentation can be found at  https://rspamd.com/doc/modules/multimap.html

multimap {
  redirector {
    type = "url";
    filter = "tld";
    map = "https://maps.rspamd.com/rspamd/redirectors.inc.zst";
    symbol = "REDIRECTOR_URL";
    description = "The presence of a redirector in the mail";
    score = 0.0;
    one_shot = true;
  }

  # Freemail Addresses
  freemail_envfrom {
    type = "from";
    filter = "email:domain";
    map = "https://maps.rspamd.com/freemail/free.txt.zst";
    symbol = "FREEMAIL_ENVFROM";
    description = "Envelope From is a Freemail address";
    score = 0.0;
  }

  freemail_envrcpt {
    type = "rcpt";
    filter = "email:domain";
    map = "https://maps.rspamd.com/freemail/free.txt.zst";
    symbol = "FREEMAIL_ENVRCPT";
    description = "Envelope Recipient is a Freemail address";
    score = 0.0;
    one_shot = true;
  }

  freemail_from {
    type = "header";
    header = "from";
    filter = "email:domain";
    map = "https://maps.rspamd.com/freemail/free.txt.zst";
    symbol = "FREEMAIL_FROM";
    description = "From is a Freemail address";
    score = 0.0;
  }

  freemail_to {
    type = "header";
    header = "To";
    filter = "email:domain";
    map = "https://maps.rspamd.com/freemail/free.txt.zst";
    symbol = "FREEMAIL_TO";
    description = "To is a Freemail address";
    score = 0.0;
    one_shot = true;
  }

  freemail_cc {
    type = "header";
    header = "Cc";
    filter = "email:domain";
    map = "https://maps.rspamd.com/freemail/free.txt.zst";
    symbol = "FREEMAIL_CC";
    description = "To is a Freemail address";
    score = 0.0;
    one_shot = true;
  }

  freemail_replyto {
    type = "header";
    header = "Reply-To";
    filter = "email:domain";
    map = "https://maps.rspamd.com/freemail/free.txt.zst";
    symbol = "FREEMAIL_REPLYTO";
    description = "Reply-To is a Freemail address";
    score = 0.0;
  }

  # Disposable Addresses
  disposable_envfrom {
    type = "from";
    filter = "email:domain";
    map = "https://maps.rspamd.com/freemail/disposable.txt.zst";
    symbol = "DISPOSABLE_ENVFROM";
    description = "Envelope From is a Disposable e-mail address";
    score = 0.0;
  }

  disposable_envrcpt {
    type = "rcpt";
    filter = "email:domain";
    map = "https://maps.rspamd.com/freemail/disposable.txt.zst";
    symbol = "DISPOSABLE_ENVRCPT";
    description = "Envelope Recipient is a Disposable e-mail address";
    score = 0.0;
    one_shot = true;
  }

  disposable_from {
    type = "header";
    header = "from";
    filter = "email:domain";
    map = "https://maps.rspamd.com/freemail/disposable.txt.zst";
    symbol = "DISPOSABLE_FROM";
    description = "From a Disposable e-mail address";
    score = 0.0;
  }

  disposable_to {
    type = "header";
    header = "To";
    filter = "email:domain";
    map = "https://maps.rspamd.com/freemail/disposable.txt.zst";
    symbol = "DISPOSABLE_TO";
    description = "To a disposable e-mail address";
    score = 0.0;
    one_shot = true;
  }

  disposable_cc {
    type = "header";
    header = "Cc";
    filter = "email:domain";
    map = "https://maps.rspamd.com/freemail/disposable.txt.zst";
    symbol = "DISPOSABLE_CC";
    description = "To a disposable e-mail address";
    score = 0.0;
    one_shot = true;
  }

  disposable_replyto {
    type = "header";
    header = "Reply-To";
    filter = "email:domain";
    map = "https://maps.rspamd.com/freemail/disposable.txt.zst";
    symbol = "DISPOSABLE_REPLYTO";
    description = "Reply-To a disposable e-mail address";
    score = 0.0;
  }

  .include(try=true,priority=5) "${DBDIR}/dynamic/multimap.conf"
  .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/multimap.conf"
  .include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/multimap.conf"
}

/* Example setup
sender_from_whitelist_user {
          type = "from";
          filter = "email:user";
          map = "file:///tmp/from.map";
          symbol = "SENDER_FROM_WHITELIST_USER";
          action = "accept"; # Prefilter mode
}
sender_from_regexp {
          type = "header";
          header = "from";
          filter = 'regexp:/.*@/';
          map = "file:///tmp/from_re.map";
          symbol = "SENDER_FROM_REGEXP";
}
url_map {
          type = "url";
          filter = "tld";
          map = "file:///tmp/url.map";
          symbol = "URL_MAP";
}
url_tld_re {
          type = "url";
          filter = 'tld:regexp:/\.[^.]+$/'; # Extracts the last component of URL
          map = "file:///tmp/url.map";
          symbol = "URL_MAP_RE";
}
*/