Re: [exim] Unrouteable address ERROR]

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Magnus Holmgren
日付:  
To: exim-users
題目: Re: [exim] Unrouteable address ERROR]
Thursday 04 May 2006 16:29 skrev oleg@???:
> Well Magnus, i wish i can test all by myself, but it is a working server,
> and my users will kill me, if i startt testing. I just tried to make union
> queries in mysql and it didnt work, i guess some syntax errors ..How do a
> join 2 lookups with exim not with mysql, i tried as from an example,
> joining by "/"
>
> data = ${lookup mysql{SELECT sendto FROM aliases \
>           WHERE (username='$local_part' AND domainname='$domain') \
>           OR (username='*' AND domainname='$domain')}}/
>         ${lookup mysql{ SELECT id FROM users \
>          WHERE id='${quote_mysql:${local_part}@${domain}}' }}

>
> but it gives an error( option setting expected). Searched in exim manual
> dindn't find a single hint.


If that's copied exactly from your configuration, then the error message is
due to the fact that you didn't end the third line with "\".

However, items in the redirection data must be separated by commas or
newlines, as stated in section 22.4 of the spec.

I was thinking more along the lines of

virtual_user_or_alias:
  driver = redirect
  allow_fail
  allow_defer
  data = ${lookup mysql{ SELECT maildir FROM users \
          WHERE id='${quote_mysql:${local_part}@${domain}}' }} \n\
         ${lookup mysql{SELECT sendto FROM aliases \
          WHERE (username='$local_part' AND domainname='$domain') \
          OR (username='*' AND domainname='$domain')}}
  file_transport = address_file
  pipe_transport = address_pipe
  directory_transport = address_directory


but I don't know what Exim would say about empty lines. This data setting
could also work (assuming MySQL 4.0 or later):

  data = ${lookup mysql{ SELECT maildir FROM users \
          WHERE id='${quote_mysql:$local_part@$domain}'  \
          UNION SELECT sendto FROM aliases \
          WHERE (username='${quote_mysql:$local_part}' AND \
          domainname='${quote_mysql:$domain}') \
          OR (username='*' AND domainname='${quote_mysql:$domain}')}}


--
Magnus Holmgren
holmgren@???