1

Topic: iRedMail-0.9.8

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): iRedMail-0.9.8 (free version)
- Linux/BSD distribution name and version: Ubuntu server 18.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- 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.
====

Hi,
I’m using iRedMail-0.9.8 latest free version on Ubuntu 18.04 machine with mysql data base configuration. Free version doesn’t support by default email aliases, although manually I managed to create/import aliases and map to email/inbox in mysql database. All the emails send to aliases and coming to the users inbox.
I was wondering/asking for support if I can get email aliases drop down menu for composing new message. So the sender (from) email address can be chosen between email or aliases.

Post's attachments

7970D1D7-601F-4910-AB6F-1337672A0CF2.jpeg 144.49 kb, 3 downloads since 2018-10-09 

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

----

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

2

Re: iRedMail-0.9.8

I didn't try it before, but i think it's possible by adding new SQL-based address book in SOGo to query SQL table "vmail.alias".

3

Re: iRedMail-0.9.8

ZhangHuangbin wrote:

I didn't try it before, but i think it's possible by adding new SQL-based address book in SOGo to query SQL table "vmail.alias".

Do you have any documentation on the query or table scheme.
I tried to add to SOGo database "users" table multiple entries for the same user or multiple email addresses in email field separated with comma or comma delimited. It doesn't work.
The SOGo "users" tables is created a view of vmail.mailbox tables
https://docs.iredmail.org/sogo-centos-6-mysql.html
https://sogo.nu/files/docs/v2/SOGoInstallationGuide.pdf

This is what I found on internet, but still I not managed to list multiple sender addresses in SOGo

4

Re: iRedMail-0.9.8

Try this sample config snippet:
https://bitbucket.org/zhb/iredmail/comm … /sogo.conf

5

Re: iRedMail-0.9.8

ZhangHuangbin wrote:

Try this sample config snippet:
https://bitbucket.org/zhb/iredmail/comm … /sogo.conf


Thanks man, that is helpful.
Based on your provided documentation this is the DB:sogo Table:aliases.
I can't the "aliases" table scheme documentation. Could you please share the required fields (names).

e.g. users:
+------------+--------------+------+-----+---------+-------+
| Field      | Type         | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+-------+
| c_uid      | varchar(255) | NO   |     |         |       |
| c_name     | varchar(255) | NO   |     |         |       |
| c_password | varchar(255) | NO   |     |         |       |
| c_cn       | varchar(255) | NO   |     |         |       |
| mail       | varchar(255) | NO   |     |         |       |
| domain     | varchar(255) | NO   |     |         |       |
+------------+--------------+------+-----+---------+-------+
CREATE VIEW sogo.users (c_uid, c_name, c_password, c_cn, mail, domain) AS SELECT username, username, password, name, username, domain FROM vmail.mailbox WHERE enablesogo=1 AND active=1;

6

Re: iRedMail-0.9.8

Try this:

CREATE VIEW sogo.aliases (c_uid, c_name, c_password, c_cn, mail, domain) AS SELECT address, name, '', name, address, domain FROM vmail.alias WHERE active=1;

7

Re: iRedMail-0.9.8

ZhangHuangbin wrote:

Try this:

CREATE VIEW sogo.aliases (c_uid, c_name, c_password, c_cn, mail, domain) AS SELECT address, name, '', name, address, domain FROM vmail.alias WHERE active=1;


Hi,

Thanks for support but this option is totally different from what I'm looking.
It will give aliases (address book) additionally from Global Address Book.

What I'm looking is sender email address + assigned aliases.
this is related to MailFieldNames.
Originally it configured: "MailFieldNames = (mail);"
what I'm looking for is something like this:  "MailFieldNames = (mail, aliases);"

If you know how the actual configuration should look like please share you knowledge.

8

Re: iRedMail-0.9.8

s.juozaitis wrote:

What I'm looking is sender email address + assigned aliases.

Sorry i misunderstood this.

But the implementation is very similar: change the sql table name to "forwardings", change the sql columns you need to query.

9

Re: iRedMail-0.9.8

ZhangHuangbin wrote:
s.juozaitis wrote:

What I'm looking is sender email address + assigned aliases.

Sorry i misunderstood this.

But the implementation is very similar: change the sql table name to "forwardings", change the sql columns you need to query.

The mysql table "forwardings" is created in "vmail" database.
In the "forwardings" table I have all the alias names filed to forward email to email address.

But I cannot get those aliases reflected in SOGo sender drop down menu.
Here I have added attachment from SOGo delegate mailbox option.
I want to get same drop down from active aliases.

Post's attachments

Screen Shot 2018-11-05 at 22.15.04.png 103.55 kb, file has never been downloaded. 

Screen Shot 2018-11-05 at 22.15.11.png 116.97 kb, file has never been downloaded. 

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

10

Re: iRedMail-0.9.8

You may need to tweak your SQL query to match your need.

11

Re: iRedMail-0.9.8

ZhangHuangbin wrote:

You may need to tweak your SQL query to match your need.

I understand that I need to tweek (or mysql query or sogo config) question is how and/or where to find the guidlines.

I tried to play with MailFieldNames by adjusting mysql and adding aliases colmns. Still not managed to make it work.

If you have any advice and/ot guidlines I will be more then thankful for all your support

12

Re: iRedMail-0.9.8

You need to tweak your SQL query to return the SQL columns/values you want. I'm not sure what i can help.

13

Re: iRedMail-0.9.8

ZhangHuangbin wrote:

You need to tweak your SQL query to return the SQL columns/values you want. I'm not sure what i can help.

To help with SQL. How the columns should look like.
Currently my SQL is:
CREATE VIEW sogo.users (c_uid, c_name, c_password, c_cn, mail, domain) AS SELECT username, username, password, name, username, domain FROM vmail.mailbox WHERE enablesogo=1 AND active=1;


Please advise which column names and values I should create/adjust in order to see multiple aliases selection (sender) in new message

14

Re: iRedMail-0.9.8

Just create a new SQL VIEW, also update /etc/sogo/sogo.conf to add a new address book with this new SQL VIEW.