From cbc22a2cf3aeba645af6bc9624d124fe3ed771df Mon Sep 17 00:00:00 2001 From: andryyy Date: Sat, 4 Mar 2017 15:05:27 +0100 Subject: [PATCH 1/4] Change maintainer --- data/Dockerfiles/rspamd/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/Dockerfiles/rspamd/Dockerfile b/data/Dockerfiles/rspamd/Dockerfile index bd94f25e9..3503b4a7e 100644 --- a/data/Dockerfiles/rspamd/Dockerfile +++ b/data/Dockerfiles/rspamd/Dockerfile @@ -1,5 +1,5 @@ FROM ubuntu:xenial -MAINTAINER Andre Peters +MAINTAINER Andre Peters ENV DEBIAN_FRONTEND noninteractive ENV LC_ALL C From 047e73e5dfd27b95103b1c0ce67fc06c2d0c8b30 Mon Sep 17 00:00:00 2001 From: andryyy Date: Sat, 4 Mar 2017 15:55:51 +0100 Subject: [PATCH 2/4] Minor intval fix --- data/web/inc/functions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/web/inc/functions.inc.php b/data/web/inc/functions.inc.php index a56a7ca6c..c62421c54 100644 --- a/data/web/inc/functions.inc.php +++ b/data/web/inc/functions.inc.php @@ -3599,7 +3599,7 @@ function mailbox_edit_mailbox($postarray) { ); return false; } - $quota_m = $postarray['quota']; + $quota_m = intval($postarray['quota']); $quota_b = $quota_m*1048576; $username = $postarray['username']; $name = $postarray['name']; From d1decbd31ebcd98890930e1c8d1a03fcdfb2e89a Mon Sep 17 00:00:00 2001 From: andryyy Date: Sat, 4 Mar 2017 23:16:08 +0100 Subject: [PATCH 3/4] Fix goto in sender acl query, show alias by alias domain in fixed addresses within sender acl --- data/web/inc/functions.inc.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/data/web/inc/functions.inc.php b/data/web/inc/functions.inc.php index c62421c54..5ae5196f8 100644 --- a/data/web/inc/functions.inc.php +++ b/data/web/inc/functions.inc.php @@ -4877,12 +4877,23 @@ function mailbox_get_sender_acl_handles($mailbox) { $data['fixed_sender_aliases'] = array(); try { - $stmt = $pdo->prepare("SELECT `address` FROM `alias` WHERE `goto` = :goto AND `address` NOT LIKE '@%'"); - $stmt->execute(array(':goto' => $mailbox)); + // Fixed addresses + $stmt = $pdo->prepare("SELECT `address` FROM `alias` WHERE `goto` LIKE :goto AND `address` NOT LIKE '@%'"); + $stmt->execute(array(':goto' => '%' . $mailbox . '%')); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); while ($row = array_shift($rows)) { $data['fixed_sender_aliases'][] = $row['address']; } + $stmt = $pdo->prepare("SELECT CONCAT(`local_part`, '@', `alias_domain`.`alias_domain`) AS `alias_domain_alias` FROM `mailbox`, `alias_domain` + WHERE `alias_domain`.`target_domain` = `mailbox`.`domain` + AND `mailbox`.`username` = :username"); + $stmt->execute(array(':username' => $mailbox)); + $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); + while ($row = array_shift($rows)) { + if (!empty($row['alias_domain_alias'])) { + $data['fixed_sender_aliases'][] = $row['alias_domain_alias']; + } + } // Return array $data['sender_acl_domains/addresses']['ro'] with read-only objects // Return array $data['sender_acl_domains/addresses']['rw'] with read-write objects (can be deleted) From 2e467ab802ab7b1a1aff2cb34d2cf49ff840c9cd Mon Sep 17 00:00:00 2001 From: andryyy Date: Sat, 4 Mar 2017 23:16:23 +0100 Subject: [PATCH 4/4] Add sender/receiver model --- docs/first_steps.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/docs/first_steps.md b/docs/first_steps.md index 461b0b8cb..a5ed486e2 100644 --- a/docs/first_steps.md +++ b/docs/first_steps.md @@ -133,3 +133,38 @@ server { } ``` +# Sender and receiver model + +When a mailbox is created, a user is allowed to send mail from and receive mail for his own mailbox address. + + Mailbox me@example.org is created. example.org is a primary domain. + Note: a mailbox cannot be created in an alias domain. + + me@example.org is only known as me@example.org. + me@example.org is allowed to send as me@example.org. + +We can add an alias domain for example.org: + + Alias domain alias.com is added and assigned to primary domain example.org. + me@example.org is now known as me@example.org and me@alias.com. + me@example.org is now allowed to send as me@example.org and me@alias.com. + +We can add aliases for a mailbox to receive mail for and to send from this new address. + +It is important to know, that you are not able to receive mail for `my-alias@my-alias-domain.tld`. You would need to create this particular alias. + + me@example.org is assigned the alias alias@example.org + me@example.org is now known as alias@example.org, me@alias.com, alias@example.org + + me@example.org is NOT known as alias@alias.com. + +Administrators and domain administrators can edit mailboxes to allow specific users to send as other mailbox users ("delegate" them). + +You can choose between mailbox users or completely disable the sender check for domains. + +**SOGo "mail from" addresses** + +Mailbox users can, obviously, select their own mailbox address, as well as all alias addresses and aliases that exist through alias domains. + +If you want to select another _existing_ mailbox user as your "mail from" address, this user has to delegate you access through SOGo (see SOGo documentation). Moreover a mailcow (domain) administrator +needs to grant you access as described above. \ No newline at end of file