[Exim] blackhole router for http user

Top Page
Delete this message
Reply to this message
Author: Arkadiusz Miskiewicz
Date:  
To: exim-users
Subject: [Exim] blackhole router for http user
Hi,

Mine problem is that spam is going through my server via ...
php mail(). Unfortunately mail() in php is so bad that I can't
even check which php script was used to send mail :\

So I'm going to allow emails only when sender or recipient
domain of message is local.

blackhole:
  driver = redirect
  condition = "${if and \
                        { \
                                {or \
                                        { \
                                                {eq {$sender_address_local_part}{http}} \
                                                {eq {$h_sender}{http@???}} \
                                        } \
                                } \
                                {eq {$received_protocol}{local}} \
                        } \
                        {yes}{no} \
                }"
  require_files = !/etc/mail/virtual-accounts/$domain : !/etc/mail/virtual-accounts/$sender_address_domain
  data = :blackhole:


unfortunately this gives me:

checking "condition"
LOG: MAIN PANIC
failed to expand condition "${if and { {or { {eq {$sender_address_local_part}{http}} {eq {$h_sender}{http@???
.pl}} } } {eq {$received_protocol}{local}} } {yes}{no} }" for blackhole router: missing 2nd string in {} after "eq"
blackhole router skipped: condition failure

doh!

Apart of that syntax problem I'm thinking about nicer way than checking
$sender_address_local_part and $h_sender. Note that things are more
complicated because I'm rewriting headers:

http@???     "$reply_address"                E


Ohh, found it:
blackhole:
  driver = redirect
  condition = "${if and { \
                        {eq {$authenticated_id}{http}} \
                        {eq {$received_protocol}{local}} \
                        } \
                {yes}{no}}"
  require_files = !/etc/mail/virtual-accounts/$domain : !/etc/mail/virtual-accounts/$sender_address_domain
  data = :blackhole:


Anyway I'm sending this because I want to know where is my syntax error.
--
Arkadiusz Miśkiewicz          niestety kloczek lubi być dyktatorem
arekm@???        AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PWr