Re: [EXIM] Masquerade on outbound mail?

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: J.R.Haynes
Dátum:  
Címzett: Alexander Koch
CC: exim-users
Tárgy: Re: [EXIM] Masquerade on outbound mail?
On Thu, 3 Dec 1998, Alexander Koch wrote:

> Hello.
>
> A client of us is requesting to have a mailer installed that maps
> local usernames like "my" to H.Meyer@???.
>


We do exactly this for nearly all our local usernames (which is much more
than 80)


> will a generalized rewrite rule be better? does it scale to have 80
> of them (not many mails anyway on that site).
>


Use a generalized rewrite rule - it scales to considerably more than 80
without problem.

> any hints appreciated. i'm rather a bit afraid to build a lookup on
> a file in the rewrites configuration. i'd rather have 80 rewrite rules
> so i can brake less things... :)
>


I would suggest one rewrite rule is a lot easier. Here is ours (slightly
adapted to remove our specific domain


*@partial-lsearch;urwhosts    \
    ${lookup{${lc:$1}}dbm{users}\
        {$value}fail}@??? fF



The file urwhosts is a list of machines for which you want to perform
rewriting - we use a partial-lsearch so that we can put entries like
*.dept.domain.us in it.

The users file is a dbm file (created using exim_dbmbuild) where the keys
are the username and the values the required rewrite - created from a flat
text file of the following form

me:H.Meyer

The fF means rewrite From and Envelope-From fields


So if an email has the From field me@??? and
local.machine.name is in urwhosts then it will be rewritten to
H.Meyer@???


For more information look in the rewrite chapter of the manual.


There is no performance hit for us, and we have about 7000 entries in the
dbm file. For your 80 I should think you could use a flat-text file
search.

Exim rewrite rules are very flexible. There is a department here that uses
an 'interesting' mail system which sometimes produces very odd addresses
for certain users, and I had no problem writing rewrite rules to cope with
all the different flavours of address that they seem to produce.


Hope this helps


Jonathan Haynes



------------------------------------------------------------------------------

                             J. R. Haynes
                Systems Programmer / Software Consultant


     Cranfield Computer Centre,          e-mail: J.Haynes@???
     Cranfield University,               
     Wharley End,                        Tel: Bedford (01234) 750111 Extn 2825
     Cranfield,                          Fax: Bedford (01234) 751814
     Beds.,
     MK43 0AL.              



--
*** Exim information can be found at http://www.exim.org/ ***