SV: SV: [Exim] I need help to implement sendder rules for vi…

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Flemming Christensen
Data:  
Para: Joachim Wieland
CC: Exim-Users (E-mail)
Assunto: SV: SV: [Exim] I need help to implement sendder rules for virtual domain users
Hi again

I have tried to make the routers but it fails to expand the condition:

--- the routers
forbid_external_in:
  driver = redirect
  domains = +internal_domains
  condition = ${if and \
                 {eq {${lookup mysql{select local_only from user where \
                      mailadresse='${quote_mysql:$local_part@$domain}'}}{$value}} \
                      {1}{yes}{no} \
                 } \
                 {eq {$lookup mysql{select domain from user \
                     where domain = '${domain:$sender_address}'}}{$value}} \
                     {}{yes}{no} \
                 } \
               }
  allow_fail
  data = :fail:


forbid_internal_out:
  driver = redirect
  domains = ! +internal_domains
  # brug ikke denne router hvis $sender_address's local_only = 1
  # maaske checke for om $sender_address kommer fra et internt domaene
  condition = ${if and \
               {eq {${lookup mysql{select local_only from user where \
                      mailadresse='${quote_mysql:$local_part@$domain}'}}{$value}} \
                      {1}{yes}{no} \
                      } \
               {eq {$lookup mysql{select domain from user \
                     where domain = '${domain:$sender_address}'}}{$value}} \
                     {}{yes}{no} \
                     } \
               }
  allow_fail
  data = :fail:


--- the error in exim_panic.log
2002-07-30 14:10:08 failed to expand condition "${if and {eq {${lookup mysql{select local_only from user where mailadres
se='${quote_mysql:$local_part@$domain}'}}{$value}} {1}{yes}{no} } {eq {$lookup mysql{select domain from user where domai
n = '${domain:$sender_address}'}}{$value}} {}{yes}{no} } }" for forbid_internal_out router: subcondition in {} expected
inside "and{...}" condition
2002-07-30 14:10:08 failed to expand condition "${if and {eq {${lookup mysql{select local_only from user where mailadres
se='${quote_mysql:$local_part@$domain}'}}{$value}} {1}{yes}{no} } {eq {$lookup mysql{select domain from user where domai
n = '${domain:$sender_address}'}}{$value}} {}{yes}{no} } }" for forbid_internal_out router: subcondition in {} expected
inside "and{...}" condition
2002-07-30 14:10:09 17ZVpI-00011s-00 failed to expand condition "${if and {eq {${lookup mysql{select local_only from use
r where mailadresse='${quote_mysql:$local_part@$domain}'}}{$value}} {1}{yes}{no} } {eq {$lookup mysql{select domain from
user where domain = '${domain:$sender_address}'}}{$value}} {}{yes}{no} } }" for forbid_internal_out router: subconditio
n in {} expected inside "and{...}" condition