{"action":"created","issue":{"url":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/713","repository_url":"https://api.github.com/repos/mail-in-a-box/mailinabox","labels_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/713/labels{/name}","comments_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/713/comments","events_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/713/events","html_url":"https://github.com/mail-in-a-box/mailinabox/issues/713","id":133824564,"number":713,"title":"Error: too many hops (in reply to end of DATA command)","user":{"login":"pryley","id":134939,"avatar_url":"https://avatars.githubusercontent.com/u/134939?v=3","gravatar_id":"","url":"https://api.github.com/users/pryley","html_url":"https://github.com/pryley","followers_url":"https://api.github.com/users/pryley/followers","following_url":"https://api.github.com/users/pryley/following{/other_user}","gists_url":"https://api.github.com/users/pryley/gists{/gist_id}","starred_url":"https://api.github.com/users/pryley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pryley/subscriptions","organizations_url":"https://api.github.com/users/pryley/orgs","repos_url":"https://api.github.com/users/pryley/repos","events_url":"https://api.github.com/users/pryley/events{/privacy}","received_events_url":"https://api.github.com/users/pryley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-15T21:45:46Z","updated_at":"2016-02-15T23:49:52Z","closed_at":null,"body":"I was getting undelivered mail with the error: `Error: too many hops (in reply to end of DATA command)\r\n`\r\n\r\nI tracked down the error to the postfix `mydestination` config (`/etc/postfix/main.cf`). For some reason the line had been commented out and replaced with `mydestination = localhost`\r\n\r\n```\r\n#mydestination = mymailserver.com, localhost.com, , localhost\r\nmydestination = localhost\r\n```\r\n\r\nI fixed it by changing it to:\r\n\r\n```\r\nmydestination = $myhostname, localhost.$mydomain, localhost\r\n```\r\n\r\nI have no idea if/why it changed and I only just started getting reports of the undeliverable mail from a user today. Maybe this will help someone else.\r\n"},"comment":{"url":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/comments/184444260","html_url":"https://github.com/mail-in-a-box/mailinabox/issues/713#issuecomment-184444260","issue_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/713","id":184444260,"user":{"login":"pryley","id":134939,"avatar_url":"https://avatars.githubusercontent.com/u/134939?v=3","gravatar_id":"","url":"https://api.github.com/users/pryley","html_url":"https://github.com/pryley","followers_url":"https://api.github.com/users/pryley/followers","following_url":"https://api.github.com/users/pryley/following{/other_user}","gists_url":"https://api.github.com/users/pryley/gists{/gist_id}","starred_url":"https://api.github.com/users/pryley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pryley/subscriptions","organizations_url":"https://api.github.com/users/pryley/orgs","repos_url":"https://api.github.com/users/pryley/repos","events_url":"https://api.github.com/users/pryley/events{/privacy}","received_events_url":"https://api.github.com/users/pryley/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T23:49:52Z","updated_at":"2016-02-15T23:49:52Z","body":"Ok well since you said it was correct, I've changed the postfix setting back to \r\n`mydestination = localhost`.\r\n\r\n---\r\n\r\nSo the original problem was this:\r\n\r\n```\r\nThis is the mail system at host spam.flamble.it.\r\n\r\nI'm sorry to have to inform you that your message could not\r\nbe delivered to one or more recipients. It's attached below.\r\n\r\nFor further assistance, please send mail to postmaster.\r\n\r\nIf you do so, please include this problem report. You can\r\ndelete your own text from the attached returned message.\r\n\r\n                  The mail system\r\n\r\n<xxxx@vonschenk.me.uk>: host fcis.flamble.co.uk[185.66.112.46] said: 554 5.4.0\r\n   Error: too many hops (in reply to end of DATA command)\r\nReporting-MTA: dns; spam.flamble.it\r\nX-Postfix-Queue-ID: F2C8AFEE0B\r\nX-Postfix-Sender: rfc822; xxxx@xxxxxxx.com\r\nArrival-Date: Mon, 15 Feb 2016 19:53:14 +0000 (GMT)\r\n...\r\n```\r\n\r\n\r\nI got the fix from http://serverfault.com/questions/651974/postfix-too-many-hops-bounce-back#651977. After changing it and restarting the mail server, it seemed to work ok as the email was sent with no bouce-back...but a while later I got the following email.\r\n\r\n```\r\nThis is the mail system at host spam.flamble.it.\r\n\r\n####################################################################\r\n# THIS IS A WARNING ONLY.  YOU DO NOT NEED TO RESEND YOUR MESSAGE. #\r\n####################################################################\r\n\r\nYour message could not be delivered for more than 1 hour(s).\r\nIt will be retried until it is 3 day(s) old.\r\n\r\nFor further assistance, please send mail to postmaster.\r\n\r\nIf you do so, please include this problem report. You can\r\ndelete your own text from the attached returned message.\r\n\r\n                  The mail system\r\n\r\n<xxxx@vonschenk.me.uk>: connect to fcis.flamble.co.uk[185.66.112.46]:25:\r\n   Connection refused\r\nReporting-MTA: dns; spam.flamble.it\r\nX-Postfix-Queue-ID: 15397FEDC3\r\nX-Postfix-Sender: rfc822; xxxx@xxxxxxx.com\r\nArrival-Date: Mon, 15 Feb 2016 20:36:55 +0000 (GMT)\r\n\r\nFinal-Recipient: rfc822; xxxx@vonschenk.me.uk\r\nOriginal-Recipient: rfc822;xxxx@vonschenk.me.uk\r\nAction: delayed\r\nStatus: 4.4.1\r\nDiagnostic-Code: X-Postfix; connect to fcis.flamble.co.uk[185.66.112.46]:25:\r\n   Connection refused\r\nWill-Retry-Until: Thu, 18 Feb 2016 20:36:55 +0000 (GMT)\r\nReturn-Path: <xxxx@xxxxxxx.com>\r\nReceived: from spam.flamble.it (localhost [127.0.0.1])\r\n by spam.flamble.it (Postfix) with ESMTP id 15397FEDC3\r\n for <xxxx@vonschenk.me.uk>; Mon, 15 Feb 2016 20:36:55 +0000 (GMT)\r\nX-Virus-Scanned: by SpamTitan at flamble.it\r\nX-Spam-Flag: NO\r\nX-Spam-Score: -2.1\r\nX-Spam-Level:\r\nX-Spam-Status: No, score=-2.1 tagged_above=-999 required=5\r\n tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,\r\n DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001,\r\n ST_P0F_Linux=-0.1] autolearn=ham\r\nAuthentication-Results: spam.flamble.it (amavisd-new);\r\n dkim=pass (2048-bit key) header.d=xxxxxxx.com\r\nReceived: from spam.flamble.it (localhost [127.0.0.1])\r\n by spam.flamble.it (Postfix) with ESMTP id 14D81FECEE\r\n for <xxxx@vonschenk.me.uk>; Mon, 15 Feb 2016 20:36:51 +0000 (GMT)\r\nReceived: from [IPv6:2605:e000:6141:7f00:f08e:324f:23b1:add4] (unknown [IPv6:2605:e000:6141:7f00:f08e:324f:23b1:add4])\r\n (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))\r\n (No client certificate requested)\r\n by geminimail.io (Postfix) with ESMTPSA id A6D2C14012A;\r\n Mon, 15 Feb 2016 16:12:29 -0500 (EST)\r\nAuthentication-Results: geminimail.io; dmarc=fail header.from=xxxxxxx.com\r\nDKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=xxxxxxx.com;\r\n s=mail; t=1455570750;\r\n bh=Zm1exuixs/HNf8t3iADznzubdBTUCTqRgB6nMOymoHo=;\r\n h=Subject:From:In-Reply-To:Date:Cc:References:To:From;\r\n b=ZDkpRkBIfzIjcb5RN9JaVa3TEMFRgxhuWW06KIQEBR9YH201C3KIok/ZvsYKaS8/i\r\n  5TmELJXIdYlzlvQ6mEwCtFibks2LY82DHi64G6fV66MZzSAra5VEQsZIMfeGy+62Vs\r\n  66nZfCckjyCW6Fs6yMH6LiP/hlX/E7UNjH/wUum+equBSb65+ZRMAUbp2hwX1uUL7Z\r\n  8kyRuPYX4djmfbqXLfEtnWAX7ME2ImJBCLfF9XSi5Siv8fSHUSbgF0EJp6W+CvrP/k\r\n  IPQ2KPJejXyjgTOZHv9RUQ0KUqG3BvlyBEqCNGEVjRMemRlJEvSjKQfK2PMpU5neNo\r\n  4DEnaBskMwgiw==\r\n```\r\n\r\nI used http://dkimvalidator.com/ to verify the DKIM and SPF settings and both pass.\r\n\r\nHere is the SpamAssassin Score:\r\n\r\n```\r\nSpamAssassin Score: 0.111\r\nMessage is NOT marked as spam\r\nPoints breakdown: \r\n 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was blocked.\r\n                            See\r\n                            http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block\r\n                             for more information.\r\n                            [URIs: xxxxxxx.com]\r\n-0.0 SPF_HELO_PASS          SPF: HELO matches SPF record\r\n 0.0 HTML_MESSAGE           BODY: HTML included in message\r\n 0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily valid\r\n 0.0 T_DKIM_INVALID         DKIM-Signature header exists but is not valid\r\n```\r\n\r\nSo I'm not sure if the problem is with my mail server, or the recipient.\r\n\r\n"}}