Open mmilitzer opened 6 years ago
Same here. We could really use that feature to decide which user is allowed to use which domains and/or alias domains.
+1 for the possibility to control who can send from an alias address
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.
bump, @andryyy anything on this?
bump again, this would be a great enhancement. Has anyone found a workaround?
Not working on it though. Enotime.
is there any update?
At least for domain-wide config, it should be possible to remove the alias from SOGo if another tinyint(1)
column is added to alias_domain
and the view grouped_domain_alias_address
is modified to look something like this, where it checks if an alias has the send_as property set.
-- mailcow.grouped_domain_alias_address source
CREATE OR REPLACE
ALGORITHM = UNDEFINED VIEW `grouped_domain_alias_address` AS
select
`mailbox`.`username` AS `username`,
ifnull(group_concat(`mailbox`.`local_part`, '@', `alias_domain`.`alias_domain` separator ' '), '') AS `ad_alias`
from
(`mailbox`
left join `alias_domain` on
(`alias_domain`.`target_domain` = `mailbox`.`domain`))
where `alias_domain`.`send_as` = '1'
group by
`mailbox`.`username`;
Additionally, postfix would need to be reconfigured in a few places, like here. I believe if this also checks if the alias domain has the send_as flag, it should allow you to configure if you can send from an alias.
As for per-user config, I'm not sure how that could be accomplished nicely. Perhaps using the sender_acl
table to store overrides for the alias_domain
table being disabled? Then the previous 2 checks I mentioned can additionally check for the given username in sender_acl
, check what domains they have access to and add them to the list.
Currently, when setting up an alias domain, this also automatically adds a new "Allow to send as" email address in the form of user@aliasdomain.tld to each user/mailbox of the main domain (and visible as new sender alias in Sogo).
However, I think there may be often the use case also that not all users should be able to use the alias domain. But creating an individual per-user alias from one domain to another (e.g. x@aliasdomain.tld -> y@maindomain.tld) is only possible when also an alias domain is configured first.
So it seems having a certain domain only available to some users as "Allow to send as" email is only possible when really setting up multiple main domains and then selectively allowing just some users to use the other domain+aliases via delegation in Sogo. Am I right?
It would be nice if there were an additional option while configuring an alias domain that would make the alias domain to not globally apply to all users so that rather only explicitely specified aliases with this domain would then still show up in the "Allow to send as" list only for those users that are the "Goto address" of an alias.