~ubuntu-branches/ubuntu/utopic/spamassassin/utopic-updates

« back to all changes in this revision

Viewing changes to lib/Mail/SpamAssassin/Constants.pm

  • Committer: Package Import Robot
  • Author(s): Noah Meyerhans
  • Date: 2014-02-14 22:45:15 UTC
  • mfrom: (0.8.1) (0.6.2) (5.1.22 sid)
  • Revision ID: package-import@ubuntu.com-20140214224515-z1es2twos8xh7n2y
Tags: 3.4.0-1
* New upstream version! (Closes: 738963, 738872, 738867)
* Scrub the environment when switching to the debian-spamd user in
  postinst and cron.daily. (Closes: 738951)
* Enhancements to postinst to better manage ownership of
  /var/lib/spamassassin, via Iain Lane <iain.lane@canonical.com>
  (Closes: 738974)

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
# from them; however we do not, so we should ignore them.
75
75
76
76
# sources:
77
 
#   IANA  = <http://www.iana.org/assignments/ipv4-address-space>,
78
 
#           <http://duxcw.com/faq/network/privip.htm>,
79
 
#   APIPA = <http://duxcw.com/faq/network/autoip.htm>,
80
 
#   3330  = <ftp://ftp.rfc-editor.org/in-notes/rfc3330.txt>
 
77
#   IANA  = <http://www.iana.org/numbers>,
 
78
#   5735  = <http://tools.ietf.org/html/rfc5735>
 
79
#   6598  = <http://tools.ietf.org/html/rfc6598>
 
80
#   4193  = <http://tools.ietf.org/html/rfc4193>
81
81
#   CYMRU = <http://www.cymru.com/Documents/bogon-list.html>
82
82
#
83
 
# This also includes IPv6 link-local space, fe80::/10, the IPv4
84
 
# spaces mapped in IPv6, and the IPv6 host-local address, ::1.
 
83
# This includes:
 
84
#   host-local address space 127.0.0.0/8 and ::1,
 
85
#   link-local address space 169.254.0.0/16 and fe80::/10,
 
86
#   private-use address space 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16,
 
87
#     TODO: Unique Local Unicast Addresses fc00::/7 (RFC 4193)
 
88
#   shared address space 100.64.0.0/10 (RFC 6598 - for use in CGN),
 
89
#   IPv4-mapped IPv6 address ::ffff:0:0/96 (RFC 3513)
85
90
#
86
91
use constant IP_PRIVATE => qr{^(?:
87
92
  (?:   # IPv4 addresses
88
 
    10|                             # 10/8:             Private Use (3330)
89
 
    127|                            # 127/8:            Private Use (localhost)
90
 
    169\.254|                       # 169.254/16:       Private Use (APIPA)
91
 
    172\.(?:1[6-9]|2[0-9]|3[01])|   # 172.16-172.31/16: Private Use (3330)
92
 
    192\.168                        # 192.168/16:       Private Use (3330)
 
93
    10|                             # 10.0.0.0/8      Private Use (5735, 1918)
 
94
    127|                            # 127.0.0.0/8     Host-local  (5735, 1122)
 
95
    169\.254|                       # 169.254.0.0/16  Link-local  (5735, 3927)
 
96
    172\.(?:1[6-9]|2[0-9]|3[01])|   # 172.16.0.0/12   Private Use (5735, 1918)
 
97
    192\.168|                       # 192.168.0.0/16  Private Use (5735, 1918)
 
98
    100\.(?:6[4-9]|[7-9][0-9]|1[01][0-9]|12[0-7])  # 100.64.0.0/10 CGN (6598)
93
99
    )\..*
94
100
|
95
101
  (?:   # IPv6 addresses
128
134
        127|                        
129
135
        169\.254|                           
130
136
        172\.(?:1[6-9]|2[0-9]|3[01])|   
131
 
        192\.168
 
137
        192\.168|
 
138
        100\.(?:6[4-9]|[7-9][0-9]|1[01][0-9]|12[0-7])
132
139
      )\..*
133
140
 
134
141
    | # or IPv6 link-local address space, fe80::/10