Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-27-2004, 08:49 AM   #1
Registered: Jun 2004
Location: Nova Scotia, Canada!
Distribution: Ubuntu
Posts: 170

Rep: Reputation: 30
Multiple Domains with Exim 4.34

Hello all....

I've looked around the forums and read what's there, and I'v also read the Exim FAQ, but I'm still having problems.

I think what I want to do is pretty routine, but I don't know enough about email to make it happen.

My linux box's domain is I have all servers (web, ftp, email, etc) running just fine on that domain. Now I want to move another of my domains over (

The webserver part is fine, it's running, but I can't seem to wrap my head around how to get my box to accept and deliver traffic for the domain.

I have multiple email addresses, in fact too many to handle, so I think what I want to do is have all email put into a specific email box.

This is the snippet of the Exim doc I am working with:

Q0402:  How do I arrange for all incoming email for *@some.domain to go into one pop3 mail account? The customer doesn't want to add a list of specific local parts to the system.

A0402:  Set up a special transport that writes to the mailbox like this: 

     driver = appendfile
     file = /pop/mailbox
     user = exim

The file will be written as the user exim. Then arrange to route all mail for that domain to that transport, with a router like this:

     driver = accept
     domains = some.domain
     transport = special_transport
I understand that I have to modify /pop/mailbox to read /var/mail/<username> and that some.domain should be changed to

My question is ..where do I put this stuff? I'm using exim 4.34 and therefore have an /etc/exim4 directory. In that directory there are directories for router and transport which are filled with individual files. I assumed from this that I was to create new files in these directories and plunk the apppropriate code in there, but that doesn't work.

When I send an email to a address, it get's bounced with the following error:

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) 
     Too many "Received" headers - suspected mail loop

------ This is a copy of the message, including all the headers. ------

Return-path: <>
Received: from theheatsinkbbs ([])
	by theheatsinkbbs with esmtp (Exim 4.34)
	id 1CBvU9-0001h4-Sc
	for; Mon, 27 Sep 2004 07:24:09 -0600
Received: from theheatsinkbbs ([])
	by theheatsinkbbs with esmtp (Exim 4.34)
	id 1CBvTe-0001gz-1d
	for; Mon, 27 Sep 2004 07:23:38 -0600
The 'Received' header gets repeated about 50 times....

Any ideas?


Old 09-27-2004, 11:55 AM   #2
Senior Member
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
hi try this
(i think this domainlist can still contain your actual machine domain as well)
domainlist local_domains = @ : \
    @[] : \
    localhost : \
then under directors configuration after the real_local: section is over make a new virtual: section
  driver = redirect
  data = ${lookup{$local_part@$domain}lsearch*@{/etc/exim4/virtual.users}}
  domains = partial-lsearch;/etc/exim4/
then just make some files that look like this
--- ---

--- virtual.users ---     : localuser  :
  *               : catchalluser     : localuser2  :
  *               : catchall2

Last edited by foo_bar_foo; 09-27-2004 at 11:56 AM.
Old 09-27-2004, 12:51 PM   #3
Registered: Jun 2004
Location: Nova Scotia, Canada!
Distribution: Ubuntu
Posts: 170

Original Poster
Rep: Reputation: 30
Originally posted by foo_bar_foo
[B]hi try this

Thanks for the response. I tried your suggestion and the routing seems to's what I get when I run an exim -d -bt

theheatsinkbbs:/etc/exim4# /usr/sbin/exim4 -d -bt
Exim version 4.34 uid=0 gid=0 pid=7968 D=fbb95cfd
Berkeley DB: Sleepycat Software: Berkeley DB 3.2.9: (May 26, 2004)
Support for: iconv() IPv6 GnuTLS
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dsearch nis nis0 passwd
Authenticators: cram_md5 plaintext
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore autoreply lmtp pipe smtp
Fixed never_users: 0
changed uid/gid: forcing real = effective
  uid=0 gid=0 pid=7968
  auxiliary group list: <none>
configuration file is /var/lib/exim4/config.autogenerated
log selectors = 00000ffc 00010400
trusted user
admin user
user name "root" extracted from gecos field "root"
originator: uid=0 gid=0 login=root name=root
sender address =
Address testing: uid=0 gid=104 euid=0 egid=104
--------> hubbed_hosts router <--------
checking domains
expansion of "${if exists{/etc/exim4/hubbed_hosts}{partial-lsearch;/etc/exim4/hubbed_hosts}fail}" forced failure: assume not in this list
hubbed_hosts router skipped: domains mismatch
--------> dnslookup_relay_to_domains router <--------
checking domains
search_open: lsearch "/etc/exim4/"
search_find: file="/etc/exim4/"
  key="" partial=2 affix=*. starflags=0
LRU list:
internal_search_find: file="/etc/exim4/"
  type=lsearch key=""
file lookup required for
  in /etc/exim4/
lookup yielded: in "@ : @[] : localhost: partial-lsearch;/etc/exim4/"? yes (matched "partial-lsearch;/etc/exim4/")
data from lookup saved for cache for +local_domains: in "! +local_domains : +relay_to_domains"? no (matched "! +local_domains")
dnslookup_relay_to_domains router skipped: domains mismatch
--------> dnslookup router <--------
checking domains
cached yes match for +local_domains
cached lookup data = in "! +local_domains"? no (matched "! +local_domains" - cached)
dnslookup router skipped: domains mismatch
--------> real_local router <--------
real_local router skipped: prefix mismatch
--------> virtual router <--------
checking domains
search_open: lsearch "/etc/exim4/"
  cached open
search_find: file="/etc/exim4/"
  key="" partial=2 affix=*. starflags=0
LRU list:
internal_search_find: file="/etc/exim4/"
  type=lsearch key=""
cached data used for lookup of
  in /etc/exim4/
lookup yielded: in "partial-lsearch;/etc/exim4/"? yes (matched "partial-lsearch;/etc/exim4/")
calling virtual router
rda_interpret (string): ${lookup($local_part@$domain}lsearch*@{/etc/exim4/virtual.users}}
virtual router: defer for
  message: failed to expand "${lookup($local_part@$domain}lsearch*@{/etc/exim4/virtual.users}}": missing lookup type cannot be resolved at this time:
  failed to expand "${lookup($local_part@$domain}lsearch*@{/etc/exim4/virtual.users}}": missing lookup type
search_tidyup called
>>>>>>>>>>>>>>>> Exim pid=7968 terminating with rc=1 >>>>>>>>>>>>>>>>
I'm not savvy enough to intrepret all of this, but it appears that the 'failed to expand...' line probably contains a clue...I just don't know how to read it properly.

I have the following and virtual.users files as well:

#virtual domains
Code: : heatsink
* : heatsink : heatsink
* : heatsink



PS - should mention also that the messages are definitely arriving at the box. Here's a snippet of my mailq

theheatsinkbbs:/etc/exim4# mailq

52m  1.1K 1CBywA-0001zA-4G <>

37m  1.1K 1CBzAr-00021g-3v <>

36m  1.1K 1CBzB3-00021h-R0 <>

I put the 'xxx''s in to save my work email address from publication

Last edited by jonwatson; 09-27-2004 at 12:54 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple domains? WorldBuilder Linux - Networking 2 05-13-2005 08:51 PM
EXIM blocking domains n3r0 Debian 3 09-22-2004 08:23 PM
RH 8.0 Multiple domains brif8 Linux - Networking 3 01-27-2003 06:08 PM
Multiple Domains? cic Linux - Networking 2 01-23-2002 06:38 AM
Multiple Domains??? cic Linux - Networking 1 10-08-2001 10:55 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:57 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration