chiark
/
gitweb
/
~mdw
/
exim-config
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
spam.m4: Capture extracting a field from `$address_data' in a macro.
[exim-config]
/
spam.m4
diff --git
a/spam.m4
b/spam.m4
index 18e4d17dce9cb22717b8843a8f80cff42d877ab4..14596b4bb597e01ac56a14edd4aae97f41caf761 100644
(file)
--- a/
spam.m4
+++ b/
spam.m4
@@
-64,6
+64,9
@@
m4_define(<:SPAMLIMIT_USERV:>,
SHQUOTE($2) SHQUOTE(@$3)} \
{SPAMLIMIT_CHECK($value)}}:>):>)
SHQUOTE($2) SHQUOTE(@$3)} \
{SPAMLIMIT_CHECK($value)}}:>):>)
+m4_define(<:GET_ADDRDATA:>,
+ <:extract{<:$1:>}{${if def:address_data{$address_data}{}}}:>)
+
SECTION(global, policy)m4_dnl
spamd_address = CONF_spamd_address CONF_spamd_port
SECTION(global, policy)m4_dnl
spamd_address = CONF_spamd_address CONF_spamd_port
@@
-113,10
+116,7
@@
rcpt_spam:
## during recipient verification. (This just saves duplicating this
## enormous expression.)
warn set acl_m_this_spam_limit = \
## during recipient verification. (This just saves duplicating this
## enormous expression.)
warn set acl_m_this_spam_limit = \
- ${sg {${extract {spam_limit} \
- {${if def:address_data \
- {$address_data}{}}} \
- {$value}{nil}}} \
+ ${sg {${GET_ADDRDATA(spam_limit){$value}{nil}}} \
{^(|.*\\D.*)\$}{CONF_spam_max}}
## If there's a spam limit already established, and it's different
{^(|.*\\D.*)\$}{CONF_spam_max}}
## If there's a spam limit already established, and it's different