After many years it is now necessary for me to change my mail server
to one on a different network.  My old server network is going off the
Internet at some point but it will remain with a local dynamic
address.  It will need to relay mail.  I have set up a vpn between the
old server and the new server and am using it for mail transport
between.  At this moment I am still using my previous server for
incoming mail but forwarding outbound mail through the new server to
start the migration.  Mostly all good.  But I do have a problem that I
don't understand and am looking for help from the wisdom of the list.

If I re-mail a message by any of several methods I run into a
rejection on the new outbound server "mail forwarding loop detected"
due to Delivered-To header detection.  Of course the new server havoc
has never seen this message before.  I am running into Delivered-To
loop detection issues.  Let's jump into the details.  Old joseki and
new havoc are the two servers involved.  On havoc:

  Nov 18 12:08:16 havoc postfix/cleanup[27515]: 910CE4A0: reject: header 
X-X-Delivered-To: b...@proulx.com from localhost[127.0.0.1]; 
from=<b...@proulx.com> to=<r...@example.com> proto=ESMTP 
helo=<joseki.proulx.com>: 5.7.1 mail forwarding loop detected

I have slightly redacted the mail addresses in order to avoid exposing
addresses but I think not in any significant way.  Hopefully.  What I
don't understand is why havoc's configuration is rejecting this
message.  The docs say:

  http://www.postfix.org/pipe.8.html

    The D flag also enforces loop detection (Postfix 2.5  and
    later):  if  a  message  already contains a Delivered-To:
    header with the same recipient address, then the  message
    is  returned  as undeliverable. The address comparison is
    case insensitive.

But b...@proulx.com is not the recipient address.  So why is it matching?
What configures havoc to think b...@proulx.com is a forwarding loop?
That seems to be the snag I am tripping over.  Of course if I delete
all Delivered-To headers then mail is not rejected.

Thanks!
Bob

The havoc system is the new outbout relay.  On havoc I think the
significant config is:

  cat /etc/mailname
  havoc.proulx.com

  myhostname = havoc.proulx.com
  myorigin = /etc/mailname
  mydestination = $myhostname, localhost.$mydomain, localhost
  mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

And on havoc somewhat more complicated by these that I think are not
related:

  transport_maps = hash:/etc/postfix/transport
  relay_domains = $mydestination
  relay_recipient_maps = hash:/etc/postfix/relay_recipients
  virtual_alias_domains = example.net, example.org # redacted domain names
  virtual_alias_maps = hash:/etc/postfix/virtual

Reply via email to