{"action":"created","issue":{"url":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/460","labels_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/460/labels{/name}","comments_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/460/comments","events_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/460/events","html_url":"https://github.com/mail-in-a-box/mailinabox/pull/460","id":91608311,"number":460,"title":"Add support for bidirectional mail alias controls","user":{"login":"dhpiggott","id":6965859,"avatar_url":"https://avatars.githubusercontent.com/u/6965859?v=3","gravatar_id":"","url":"https://api.github.com/users/dhpiggott","html_url":"https://github.com/dhpiggott","followers_url":"https://api.github.com/users/dhpiggott/followers","following_url":"https://api.github.com/users/dhpiggott/following{/other_user}","gists_url":"https://api.github.com/users/dhpiggott/gists{/gist_id}","starred_url":"https://api.github.com/users/dhpiggott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhpiggott/subscriptions","organizations_url":"https://api.github.com/users/dhpiggott/orgs","repos_url":"https://api.github.com/users/dhpiggott/repos","events_url":"https://api.github.com/users/dhpiggott/events{/privacy}","received_events_url":"https://api.github.com/users/dhpiggott/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":29,"created_at":"2015-06-28T15:15:15Z","updated_at":"2015-08-17T13:25:06Z","closed_at":"2015-08-14T23:10:22Z","pull_request":{"url":"https://api.github.com/repos/mail-in-a-box/mailinabox/pulls/460","html_url":"https://github.com/mail-in-a-box/mailinabox/pull/460","diff_url":"https://github.com/mail-in-a-box/mailinabox/pull/460.diff","patch_url":"https://github.com/mail-in-a-box/mailinabox/pull/460.patch"},"body":"This is an extension of #427. Building on that change it adds support in the\r\naliases table for flagging aliases as:\r\n 1. Applicable to inbound and outbound mail.\r\n 2. Applicable to inbound mail only.\r\n 3. Applicable to outbound mail only.\r\n 4. Disabled.\r\n\r\nThe aliases UI is also updated to allow administrators to set the direction of\r\neach alias.\r\n\r\nUsing this extra information, the sqlite queries executed by Postfix are\r\nupdated so only the relevant alias types are checked.\r\n\r\nThe goal and result of this change is that outbound-only catch-all aliases can\r\nnow be defined (in fact catch-all aliases of any type can be defined).\r\n\r\nThis allow us to continue supporting relaying as described at\r\nhttps://mailinabox.email/advanced-configuration.html#relay\r\nwithout requiring that administrators either create regular aliases for each\r\noutbound *relay* address, or that they create a catch-all alias and then face a\r\nflood of spam.\r\n\r\nI have tested the code as it is in this commit and fixed every issue I found,\r\nso in that regard the change is complete. However I see room for improvement\r\nin terms of updating terminology to make the UI etc. easier to understand.\r\nI'll make those changes as subsequent commits so that this tested checkpoint is\r\nnot lost, but also so they can be rejected independently of the actual change\r\nif not wanted.\r\n\r\nAs per my comment on #427 I don't mean for this PR to be an actual pull *request* yet, because of those terminology changes I intend to make. But I wanted to open it now as an invitation for questions/comments on what I have done.\r\n\r\nAnother note to self: http://www.unicode.org/charts/PDF/U2190.pdf might be useful if you want to find better arrows for the UI."},"comment":{"url":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/comments/131817601","html_url":"https://github.com/mail-in-a-box/mailinabox/pull/460#issuecomment-131817601","issue_url":"https://api.github.com/repos/mail-in-a-box/mailinabox/issues/460","id":131817601,"user":{"login":"dhpiggott","id":6965859,"avatar_url":"https://avatars.githubusercontent.com/u/6965859?v=3","gravatar_id":"","url":"https://api.github.com/users/dhpiggott","html_url":"https://github.com/dhpiggott","followers_url":"https://api.github.com/users/dhpiggott/followers","following_url":"https://api.github.com/users/dhpiggott/following{/other_user}","gists_url":"https://api.github.com/users/dhpiggott/gists{/gist_id}","starred_url":"https://api.github.com/users/dhpiggott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhpiggott/subscriptions","organizations_url":"https://api.github.com/users/dhpiggott/orgs","repos_url":"https://api.github.com/users/dhpiggott/repos","events_url":"https://api.github.com/users/dhpiggott/events{/privacy}","received_events_url":"https://api.github.com/users/dhpiggott/received_events","type":"User","site_admin":false},"created_at":"2015-08-17T13:25:06Z","updated_at":"2015-08-17T13:25:06Z","body":">I think that's a little counter-intuitive for empty-string. If any empty-string is going to be meaningful, it should probably mean \"no recipients\".\r\n\r\nThat's what I was proposing - that we make null mean \"same as recipients\", and make empty-string mean \"no logins are permitted to send\". I agree that the other way around would be counter-intuitive.\r\n\r\n>I think the solution is just to repeat the permitted senders, and I think this actually makes sense because it's parallel to the way catch-alls handle outbound mail.\r\n\r\nDid actually you mean to say \"parallel to the way catch-alls handle ~~out~~ inbound mail\"? Presuming so: I'd not recognised that. I'm all in favour of consistency.\r\n\r\n>And adding a third option to the control panel (or explaining what \"empty-string\" means) would make things more confusing.\r\n\r\nYep, I wasn't proposing a third option, nor even explaining what empty string means - just changing the behaviour - without any change in the UI appearance, because I feel that the string \"I’ll enter the mail users that can send mail claiming to be from the alias address.\" implies that empty-string forbids any logins from sending, and yet that's not what it does.\r\n\r\nGiven the relatively small number of aliases I have it is just easier to continue with adding permitted-senders to the non-catch-all inbound aliases, so I'll do that.\r\n\r\nHowever, could you instead think about changing the \"I’ll enter the mail users that can send mail claiming to be from the alias address.\" string so it confirms that empty-string does not mean no-permitted-senders?"}}