Re: [exim] Solution of problem<g>

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Cyborg
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Solution of problem<g>
Am 28.10.2014 um 20:16 schrieb Chris Siebenmann:
>> Let me rephrase the question more generally. Suppose there were
>> three local users; alan, ben, and charles. Can exim be configured
>> so that if ben wants to send mail to charles he uses whatever his
>> MUA to enter 'charles' and the mail stays here; presumable charles
>> could sent messages to 'alan' and 'ben' and the mail would stay
>> here. But any other message, with a more complete address -- way to
>> superman@???, would get sent off by exim to krypton.org and to
>> Superman's mbox(we know Superman doesn't use Maildir, don't we?)
>>
>> I bet there is a way of doing this with exim, and I bet you and lots
>> of others here know how.
> The simple answer is that Exim can certainly do this but it's unlikely
> that anyone is going to have a canned configuration to do this that they
> can dump out here.
>
> The best way to think of Exim in its basic state is that it is not a
> mailer so much as a mailer construction kit. To actually use Exim as a
> MTA, you build whatever actual specific mailer you need out of it by
> designing and programming a series of both ACL rules and routers (and
> sometimes transports). Any existing Exim configuration (including the
> 'generic' configurations supplied with eg the Debian and Ubuntu packaged
> versions of Exim) is the outcome of such a design and building process,
> with as much or as little genericness as desired and possible.
>
> The primary ingredient of Exim as a mailer construction kit is Exim
> routers. For sophisticated Exim usage, you want to think about routers
> as (conditional) steps or decision points in a peculiar programming
> language. Each router implements certain decisions and handles certain
> addresses under certain circumstances; how you order your collection of
> routers then determines how addresses flow through the overall system
> to achieve effects that you want.
>
> In your particular case, you would have more or less a setup with some
> routers that recognize 'local' users on the current machine and deliver
> their mail, and then another router that sends all other krypton.org
> addresses off to the appropriate mail server.


What i wanted to say is, that you can tell the router, which sends your
mail to your smart host,
to NOT do it, if X = Y or X != Y (whatever you need) on most
informations you see in your mail.

That means, you need actual 2 routers, one for the normal flow of
things, and one for the local
users. The last one is already in your example configuration.

I.e.:

remoteusers:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more

Sends all mails to external mailserver, which are not in the
local_domains list.

virtual_user:
driver = redirect
no_verify
domains = +local_domains
allow_fail
allow_defer
data = ...enter valid infos here .... i.e. /home/username/maildir
user = ...enter valid uid here ....
group = mail
check_ancestor

which will send mails to the local users maildir.

You have to decide which values are correct for yourself, as we don't
know it.

Basically all you have to do ist, the enter the domains in the
local_domains list, which should NOT be routed to externel servers i.e.
your smart relay host.


hoped that helped.

Marius