> From: Jim Cheetham

> > $ sqlite3 /etc/exim4/mta.db 'select name from domains where status="active"'
> > local.dom
> > good.dom
> > ok.dom
> 
> Running this through exim -be shows the problem ... only 'ok.dom' should 
> pass, 'bad.dom' should fail.
> > $ exim -be '${if match_domain{ok.dom}{sqlite; /etc/exim4/mta.db select name 
> > from domains where status="active";}{yes}{no}}'
> > yes
> > $ exim -be '${if match_domain{bad.dom}{sqlite; /etc/exim4/mta.db select 
> > name from domains where status="active";}{yes}{no}}'
> > yes

Try:
${lookup sqlite{/etc/exim4/mta.db select name from domains where 
status='active' and name='${quote_sqlite:${lc:bad.com}}'}{yes}{no}}

Possibly quote_sqlite and lc are redunant in this case, but they don't hurt.

All this purely theoretically from documentation, I never used sql.

-- 
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to