[ubuntu] Postfix/Amavis "too many hops" issue

Discussion in 'Server Operation' started by JMac87, Jan 26, 2015.

  1. JMac87

    JMac87 New Member

    Ever since adding Amavis/Spamassassin/clamav/postgrey to my postfix server, I'm getting slammed with "Undelivered Mail Returned to Sender".

    554 5.4.0 Error: too many hops (in reply to end of DATA command)
    Our setup: We use Gmail as our external mail handler. Mail goes to Google, if Google doesn't have that address ([email protected]), it then goes to Mailarmory (which is an external spam filtering service), then it goes to our local mailserver (hostname "Blackhole") that holds a ton of aliases which point any [email protected] not on Google to the appropriate place (i.e. [email protected]).

    We're trying to get rid of Mailarmory and let our local mailserver do the filtering. I installed and configured Amavis and all its friends according to this guide: https://help.ubuntu.com/community/PostfixAmavisNew

    Watching the mail.log, mail is coming in and out of the local mail server (Blackhole). Spam is being tagged appropriately, although the filter seems a bit lax at the moment. My biggest problem is the amount of "Undelivered Mail Returned to Sender" messages I'm getting that have the "too many hops" error.

    Mailarmory is still in place at the moment because this is a production environment and we've only deleted a few of the whitelisted addresses at Mailarmory as a test.

    My only theory at the moment is that there is a loop created between the local mail server Blackhole and Mailarmory, but I'm not sure why exactly.

    I've attached my main.cf, master.cf, and an excerpt of mail.log showing what happens when one of these messages gets delivered with the "too many hops" error. If any other info is needed, please let me know.


    Attached Files:

Share This Page