spf.h

Go to the documentation of this file.
00001 /* 
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of either:
00004  * 
00005  *   a) The GNU Lesser General Public License as published by the Free
00006  *      Software Foundation; either version 2.1, or (at your option) any
00007  *      later version,
00008  * 
00009  *   OR
00010  * 
00011  *   b) The two-clause BSD license.
00012  *
00013  * These licenses can be found with the distribution in the file LICENSES
00014  */
00015 
00016 #ifndef __GNUC__
00017 #define __attribute__(x)
00018 #endif
00019 
00020 
00021 #ifndef INC_SPF
00022 #define INC_SPF
00023 
00024 
00025 #include "spf_lib_version.h"
00026 
00027 #include "spf_server.h"
00028 #include "spf_request.h"
00029 #include "spf_response.h"
00030 #include "spf_dns.h"
00031 #include "spf_log.h"
00032 
00033 
00034 #define SPF_VERSION 1
00035 #define SPF_VER_STR "v=spf1"
00036 
00037 
00038 /* ********************************************************************* */
00039 
00040 
00041 /* FYI only -- can't be changed without recompiling the library
00042  * Most error messages are under 80 characters and we don't want
00043  * bad/malicious input to cause huge error messages */
00044 #define SPF_C_ERR_MSG_SIZE              (2*80)
00045 #define SPF_SMTP_COMMENT_SIZE           (4*80)
00046 #define SPF_RECEIVED_SPF_SIZE           (6*80)
00047 #define SPF_SYSLOG_SIZE                 (10*80)
00048 
00049 
00050 
00051 
00052 /* ********************************************************************* */
00053 
00054 /* FYI only -- defaults can't be changed without recompiling the library */
00055 #define SPF_DEFAULT_MAX_DNS_MECH 10     /* DoS limit on SPF mechanisms  */
00056 #define SPF_DEFAULT_MAX_DNS_PTR  10     /* DoS limit on PTR records     */
00057 #define SPF_DEFAULT_MAX_DNS_MX   10     /* DoS limit on MX records      */
00058 #define SPF_DEFAULT_SANITIZE      1
00059 #define SPF_DEFAULT_WHITELIST     "include:spf.trusted-forwarder.org"
00060 #define SPF_EXP_MOD_NAME        "exp-text"
00061 #define SPF_DEFAULT_EXP           "Please%_see%_http://www.openspf.org/Why?id=%{S}&ip=%{C}&receiver=%{R}"
00062 
00063 
00064 
00065 /* ********************************************************************* */
00066 
00068 const char *SPF_strerror( SPF_errcode_t spf_err );
00069 
00070 
00072 const char *SPF_strresult( SPF_result_t result );
00074 const char *SPF_strreason( SPF_reason_t reason );
00075 
00076 /* This returns the version information library.  Useful if the library
00077  * is a shared library and may differ from when the application was compiled.
00078  */
00079 void SPF_get_lib_version( int *major, int *minor, int *patch );
00080 
00081 const char *SPF_strrrtype(ns_type rr_type);
00082 
00083 #endif

Generated on Tue Nov 4 13:27:38 2008 for libspf2 by  doxygen 1.5.4