Joern Lippold wrote:
Just looking in the mail archive (From: Jeff Jansen <ivb_tech@si
<mailto:ivb_tech@si>...> Re: Multirecipient mail routing, 2003-06-04
14:39) I saw there was a similar question placed before, obviously
solved by a "private patch". Is there meanwhile an official solution
available?
Dear Joren,
The short answer is No, there's no "official" solution available. You
have to patch courier yourself.
The long answer is that this happens because courier assigns each
message to a "queue" based on the mail domain of the recipients. So the
same message to user@domain1 and user@domain2 ends up assigned to two
different queues: domain1 and domain2. Then when courier actually sends
the message it checks the esmtproutes file and looks to see if there is
any special routing. But even if both domains are routed to the same
smarthost the message will still get sent to the smarthost twice, once
for each queue.
I wrote a patch that changes this by consulting the esmtproutes file
before the message is assigned to a queue and if it's finds a smarthost
then ALL messages are put in one queue with the smarthost as the
domain instead of the actual mail domain. This obviously has a slight
performance hit as we're consulting the esmtproutes file a second time.
When I wrote Sam about this a couple of years ago he said that this
issue affects so few people that he wasn't interested in incorporating
it. And I have to agree with him. You are only the second person
(after me) in the last 2 years that I've seen write about this issue.
You can get the patch at Gordon Messmer's web site:
http://phantom.dragonsdawn.net/~gordon/courier-patches/batch-through-smarthost.patch
The one on Gordon's site is against a fairly old courier version, so if
you have any trouble then I'll be happy to send you the same patch
against the most recent stable version of courier - 0.47.
It does mean that you have to patch the courier source each time it
comes out, but with a few lines of shell scripting you can automate the
whole process of extracting, patching, and making rpms.
I hope that helps.