[Exim] smartuser & faking lookups (perl, database, queries)

Góra strony
Delete this message
Reply to this message
Autor: Paul Makepeace
Data:  
Dla: exim-users
Nowe tematy: [Exim] I am a bit confused with what I need
Temat: [Exim] smartuser & faking lookups (perl, database, queries)
I'm using Oracle rather than MySQL as a database and have implemented
all the details in Perl & the DBI. My efforts so far have been replacing
various "query" directives with "new_address".

For example,

virtual_forward:
driver = aliasfile
search_type = mysql
query = "select remote_name from forwarder, domain where local_part...

becomes,

virtual_forward:
driver = smartuser
new_address = ${perl{virtual_user}{forwarder}{$local_part}{$domain}}

(with perl returning undef on lookup failures.)

However, it seems that I can't do this for local addresses since
new_address requires an "@", i.e.

virtual_localuser:
driver = smartuser
new_address = ${perl{virtual_user}{localuser}{$local_part}{$domain}}
transport = virtual_localdelivery

..breaks if the query returns, say, "paulm". One workaround is if it's
found is to add the domain back in in the perl subroutine but I was
wondering if there is a better way of doing this, or not to use
smartuser/new_address at all.

Paul