[Exim] Exim in a one-domain, multiple-site configuration

Pàgina inicial
Delete this message
Reply to this message
Autor: Robert Porl
Data:  
A: exim-users
Assumpte: [Exim] Exim in a one-domain, multiple-site configuration
Hi out there !

I subscribed to this list because i thought some of you
guys might be able to help me with a fundamental problem.

We have got the domain "lw-datentechnik.de", for wich
there exist 2 POP3 Mailboxes. One Mailbox only gets
the mail for a few specific users (abc@lw... , xyz@lw...),
the other Box gets all the rest.

We got 2 Linux boxes, one at each location that has to be serviced,
both running exim 3.03. Each site polls one of the mailboxes,
and everyone can get his email. To allow for between-site mail,
One site hourly dials into the other box (via isdn) and the ip-up
scripts on both sides start a fetchmail session to get the mail
the other side has for them.

(All mail for the "other side" is routed into ONE POP3-Account which
is polled by the "other" fetchmail. This is achieved via the exim
rewriting rules in exim.conf)

Lets say, for example, the following rewrite rules exist :

--- AT SITE NR. 1 : ---

james@???    site-b@???    T
smith@???    site-b@???    T


---

--- AT SITE NR.2 : ---

hans@???        site-a@???    T
fritz@???    site-a@???    T


---

The ".intra" addresses are the corresponding local IP network
names, of course. "site-a" and "site-b" are the names of the
pop3 boxes (local user accounts).

To avoid confusion:
The box at SITE 1 routes all mail for users at SITE 2 into a
POP3-Account called "site-b".

The box at SITE 2 routes all mail for users at SITE 1 into a
POP3 -Account called "site-a".

Then every hour, the box at site 1 calls the box at site 2.
When they both have connected, each of them invokes an instance
of fetchmail :

- SITE 1 fetches the contents of the POP3-Mailbox "site-a"
- SITE 2 fetches the contents of the POP3-Mailbox "site-b"

Since the headers of the individual mails have not changed,
the linux boxes are able to deliver each piece of mail
to the appropriate user - so far, so good.


Only one Problem arises out of this configuration :

Whenever there is a message with MULTIPLE DESTINATIONS
(through the use of multiple "FROM:" lines, or "CC:" lines),
a mail loop occurs.

The reason is quite obvious. Immagine a message which is destined
to "james@???" and CCed to "fritz@???".

It gets delivered to the linux box at site 1, which in turn
delivers it to the local user (james) AS WELL AS to user "site-b"
(because of the above rewrite rules).

At the next full hour, site 1 dials into site 2, and site 2 gets the
email in the mailbox "site-b". When exim receives said message, it
delivers it to the local user "fritz", BUT: since the headers of
the mail have not changed, it ALSO gets delivered to the Box
"site-a". One hour later, the mail will be fetched again, and then
the whole thing starts over again.

This goes on until the max. number of hops (is "hops" correct ? No
matter,
you know what i mean :) ) is reached and exim sends an error message
to the originating address.

I have tried to find some easy fix for this, but, so far, haven´t been
very successful.

Can someone help me out please ?

Is it perhaps possible to ignore the rewriting rule to the "site-x"
POP3-boxes when the mail was received from one specific IP adress
(the other box) ? Of course i understand that this is complicated
because FETCHMAIL is involved in the process, so all mail seems
to come from localhost from exim´s point of view. But then one
could make the exim on the OTHER SIDE send its mail to the box on
the opposite end of the (ISDN) line. So if someone knows how to do
ignore specific rules on a per-ip base...

Or can EXIM somehow REMOVE all CC: and unneded FROM: lines ?
That way, information would be lost, but we could live with that
(for internal use). After all, this whole setup concept is pretty
much a hack in itself :)))

Any Suggestions are welcome !

Thanks in advance !

--

"They that give up essential liberty
to obtain a little temporary safety
won't have, nor do they deserve, either one. "

                                - Benjamin Franklin