]> git.proxmox.com Git - proxmox-spamassassin.git/blob - sa-updates/20_freemail.cf
buildsys: use simple parenthesis for variables
[proxmox-spamassassin.git] / sa-updates / 20_freemail.cf
1 # SpamAssassin - FreeMail rules
2 #
3 # Please don't modify this file as your changes will be overwritten with
4 # the next update. Use /etc/mail/spamassassin/local.cf instead.
5 # See 'perldoc Mail::SpamAssassin::Conf' for details.
6 #
7 # <@LICENSE>
8 # Licensed to the Apache Software Foundation (ASF) under one or more
9 # contributor license agreements. See the NOTICE file distributed with
10 # this work for additional information regarding copyright ownership.
11 # The ASF licenses this file to you under the Apache License, Version 2.0
12 # (the "License"); you may not use this file except in compliance with
13 # the License. You may obtain a copy of the License at:
14 #
15 # http://www.apache.org/licenses/LICENSE-2.0
16 #
17 # Unless required by applicable law or agreed to in writing, software
18 # distributed under the License is distributed on an "AS IS" BASIS,
19 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 # See the License for the specific language governing permissions and
21 # limitations under the License.
22 # </@LICENSE>
23 #
24 ###########################################################################
25
26 ifplugin Mail::SpamAssassin::Plugin::FreeMail
27
28 body __freemail_safe_fwd /---\s?(?:(?:Forwarded|Original) message|Alkuper(?:\xe4|\xc3\xa4)inen viesti)/i
29 header __freemail_safe_rls X-Spam-Relays-External =~ /^[^\]]+ rdns=\S+\.(?:tfbnw\.net|ebay\.com|tieto\.com) /
30 meta __freemail_safe __freemail_safe_fwd || __ML2 || __ML4 || __HAS_X_MAILING_LIST || __HAS_X_MAILMAN_VERSION || __freemail_safe_rls
31
32 header __freemail_replyto eval:check_freemail_replyto('replyto')
33 meta FREEMAIL_REPLYTO __freemail_replyto && !__freemail_safe
34 describe FREEMAIL_REPLYTO Reply-To/From or Reply-To/body contain different freemails
35 score FREEMAIL_REPLYTO 2
36
37 header __freemail_reply eval:check_freemail_replyto('reply')
38 meta FREEMAIL_REPLY __freemail_reply && !__freemail_replyto && !__freemail_safe
39 describe FREEMAIL_REPLY From and body contain different freemails
40 score FREEMAIL_REPLY 0.5
41
42 header FREEMAIL_FROM eval:check_freemail_from()
43 describe FREEMAIL_FROM Sender email is commonly abused enduser mail provider
44 score FREEMAIL_FROM 0.001
45
46 header FREEMAIL_ENVFROM_END_DIGIT eval:check_freemail_header('EnvelopeFrom', '\d@')
47 describe FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit
48 score FREEMAIL_ENVFROM_END_DIGIT 0.1
49
50 header FREEMAIL_REPLYTO_END_DIGIT eval:check_freemail_header('Reply-To', '\d@')
51 describe FREEMAIL_REPLYTO_END_DIGIT Reply-To freemail username ends in digit
52 score FREEMAIL_REPLYTO_END_DIGIT 0.1
53
54 #header FREEMAIL_SUBJECT eval:check_freemail_header('Subject')
55 #describe FREEMAIL_SUBJECT Subject contains freemail
56 #score FREEMAIL_SUBJECT 0.001
57
58 # Idea from John Hardin
59 header __freemail_hdr_replyto eval:check_freemail_header('Reply-To')
60 meta FREEMAIL_FORGED_REPLYTO __freemail_hdr_replyto && !FREEMAIL_FROM && !__freemail_safe
61 describe FREEMAIL_FORGED_REPLYTO Freemail in Reply-To, but not From
62 score FREEMAIL_FORGED_REPLYTO 0.1
63
64 endif
65