diff src/context.h @ 268:f941563c2a95 stable-6-0-34

Add require_rdns checking
author Carl Byington <carl@five-ten-sg.com>
date Wed, 22 May 2013 11:29:44 -0700
parents be939802c64e
children f92f24950bd3
line wrap: on
line diff
--- a/src/context.h	Sat Jul 21 13:13:07 2012 -0700
+++ b/src/context.h	Wed May 22 11:29:44 2013 -0700
@@ -171,6 +171,7 @@
     const char *    tag_limit_message;  // error message for excessive bad html tags
     int             spamassassin_limit; // max score from spamassassin
     bool            require_match;      // require matching context filtering context
+    bool            require_rdns;       // require proper rdns on client ip
     bool            dcc_greylist;       // should we do dcc greylisting?
     int             dcc_bulk_threshold; // off = 0, many = 1000
     dnsblp_map      dnsbl_names;        // name to dnsbl mapping for lists that are available in this context and children
@@ -254,11 +255,13 @@
     const char* generic_match(const char *client);
 
     void        set_require(bool r)                         {require_match      = r; };
+    void        set_requirerdns(bool r)                     {require_rdns       = r; };
     void        set_grey(bool g)                            {dcc_greylist       = g; };
     void        set_bulk(int b)                             {dcc_bulk_threshold = b; };
 
     bool            get_content_filtering()                 {return content_filtering; };
     bool            get_require()                           {return content_filtering && require_match;     };
+    bool            get_requirerdns()                       {return require_rdns;                           };
     bool            get_grey()                              {return content_filtering && dcc_greylist;      };
     int             get_bulk()                              {return (content_filtering) ? dcc_bulk_threshold : 0;};
     int             get_host_limit()                        {return (content_filtering) ? host_limit         : 0;};
@@ -338,6 +341,7 @@
 extern const char *token_rate;
 extern const char *token_rbrace;
 extern const char *token_require;
+extern const char *token_requirerdns;
 extern const char *token_semi;
 extern const char *token_soft;
 extern const char *token_spamassassin;