On 08/02/11 10:04, Seb wrote:
> "Am I correct in interpreting that as "forward all mail TO
> user1@localdomain to a different [local/under your control] server?"
>
>
> Yes, it's right but the domains are the same, to be more precise :
>
> I want to forward (or copy?) all mails to user1@localdomain from our
> local server to : user1@localdomain using our default smarthost (like
> every mails relayed). So : the user1@localdomain will be routed to the
> external mail (known on Internet).
>    

I'm curious as to how mail in general gets to the mailboxes on the local 
server - if your domain's MX resolves to the other box, what are you 
using the local mailboxes for, and why then does only one user need to 
be forwarded off to the 'real' mail server? I ask because setting your 
box not to use local mail at all, just sending everything through a 
smarthost is a standard config (indeed, if I am right in guessing from 
your posted sample config that you're using Debian/Ubuntu, it is one of 
the configurations available through dpkg-reconfigure exim4-config).

Anyway, to answer your question:
> I hope that my explanations will help to describe my problem !
>
> According to you're previous mail, I think you're solution will work
> fine !
>
> But before testing, where can I add the "warn:" and
> "forward_not_quite_local" rules please ? Directly in exim conf file ? (I
> don't use split files) or in a system filter file ?
>    
The "warn" should go in the RCPT ACL, after you reject non-local/invalid 
sender etc., but before any accept: directive that might match it. 
Assuming my earlier hunch was correct, look in 
/etc/exim4/exim4.conf.template for:

#####################################################
### acl/30_exim4-config_check_rcpt
#####################################################


The router definition should go somewhere after the "begin routers" 
directive - before the router that handles local mailboxes. You may or 
may not want it to come after the aliases router 
(router/400_exim4-config_system_aliases in the debian template), 
depending on whether you want to permit the address to be 
redirected/copied locally. You can have other things redirect to it 
either way, as the redirect transport causes the routers to be processed 
again from the start with the modified address.
>
> OK, for the smarhost_per_user ! :)
>
> Thanks in advance for u're reply.
>
> Sébastien
>
>    

It occurred to me shortly after I replied to your last message that you 
probably don't need to use an acl variable, and you might be able to 
check local_part in the router condition, but I'm not entirely sure 
about this. You might want to give it a try, as it is probably cleaner, 
but I'd be inclined to get the redirection working first, so if it 
doesn't work at least you know where the problem is!

Dominic


-- 
## 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