Re: [Exim] Sendmail conversion

Top Page
Delete this message
Reply to this message
Author: Nico Erfurth
Date:  
To: Kelv
CC: exim-users
Subject: Re: [Exim] Sendmail conversion
Kelv wrote:

> I would like to convert a sendmail based mailserver to use Exim 4 (with


Good decision.

> exiscan, etc). The problem I have is that I do not know how to implement
> the Exim equivalent of sendmails virtusertable and mailertable files.



> There are about 50 domains or so, and the virtusertable file looks
> something like this example. Everything other than the aliasX's are real
> mailboxes.
>
> In /etc/mail/virtusertable
>
> @domain1.com            fred
> jim@???            alias1
> pager@???        alias2
> @whatever.com            whatmbx
> blah@???        ernie
> sales@???        alias3
> abuse@???        boss
> and so on..


Can you convert these to
*@domain1.com fred
jim@??? alias1
etc.?

you could use a router like this then:

virtusertable:
   driver = redirect
   domains = +virtual_domains
   no_more
   data = ${lookup{$local_part@$domain} lsearch*@ \
                {/etc/mail/virtusertable}}


Otherwise, the you'll have to use
virtusertable:
   driver = redirect
   domains = +virtual_domains
   no_more
   data = ${lookup {$local_part@$domain} lsearch \
              {/etc/mail/virtusertable}{$value} \
              {${lookup{@$domain} lsearch \
                {/etc/mail/virtusertable} }\
           }


replace lsearch with whatever databaseformat you use.

in the main section you should declare the domainlist virtual_domains,
which contains all domains that should be looked up from virtusertable
(I don't know how sendmail handles this)

> In /etc/mail/aliases...
>
> alias1:        jim@???
> alias2:        fred,jim,12345678@???
> alias3:        theboss,sales


aliases:
driver = redirect
data = ${lookup {$local_part} lsearch{/etc/mail/aliases}}

> and so on..
>
> Less important, but used is a mailertable file for one particular domain I
> was forwarding mail for after cleaning out spam, etc. I'd like to be able
> to do this too.
>
> somedomain.com    esmtp:[some.other.mailserver.com]


Read up about the manualrouter, and use a dataformat that is useable
with exim (you could also use this, but it will be a pain)

if it is only this single domain, you can use
somedomain_router:
driver = manualroute
domains = somedomain.com
route_data = some.other.mailserver.com

> I'd like to do this using the SQL lookup (which is what I was originally
> trying to make work but failed) in Exim but the correct search line to
> parse the virtusertable file would also work.
>
> I did RTFM at exim.org, scoured the web and usenet, etc for days to no


Read it again :)

> avail, so help would be greatly appreciated. Please be explicit if you
> give any instructions e.g. actual exim conf examples.
>
> It would be wonderful if there was a doc somewhere on how to transition
> from sendmail configs such as above. Does the new Exim book cover this? I
> think it would certainly help adoption of Exim.


Hmmm, well I don't know enough about sendmail to help, but if somebody
who knows more about it will send me some sample-files (if possible some
really sick ones) I'll give it a try and write up something.

Nico