Re: [exim] Query on address rewriting - can it be done in an…

Pàgina inicial
Delete this message
Reply to this message
Autor: Ron White
Data:  
A: exim-users
Assumpte: Re: [exim] Query on address rewriting - can it be done in an ACL?
On Sun, 2010-05-09 at 12:31 +1000, Ted Cooper wrote:
> This doesn't seem like a job for address rewriting. I just use a catch
> all router at the end with specific conditions.
>
> I have a very old setup that will catch all crap sent to a domain I
> specify in a directory. I should have changed this ages ago into
> something more useful, but not many people use a catch all so it's not
> something I want to change.
>
> Anyway, If I have a domain I want to catch all on, I "touch
> /etc/exim/catchalladdress/<domain to catch>" and then this router
> sitting at the bottom of my routers does the rest:
>
> # last router before default reject
> catchall:
> driver = redirect
> domains = dsearch;/etc/exim/catchalladdress
> data = catchall@$domain
> cannot_route_message = Unknown user
>
> .. well, except that I also add an alias on that domain called
> "catchall" which redirects itself to whatever account you want, OR just
> create an account called catchall that collects everything.
>
> If you want, you can keep the original recipients by adding them as a
> header.
>
> I only run a catch all so I can make up email addresses on the fly on a
> spam/bacon trap only domain. Very useful for tagging which site which
> addresses were entered into. Other than that, they're evil.
>
>
>

Hi Ted,

Thanks for that. It's a little more complex in my set up because Exim
handles mail for:

1. Locally hosted domains and recipients
2. Remote/relay to domains and recipients
3. Remote/relay domain may also have users locally hosted user
accounts(such as postmaster/abuse/notifications).

The catch-all is dynamic. The user can change the local part which means
(1) the final catch-all recipient needs to be verified so we don't
accept mail for something we can't deliver (2) that catch all could be a
locally routed account, a remote smtp destination (sub classes of 'by
ip, by hostname, by mx) (3) the per-user settings of the destination
catch all, which are set in the ACL's, would not be honoured potentially
leading to spam/viruses flowing through unchecked. As far as I
understand it using a router to do it means that you have accepted the
message at that point. Once it goes round the loop again it may not pass
the per-user settings of the new recipient which would mean it bounces.
I've lost the chance to dump it at SMTP time.

It would also mean adding another four routers, plus more logic to deal
with 'catch all' scenario. I agree that for a box just hosting simple
local virtual users/domains doing it with a drop off router would be
easy.

Of course being new to Exim I may be totally missing how a redirect
router works, but I think in my scenario I'm going to need to rewrite it
before it starts traversing the ACL's.

Inline conditional rewriting in the ACL would be so useful to me, but it
could be because my overall understanding of Exim is poor at this time.

Thanks for the response - it's really appreciated.
Ron.