1

Topic: SOGo Shared Mailbox by adding IMAP Account

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.2 MARIADB edition.
- Deployed with iRedMail Easy or the downloadable installer? installer
- Linux/BSD distribution name and version: Debian 11
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I am migrating from mailcow because it is very unstable and currently is completely broken for me. Since the iRedMail websites states multiple times that they are very stable and secure, I am currently in the process of setting up a iRedMail server using the installer. I like iRedMail very much so far, however I ran into a slight problem using SOGo. In mailcow I was able to add a new IMAP Account using the SOGo gui, which allowed me to have multiple inboxes using the same login/ui. However, the 'NEW MAIL ACCOUNT' button in sogo mail settings is missing.

TL;DR How can I add an additional IMAP account to a SOGo user?

This is a requirement in order to easily manage multiple inboxes, for example a shared office inbox. I realize that aliases are a iRedMail Pro feature, however, since it wouldn't be an alias, but just using all the features of SOGo mail, I would appreciate this feature being made available without a Pro license.

P.S.: Some installer side notes. The 'dialog' packages wasn't installed, and I had to manually apt-get it before continuing with the iRedMail installer. After the installer has finished, the user should be instructed to restart the server, since nginx wasn't reloaded, only port 80 was listening (not 443). Furthermore, after manually restarting nginx I got 503 error accessing /iredadmin/.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2 (edited by Toby4213 2022-12-04 21:50:02)

Re: SOGo Shared Mailbox by adding IMAP Account

I found a solution to my problem, apparently mailcow changes some things from the default sogo config. In the file `/etc/sogo/sogo.conf` you have to change the option `SOGoMailAuxiliaryUserAccountsEnabled` to `YES`. Now I am able to add additional imap accounts.
However, the sogo.conf file has read only permissions, why is that?

Also, by default I am unable to send emails for other IMAP Accounts added via SOGO. I have to add the email of the sogo user to the ALLOWED_LOGIN_MISMATCH_SENDERS array in `/opt/iredapd/settings.py`. Is there a way to strictly define what mismatch is allowed. For example only the imap user myusername@example.com is allowed to also send mails for IMAP Account office@example.com (other than the office@example.com user).

3 (edited by Cthulhu 2022-12-05 14:13:12)

Re: SOGo Shared Mailbox by adding IMAP Account

You can create an mail alias, i guess sending as an mail alias doesn't trigger the mismatch

https://docs.iredmail.org/sql.create.mail.alias.html

4

Re: SOGo Shared Mailbox by adding IMAP Account

Cthulhu wrote:

You can create an mail alias, i guess sending as an mail alias doesn't trigger the mismatch

https://docs.iredmail.org/sql.create.mail.alias.html

You can update it and force to save as root user.

Toby4213 wrote:

Also, by default I am unable to send emails for other IMAP Accounts added via SOGO. I have to add the email of the sogo user to the ALLOWED_LOGIN_MISMATCH_SENDERS array in `/opt/iredapd/settings.py`. Is there a way to strictly define what mismatch is allowed. For example only the imap user myusername@example.com is allowed to also send mails for IMAP Account office@example.com (other than the office@example.com user).

FYI https://docs.iredmail.org/errors.html#r … e-username

5 (edited by Toby4213 2022-12-06 20:17:49)

Re: SOGo Shared Mailbox by adding IMAP Account

I was able to add the office inbox to my personal account in iRedMail SOGo and see that inbox and send mails from it. Sending mails worked after adding my personal email to ALLOWED_LOGIN_MISMATCH_SENDERS. However, every time I added a second identity to the office imap account (using my private sogo email to login) the E-Mail Folders in sogo would disappear. Now even with only the default office identity no mail folders show up (see attachment). Do you know how this can be fixed? I looked through all sogo settings but didn't find anything.
( set SOGoMailCustomFromEnabled to yes to enable adding identities for aliases, but that didn't change my problem above).

I understand if this is out of scope for this forum, but I am hoping you can help me. I don't know of any other webmail client that is able to show multiple IMAP accounts in one UI. If this doesn't work, I am going to use desktop clients instead. I prefer web clients since I would be able to login from everywhere and have all my email accounts using one login.

ZhangHuangbin wrote:

FYI ...URL...(I'm not allowed to post url's)

Yes I am aware of this, I mentioned this in my first post, but by adding an email to the ALLOWED_LOGIN_MISMATCH_SENDERS array, that IMAP user is allowed to send email using any address. I would like something more secure, where you specifically allow an IMAP account to send from a select group of addresses. For example in python using a dictionary:
{
  "myusername@example.com": [ "office@example.com", "support@example.com" ]
}
In this example myusername would be allowed to send from IMAP user office and support.

To clarify, I do not want to use an alias, since multiple people should be able to access office.

Post's attachments

sogo_imap_account.png 21.69 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

6

Re: SOGo Shared Mailbox by adding IMAP Account

Toby4213 wrote:

However, every time I added a second identity to the office imap account (using my private sogo email to login) the E-Mail Folders in sogo would disappear. Now even with only the default office identity no mail folders show up (see attachment).

Any error in /var/log/dovecot/*.log (especially imap.log)?

if no error in Dovecot log file, then it's more like a SOGo issue to me, better ask help in SOGo mailing list or bug report: https://www.sogo.nu/support.html