diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-04-25 08:33:18 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-04-25 08:33:18 +0000 |
commit | b82bdbd3c5f891bd262010da65b5341c964bf2a0 (patch) | |
tree | a0d178556072f68a5c08a11b4d6e92bbe02f9456 /mflib | |
parent | b2abbb1fea0ccb133a3ca3607ab187549d4b3aeb (diff) | |
download | mailfromd-b82bdbd3c5f891bd262010da65b5341c964bf2a0.tar.gz mailfromd-b82bdbd3c5f891bd262010da65b5341c964bf2a0.tar.bz2 |
* NEWS: Update
* src/lex.l (parse_require): Bugfix
* mflib/heloarg_test.mf, mflib/spf.mf: Begin the names of the static
functions with __
* doc/Makefile.am (check-refs): Scan all texi sources
(check-mflib): Ignore static names (__.*)
* doc/mailfromd.texi, doc/mtasim.texi, doc/macros.texi: Update.
git-svn-id: file:///svnroot/mailfromd/trunk@1381 7a8a7f39-df28-0410-adc6-e0d955640f24
Diffstat (limited to 'mflib')
-rw-r--r-- | mflib/heloarg_test.mf | 4 | ||||
-rw-r--r-- | mflib/spf.mf | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/mflib/heloarg_test.mf b/mflib/heloarg_test.mf index ce4eda5a..48b31f81 100644 --- a/mflib/heloarg_test.mf +++ b/mflib/heloarg_test.mf @@ -34,7 +34,7 @@ const HELO_IPMISMATCH 7 # ARG does not resolve to the remote client #pragma regex push +extended -func domainof(string arg) returns string +func __domainof(string arg) returns string do if %arg matches '[^.]+\.(.*)' return \1 @@ -75,7 +75,7 @@ do # `HELO' arg in brackets is not an IP return HELO_ARGNOIP elif ismx(%helo_arg, %remote_ip) - or domainof(hostname(%remote_ip)) = %helo_arg + or __domainof(hostname(%remote_ip)) = %helo_arg return HELO_SUCCESS elif (resolve %helo_arg = "0") # `HELO' arg does not resolve to an IP diff --git a/mflib/spf.mf b/mflib/spf.mf index 9bd35317..44584904 100644 --- a/mflib/spf.mf +++ b/mflib/spf.mf @@ -46,7 +46,7 @@ do return "UNKNOWN (" %code ")" done -func spf_get_cache(string ip, string domain, string sender) +func __spf_get_cache(string ip, string domain, string sender) returns number do string record safedbget(%spf_database, "%ip-%domain-%sender") @@ -73,14 +73,14 @@ do return %result done -func spf_put_cache(number result, string ip, string domain, string sender) +func __spf_put_cache(number result, string ip, string domain, string sender) do safedbput(%spf_database, "%ip-%domain-%sender", (time() + %spf_ttl) " %result <%spf_mechanism> <%spf_explanation>") done -func spf_log(number result, string ip, string domain, string sender) +func __spf_log(number result, string ip, string domain, string sender) do string logmsg "SPF check_host(%ip, %domain, %sender) = " spf_status_string(%result) @@ -101,7 +101,7 @@ done func check_host(string ip, string domain, string sender, string helo) returns number do - number result spf_get_cache(%ip, %domain, %sender) + number result __spf_get_cache(%ip, %domain, %sender) if %result == -1 set result spf_check_host(%ip, %domain, %sender, %helo, @@ -111,11 +111,11 @@ do if %result = None set spf_ttl %spf_negative_ttl fi - spf_put_cache(%result, %ip, %domain, %sender) + __spf_put_cache(%result, %ip, %domain, %sender) else set spf_cached 1 fi - spf_log(%result, %ip, %domain, %sender) + __spf_log(%result, %ip, %domain, %sender) return %result done |