{"action":"created","issue":{"url":"https://api.github.com/repos/gogits/gogs/issues/973","labels_url":"https://api.github.com/repos/gogits/gogs/issues/973/labels{/name}","comments_url":"https://api.github.com/repos/gogits/gogs/issues/973/comments","events_url":"https://api.github.com/repos/gogits/gogs/issues/973/events","html_url":"https://github.com/gogits/gogs/pull/973","id":58177381,"number":973,"title":"Fix: 504 5.5.2 <localhost>: Helo command rejected","user":{"login":"uchti","id":5838665,"avatar_url":"https://avatars.githubusercontent.com/u/5838665?v=3","gravatar_id":"","url":"https://api.github.com/users/uchti","html_url":"https://github.com/uchti","followers_url":"https://api.github.com/users/uchti/followers","following_url":"https://api.github.com/users/uchti/following{/other_user}","gists_url":"https://api.github.com/users/uchti/gists{/gist_id}","starred_url":"https://api.github.com/users/uchti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uchti/subscriptions","organizations_url":"https://api.github.com/users/uchti/orgs","repos_url":"https://api.github.com/users/uchti/repos","events_url":"https://api.github.com/users/uchti/events{/privacy}","received_events_url":"https://api.github.com/users/uchti/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-02-19T07:50:42Z","updated_at":"2015-02-19T10:08:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/gogits/gogs/pulls/973","html_url":"https://github.com/gogits/gogs/pull/973","diff_url":"https://github.com/gogits/gogs/pull/973.diff","patch_url":"https://github.com/gogits/gogs/pull/973.patch"},"body":"Fix: 504 5.5.2 <localhost>: Helo command rejected"},"comment":{"url":"https://api.github.com/repos/gogits/gogs/issues/comments/75026484","html_url":"https://github.com/gogits/gogs/pull/973#issuecomment-75026484","issue_url":"https://api.github.com/repos/gogits/gogs/issues/973","id":75026484,"user":{"login":"phsmit","id":202014,"avatar_url":"https://avatars.githubusercontent.com/u/202014?v=3","gravatar_id":"","url":"https://api.github.com/users/phsmit","html_url":"https://github.com/phsmit","followers_url":"https://api.github.com/users/phsmit/followers","following_url":"https://api.github.com/users/phsmit/following{/other_user}","gists_url":"https://api.github.com/users/phsmit/gists{/gist_id}","starred_url":"https://api.github.com/users/phsmit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phsmit/subscriptions","organizations_url":"https://api.github.com/users/phsmit/orgs","repos_url":"https://api.github.com/users/phsmit/repos","events_url":"https://api.github.com/users/phsmit/events{/privacy}","received_events_url":"https://api.github.com/users/phsmit/received_events","type":"User","site_admin":false},"created_at":"2015-02-19T10:08:54Z","updated_at":"2015-02-19T10:08:54Z","body":"Sorry, but those headers don't say a thing. github-smtp2b-ext-cp1-prd.iad.github.net is an MTA, but it does not mean that is the host where the message was originally created. \r\n\r\nLet's shorten the hostname to smtp.github.net and say that you have gmail. Now:\r\n    \r\n    dig MX gmail-smtp-in.l.google.com.\r\n    ;; ANSWER SECTION:\r\n    gmail.com.\t\t1872\tIN\tMX\t5 gmail-smtp-in.l.google.com.\r\n\r\nSo it probably went like this:\r\nGithub server (which one, no one knows) -> smtp.github.net -> gmail-smtp-in.l.google.com.\r\n\r\nNote that there are 2 arrows here. The first arrow could be any protocol, but let's assume it is smtp. In this case smtp.github.net is the outgoing smtp server (aka smtp relay) and gmail-smtp-in.l.google.com. is the incoming smtp server. The header you showed is about the second connection, from smtp.github.net to the incoming mail server. This is the MTA to MTA connection that your document was talking about. And yes, the ehlo hostname is very important there.\r\n\r\nIn the case of gogs though, we are talking about the first connection, which is from a smtp client to a mta. In this connection the ehlo hostname is actually not so important and I believe in the real world there are very little outgoing smtp servers that do require the hostname to be correct. That is exactly the reason why go just uses localhost for its connections: its not important in this case. Almost any smtp mailer library you will find in the wild has this behavior. The real world is no RFC :("}}