Re: [EXIM] virtual host question

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Philip Hazel
Datum:  
To: Gregory Skouby
CC: exim-users
Betreff: Re: [EXIM] virtual host question
On Sat 05 Sep, Gregory Skouby wrote:

> virtual:
> driver = aliasfile
> group = mail
> domains = lsearch:/usr/local/etc/exim/alias.virtual
> search_type = lsearch*
> file = /usr/local/etc/exim/alias.virtual
> include_domain


Looks good, though the "group = mail" doesn't achieve anything, since
all this director is doing is changing envelope addresses.

>  The alias.virtual files is in this format:
> virtualhost.com:      local_address@local_machine


Er, that doesn't look right. What you need is

virtual_user@???: local_user@local_machine

In other words, the alias file must contain whole addresses.

Now, if you want mail for *any* local part at the virtual domain to go
to a single address there are various ways you can do it. One might be

virtual:
driver = smartuser
domains = lsearch;/usr/local/etc/exim/alias.virtual
new_user = ${lookup{$local_part}lsearch{/usr/local/etc/exim/alias.virtual}{$value}fail}

Or perhaps you want to specify certain local parts, and have a default
for the rest. In that case your original director can be used, but with
the search type set to lsearch*@ and an entry in the alias file of

*@virtualhost.com: <some address>

to cope with the default.

> When I attempt to send a message to anything@??? this shows up in my exim_
> mainlog:
> 1998-09-04 19:51:30 0zF1tJ-0001tw-00 ** greg@virtualhost: unknown local-part "greg" in
> domain "virtualhost.com"


You can use an exim command with -d (or -d2, -d3 ... -d9) to get it to
show you how it is processing addresses. You don't actually need to send
a message, just try

exim -d2 -bt greg@virtualhost

for example.

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



--
*** Exim information can be found at http://www.exim.org/ ***