[exim] temporary variables in transports

Pàgina inicial
Delete this message
Reply to this message
Autor: Felix Schwarz
Data:  
A: exim-users
Assumpte: [exim] temporary variables in transports
Hi all,

I have a problem configuring an Exim transport.

Setting:
I have some virtual users. Additionally I have a "site"-concept, that
means if domain1.example and domain2.example are belonging to the same
site then domain2.example is an alias for domain1.example.
Therefore foo@??? may be written as foo@??? as
they point to the same mailbox.
Furthermore I have some aliases such as info@??? that
should point to sales@???.

I can configure each of these two features alone but not both at the
same time. One important thing is that I don't want to rewrite the
envelope headers I need the results of these two lookups as an
argument for calling an external program (DSPAM).


What I tried:
1. lookup the domain in a file to get the "real" domain (I have one
specific "real" domain in every site).
2. lookup $local_part@$real_domain to get the real user.

I don't know how to do step 2.

First part is easy
   debug_print = ${lookup{$domain} \
                    lsearch{/usr/local/junkkiller/sites} \
                      {$value} \
                      {$domain} \
                  }
but how should I do the alias lookup? If I could use a temporary
variable in a pipe transport everything would be okay.
I could write something as
  var = ${lookup{$domain} ...
  transport = ... ${lookup{$local_part@$var} ...


Some additional constraints:
AFAIK Redhat doesn't provide mysql enabled exim packages. In order to
get timely security updates I don't want to use mysql or any other
non-standard stuff (I think I can achieve what I want in a single
MySQL-Query). This won't be an issue as I will have only a few hundred
users on my system with few aliases.
If there is no easy solution of my problem it would help me if someone
could point me to mysql enabled rpms for redhat which are well maintained.

This is only a gateway system the mailbox store is on another system
(black box). Therefore I don't want/don't have to modifiy the
envelopes. (I think it would be easy to achieve the alias/site
resolution with two routers.)

Thanks for your help. If I am too confused tell me and I'll try to
explain better.

--
Felix