ok,
thank you very much for your answer, everything is ok.
Just one last question :
On this server, I'm running amavis router.
I'm affraid that if I put the virtual_aliases routeur after amavis routeur
it will never check the virtual_aliases router ?
my configuration :
begin routers
amavis:
driver = manualroute
condition = "${if eq {$interface_port}{10025} {0}{1}}"
# if scanning incoming mails, uncomment the following line
# change local_domains accordingly
domains = +local_domains
transport = amavis
route_list = "* localhost byname"
self = send
virtual_aliases:
driver = redirect
data = ${lookup{$local_part@$domain}lsearch{/etc/virtaliases}}
> file_transport = address_file
> pipe_transport = address_pipe
>
smarthost_out:
driver = manualroute
domains = ! +local_domains
transport = remote_smtp
route_list = "* STG-PROXY-PUBLIC.STG bydns"
userforward:
driver = redirect
check_local_user
file = $home/.forward
no_verify
no_expn
check_ancestor
allow_filter
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply
# This router matches local user mailboxes.
localuser:
driver = accept
check_local_user
transport = local_delivery
#####################################################"
begin transports
amavis:
driver = smtp
port = 10024
allow_localhost
remote_smtp:
driver = smtp
local_delivery:
driver = appendfile
# file = /var/mail/$local_part
delivery_date_add = true
envelope_to_add = true
return_path_add = true
group = mail
mode = 0660
directory = /home/${local_part}/Maildir/
maildir_format
address_pipe:
driver = pipe
return_output
address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add
address_reply:
driver = autoreply
tks ;-)
JPB
2006/7/12, Renaud Allard <renaud@???>:
>
> You should have on the machine handling the mail storage a router like
> this one:
>
> virtual_aliases:
> driver = redirect
> data = ${lookup{$local_part@$domain}lsearch{/etc/virtaliases}}
> file_transport = address_file
> pipe_transport = address_pipe
>
> in your /etc/virtaliases, you should have something like this
> toto@??? totostg
> toto@??? totofrog
>
> That means, if you wish a different mailbox for each mail account, the
> user should also be different.
>
> The virtual_aliases router justs redirects mail for toto@??? to
> totostg mailbox (/home/totostg/Maildir/new in your case).
>
> If you wish the same mailbox for the 2 domains, put something like this
> in your virtaliases file:
> toto2@??? toto2
> toto2@??? toto2
> I this case, both will go to /home/toto2/Maildir/new
>
> Jean-Paul BALOCHE wrote:
> > Hi,
> >
> > Thanks for your answer.
> >
> > for the moment, I have configured exim like this :
> > [...]
> > domainlist local_domains = stg.com:frog.com:localhost
> > [...]
> > smarthost_stg:
> > driver = manualroute
> > domains = +local_domains
> > local_parts = lsearch;/etc/exim/valid_mailboxes_stg
> > transport = remote_smtp
> > route_list = "* 192.168.102.12"
> >
> > smarthost_frog:
> > driver = manualroute
> > domains = +local_domains
> > local_parts = lsearch;/etc/exim/valid_mailboxes_frog
> > transport = remote_smtp
> > route_list = "* 192.168.102.12"
> > ...
> >
> > So, if I replace smarthost_stg and smarthost_frog section by :
> >
> > data = ${lookup{$local_part@$domain}lsearch{/etc/aliases}}
> >
> > and if I configure /etc/aliases like this :
> > toto1@???
> > toto1@???
> >
> > is it ok ?
> >
> > What I don't understand is how it will work :
> > if toto1@??? receives an e-mail, in which mailboxe will it goes ?
> > /home/toto1/Maildir/new ?
> > and how does it work for toto1@??? ? Will the mail goes in
> > /home/toto1/Maildir/new directory ?
> > What I want is to have 2 different directories (one for each domain)
> >
>
>
>
>