{"action":"created","issue":{"url":"https://api.github.com/repos/vexim/vexim2/issues/203","repository_url":"https://api.github.com/repos/vexim/vexim2","labels_url":"https://api.github.com/repos/vexim/vexim2/issues/203/labels{/name}","comments_url":"https://api.github.com/repos/vexim/vexim2/issues/203/comments","events_url":"https://api.github.com/repos/vexim/vexim2/issues/203/events","html_url":"https://github.com/vexim/vexim2/pull/203","id":172061858,"number":203,"title":"Do not add spam headers during ACL phase so we don't have to remove them later","user":{"login":"rimas-kudelis","id":2812673,"avatar_url":"https://avatars.githubusercontent.com/u/2812673?v=3","gravatar_id":"","url":"https://api.github.com/users/rimas-kudelis","html_url":"https://github.com/rimas-kudelis","followers_url":"https://api.github.com/users/rimas-kudelis/followers","following_url":"https://api.github.com/users/rimas-kudelis/following{/other_user}","gists_url":"https://api.github.com/users/rimas-kudelis/gists{/gist_id}","starred_url":"https://api.github.com/users/rimas-kudelis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rimas-kudelis/subscriptions","organizations_url":"https://api.github.com/users/rimas-kudelis/orgs","repos_url":"https://api.github.com/users/rimas-kudelis/repos","events_url":"https://api.github.com/users/rimas-kudelis/events{/privacy}","received_events_url":"https://api.github.com/users/rimas-kudelis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/vexim/vexim2/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/vexim/vexim2/milestones/3","html_url":"https://github.com/vexim/vexim2/milestones/Version%202.3.1","labels_url":"https://api.github.com/repos/vexim/vexim2/milestones/3/labels","id":1765655,"number":3,"title":"Version 2.3.1","description":null,"creator":{"login":"Udera","id":6325524,"avatar_url":"https://avatars.githubusercontent.com/u/6325524?v=3","gravatar_id":"","url":"https://api.github.com/users/Udera","html_url":"https://github.com/Udera","followers_url":"https://api.github.com/users/Udera/followers","following_url":"https://api.github.com/users/Udera/following{/other_user}","gists_url":"https://api.github.com/users/Udera/gists{/gist_id}","starred_url":"https://api.github.com/users/Udera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Udera/subscriptions","organizations_url":"https://api.github.com/users/Udera/orgs","repos_url":"https://api.github.com/users/Udera/repos","events_url":"https://api.github.com/users/Udera/events{/privacy}","received_events_url":"https://api.github.com/users/Udera/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":6,"state":"open","created_at":"2016-05-13T21:11:00Z","updated_at":"2016-08-26T11:19:53Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2016-08-19T06:13:16Z","updated_at":"2016-08-29T07:52:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/vexim/vexim2/pulls/203","html_url":"https://github.com/vexim/vexim2/pull/203","diff_url":"https://github.com/vexim/vexim2/pull/203.diff","patch_url":"https://github.com/vexim/vexim2/pull/203.patch"},"body":"Instead, persist `$spam_*` variables as `$acl_m_spam_*` (except `$spam_score_int`, which persists by itself), and use these variables to add headers at delivery time.\r\nThis will add `X-Spam-Score`, `X-Spam-Score-Int` and `X-Spam-Bar` headers regardless of whether or not the message is spam, but this can be easily changed.\r\n\r\nComments welcome."},"comment":{"url":"https://api.github.com/repos/vexim/vexim2/issues/comments/243056298","html_url":"https://github.com/vexim/vexim2/pull/203#issuecomment-243056298","issue_url":"https://api.github.com/repos/vexim/vexim2/issues/203","id":243056298,"user":{"login":"rimas-kudelis","id":2812673,"avatar_url":"https://avatars.githubusercontent.com/u/2812673?v=3","gravatar_id":"","url":"https://api.github.com/users/rimas-kudelis","html_url":"https://github.com/rimas-kudelis","followers_url":"https://api.github.com/users/rimas-kudelis/followers","following_url":"https://api.github.com/users/rimas-kudelis/following{/other_user}","gists_url":"https://api.github.com/users/rimas-kudelis/gists{/gist_id}","starred_url":"https://api.github.com/users/rimas-kudelis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rimas-kudelis/subscriptions","organizations_url":"https://api.github.com/users/rimas-kudelis/orgs","repos_url":"https://api.github.com/users/rimas-kudelis/repos","events_url":"https://api.github.com/users/rimas-kudelis/events{/privacy}","received_events_url":"https://api.github.com/users/rimas-kudelis/received_events","type":"User","site_admin":false},"created_at":"2016-08-29T07:52:23Z","updated_at":"2016-08-29T07:52:23Z","body":"SpamAssassin threshold of 5 is just a default setting as well. Since our virtual users may have different tag and refuse numbers, and Exim cannot pass any of that information to SpamAssassin, we get to ignore whether or not SA thinks an email is actually spam, and instead have to rely on just the score. So it is quite possible to have `X-Spam-Flag: YES` in combination with `X-Spam-Report: No...` or vice-versa with Vexim, due to the way SA protocol currently works.\r\n\r\nAbout the way things should work with regard to our settings: until moving to Spam folder was introduced, it was easy: `score > sa_refuse`  -> mail was disarded, `score > sa_tag`  -> mail was marked by adding `X-Spam-*` headers. Now the situation is different, and indeed it's not so self-evident anymore. Maybe we should rethink our strategy. One of the options that comes to mind is dropping `sa_refuse` for good, and instead using `sa_tag` as a threshold of delivering the message into the Spam folder. We could also have a boolean setting which would control whether or not `X-Spam-*` headers must be added to all messages. The UI could look somewhat like this:\r\n\r\n```\r\nMark as Spam score                    [________]\r\n   Messages scoring the amount of points specified above or more will be delivered \r\n   to the user's Spam folder.\r\n   NOTE: regardless of this setting, the server will refuse delivery of messages\r\n   scoring 15 or more points.\r\n\r\nPut Spam info headers in all messages [_]\r\n   If checked, X-Spam-Score and other related headers will be present in all messages\r\n   delivered locally. Otherwise, most of these headers will only be present in messages\r\n   considered as spam according to the setting above.\r\n```\r\n\r\nAll of this doesn't block this PR though, so I suggest we take this part of discussion elsewhere"}}
{"actor":{"display_login":"rimas-kudelis"}}