{"action":"created","issue":{"url":"https://api.github.com/repos/rspamd/rspamd/issues/2143","repository_url":"https://api.github.com/repos/rspamd/rspamd","labels_url":"https://api.github.com/repos/rspamd/rspamd/issues/2143/labels{/name}","comments_url":"https://api.github.com/repos/rspamd/rspamd/issues/2143/comments","events_url":"https://api.github.com/repos/rspamd/rspamd/issues/2143/events","html_url":"https://github.com/rspamd/rspamd/issues/2143","id":310957384,"node_id":"MDU6SXNzdWUzMTA5NTczODQ=","number":2143,"title":"Add more information on artificial received header in milter mode.","user":{"login":"bjoe2k4","id":1668390,"node_id":"MDQ6VXNlcjE2NjgzOTA=","avatar_url":"https://avatars2.githubusercontent.com/u/1668390?v=4","gravatar_id":"","url":"https://api.github.com/users/bjoe2k4","html_url":"https://github.com/bjoe2k4","followers_url":"https://api.github.com/users/bjoe2k4/followers","following_url":"https://api.github.com/users/bjoe2k4/following{/other_user}","gists_url":"https://api.github.com/users/bjoe2k4/gists{/gist_id}","starred_url":"https://api.github.com/users/bjoe2k4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjoe2k4/subscriptions","organizations_url":"https://api.github.com/users/bjoe2k4/orgs","repos_url":"https://api.github.com/users/bjoe2k4/repos","events_url":"https://api.github.com/users/bjoe2k4/events{/privacy}","received_events_url":"https://api.github.com/users/bjoe2k4/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-03T18:58:58Z","updated_at":"2019-03-25T19:40:26Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Classification (Please choose *one* option):\r\n\r\n* [ ] Crash/Hang/Data loss\r\n* [ ] WebUI/Usability\r\n* [ ] Serious bug\r\n* [ ] Other bug\r\n* [ ] Feature\r\n* [x] Enhancement\r\n\r\n### Additional information:\r\nAs far as i understand, when accepting mail via milter, the last header added by the MTA, which is typically a `Received` header, is not visible to the milter due to sendmail compatibility. Therefore an artificial received header is constructed.\r\n\r\nFirst problem: if there is no previous `Received` header present, the artificial received header is not inserted, i.e. `task:get_received_headers()` results in `{}`.\r\n\r\nSecond problem: when inspecting this artificial header for example via `local received = task:get_received_headers()`, then the flags seem to be always:\r\n```\r\nreceived:\r\n[1] = {\r\n...\r\n   [flags] = {\r\n    [authenticated] = false,\r\n    [ssl] = false,\r\n    [artificial] = true\r\n   }\r\n...\r\n```\r\nAt least `[ssl] = false` should be fixed by inspecting available milter macros. I think this is what is causing https://github.com/vstakhov/rspamd/issues/1587 and the fix provided (https://github.com/vstakhov/rspamd/commit/f8e570d1c3f934c044bcd7a594a941d088ba525f) is not working, since ~~there is no `received[1].by`~~ nor would it be 'localhost' in the majority of cases. Also `[authenticated]` could be easily populated with the correct value since rspamd is already inspecting the according milter macro in many places.\r\n\r\nThird problem: there is no `[for]` element in the table of the artificial received header, although this information is readily available.\r\n"},"comment":{"url":"https://api.github.com/repos/rspamd/rspamd/issues/comments/476347910","html_url":"https://github.com/rspamd/rspamd/issues/2143#issuecomment-476347910","issue_url":"https://api.github.com/repos/rspamd/rspamd/issues/2143","id":476347910,"node_id":"MDEyOklzc3VlQ29tbWVudDQ3NjM0NzkxMA==","user":{"login":"stale[bot]","id":26384082,"node_id":"MDM6Qm90MjYzODQwODI=","avatar_url":"https://avatars3.githubusercontent.com/in/1724?v=4","gravatar_id":"","url":"https://api.github.com/users/stale%5Bbot%5D","html_url":"https://github.com/apps/stale","followers_url":"https://api.github.com/users/stale%5Bbot%5D/followers","following_url":"https://api.github.com/users/stale%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/stale%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/stale%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stale%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/stale%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/stale%5Bbot%5D/repos","events_url":"https://api.github.com/users/stale%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/stale%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2019-03-25T19:40:26Z","updated_at":"2019-03-25T19:40:26Z","author_association":"NONE","body":"This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.\n"}}
{"actor":{"display_login":"stale"}}