[9fans] possible forward loop on new mailserver - Plan9

This is a discussion on [9fans] possible forward loop on new mailserver - Plan9 ; Moin I want to setup a Plan 9 server to handle mail for mteege.de but I've got bounces with "failed with error 'possible forward loop'". I put "norelay=on" and "ourdomains mteege.de" in /mail/lib/smtpd.conf. The MX entry points to the new ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: [9fans] possible forward loop on new mailserver

  1. [9fans] possible forward loop on new mailserver

    Moin

    I want to setup a Plan 9 server to handle mail for mteege.de but I've
    got bounces with "failed with error 'possible forward loop'". I put
    "norelay=on" and "ourdomains mteege.de" in /mail/lib/smtpd.conf. The
    MX entry points to the new mailserver.

    > @192.168.47.11 mteege.de mx

    22664.1: sending to 192.168.47.11/192.168.47.11 mteege.de mx
    22664.1: sending to 192.168.47.11/192.168.47.11 mteege.de mx
    ----------------------------
    answer mteege.de 10 sec mx 1 crn.mteege.de
    ----------------------------

    and the name of crn is resolvable

    cpu% ndb/query ether `{cat /net/ether0/addr} sys
    crn

    > @192.168.47.11 crn.mteege.de

    22665.1: sending to 192.168.47.11/192.168.47.11 crn.mteege.de ip
    22665.1: sending to 192.168.47.11/192.168.47.11 crn.mteege.de ip
    22665.1: sending to 192.168.47.11/192.168.47.11 crn.mteege.de ip
    ----------------------------
    answer crn.mteege.de 10 sec ip 192.168.47.11

    DNS server and mailserver are on the same machine.

    /mail/lib/rewrite looks like this:

    ....
    \l!(.*) alias \1
    \lmteege\.de!(.*) alias \1
    \l\.mteege\.de!(.*) alias \1
    ....
    # queue all mail for delivery
    ([^!]*)!(.*) | "/mail/lib/qmail '\s' 'net!\1'" "'\2'"

    I can recieve mail for user@crn.mteege.de but not for user@mteege.de.

    The mail bounces with:

    The attached mail from 'crn.mteege.de!mtg'
    to 'mteege.de!mtg'
    failed with error 'possible forward loop'.

    What is wrong with this setup?

    Many thanks
    Matthias

  2. Re: [9fans] possible forward loop on new mailserver

    Matthias Teege wrote:
    > /mail/lib/rewrite looks like this:
    >
    > ...
    > \l!(.*) alias \1
    > \lmteege\.de!(.*) alias \1
    > \l\.mteege\.de!(.*) alias \1
    > ...
    > # queue all mail for delivery
    > ([^!]*)!(.*) | "/mail/lib/qmail '\s' 'net!\1'" "'\2'"
    >
    > I can recieve mail for user@crn.mteege.de but not for user@mteege.de.
    >


    My rewrite looks similar, but subtly different:

    # your local names
    \l!(.*) alias \1
    \l\.tombob\.com!(.*) alias \1
    tombob\.com!(.*) alias \1
    ....
    # queue all mail for delivery
    ([^!]*)!(.*) | "/mail/lib/qmail '\s' 'tcp!\1'" "'\1!\2'"

    If I remember correctly (it's been over five years), I explicitly
    added the "tombob\.com!(.*)" pattern. Also, the qmail invocation in
    my rewrite has a bang (not sure what the significance of that is).

    Robby

    --
    r.raschke@t-o-m-b-o-b.com



  3. Re: [9fans] possible forward loop on new mailserver

    Try

    mail '-#d' crn.mteege.de!mtg

    and see how the addresses are being rewritten. Also watch the tail of
    /sys/log/mail and /sys/log/smtp. I suspect that a plain user name
    like `mtg' is getting rewritten, possibly by upas/aliasmail, into an
    address that causes upas to send the message to mteege.de via smtp and
    this is being caught after 32 iterations.


+ Reply to Thread