Author Topic: Enable users to send from virtual/alias addresses  (Read 4936 times)

dissimile

  • Zen Apprentice
  • *
  • Posts: 3
  • Karma: +1/-0
    • View Profile
Enable users to send from virtual/alias addresses
« on: July 09, 2014, 07:13:34 pm »
Although it is possible to configure Zentyal's mail server to receive emails from on multiple virtual domain/aliases it is not possible to send from those addresses via the SOGo web interface.

How can I configure the server so than when I compose an email I see the aliases as optional from addresses in the dropdown?

dissimile

  • Zen Apprentice
  • *
  • Posts: 3
  • Karma: +1/-0
    • View Profile
Re: Enable users to send from virtual/alias addresses
« Reply #1 on: July 09, 2014, 07:59:24 pm »
In case anyone else finds this issue here is the solution:

You need to the line MailFieldNames = ( mail, otherMailbox ) to the SOGoUserSources section of /etc/sogo/sogo.conf. I added it under the line UIDFieldName, but it can go anywhere in there.

To achieve this you need to edit /usr/share/zentyal/stubs/openchange/sogo.conf.mas so that the change persists restarts, as this is what Zentyal generates the Sogo config file from.

StuartNaylor

  • Guest
Re: Enable users to send from virtual/alias addresses
« Reply #2 on: July 09, 2014, 09:33:02 pm »
Code: [Select]
<%args>
    $sogoPort
    $sogoLogFile
    $sogoPidFile
    $sogoTimeZone
    $sogoMailDomain

    $imapServer
    $smtpServer
    $sieveServer

    $dbName
    $dbUser
    $dbPass
    $dbHost
    $dbPort

    $sambaBaseDN
    $sambaBindDN
    $sambaBindPwd
    $sambaHost
</%args>
<%init>
</%init>
{
    /*
     * Generated by Zentyal
     *
     * NOTE:
     * ~/GNUstep/Defaults/.GNUstepDefaults has precedence over this
     * file for some parameters
     *
     */


    /* General parameters */
    WOPort = <% $sogoPort %>;
    WOLogFile = <% $sogoLogFile %>;
    WOPidFile = <% $sogoPidFile %>;
    SOGoTimeZone = <% $sogoTimeZone %>;
    SOGoMailDomain = <% $sogoMailDomain %>;
    SOGoPasswordChangeEnabled = NO;
    SOGoLanguage = English;                 // User can override parameter

    /* Mail preferences */
    SOGoAppointmentSendEMailNotifications = YES;
    SOGoACLsSendEMailNotifications = NO;

    /* Database configuration */
    SOGoProfileURL = "mysql://<% $dbUser %>:<% $dbPass %>@<% $dbHost %>:<% $dbPort %>/<% $dbName %>/sogo_user_profile";
    OCSFolderInfoURL = "mysql://<% $dbUser %>:<% $dbPass %>@<% $dbHost %>:<% $dbPort %>/<% $dbName %>/sogo_folder_info";
    OCSSessionsFolderURL = "mysql://<% $dbUser %>:<% $dbPass %>@<% $dbHost %>:<% $dbPort %>/<% $dbName %>/sogo_sessions_folder";

    /* Common IMAP and SMTP configuration */
    SOGoForceExternalLoginWithEmail = YES;

    /* IMAP server configuration */
    NGImap4ConnectionStringSeparator = ".";
    SOGoIMAPAclConformsToIMAPExt = NO;
    SOGoMailSpoolPath = /var/spool/sogo;
    SOGoIMAPServer = <% $imapServer %>;
    SOGoSieveServer = <% $sieveServer %>;
    SOGoDraftsFolderName = Drafts;          // User can override parameter
    SOGoSentFolderName = Sent;              // User can override parameter
    SOGoTrashFolderName = Trash;            // User can override parameter
    SOGoMailShowSubscribedFoldersOnly = NO; // User can override parameter

    /* SMTP server configuration */
    SOGoMailingMechanism = smtp;
    SOGoSMTPServer = <% $smtpServer %>;

    /* Sieve configuration */
    SOGoVacationEnabled = YES;
    SOGoSieveScriptsEnabled = YES;
    SOGoForwardEnabled = YES;

    /* LDAP authentication */
    SOGoUserSources = (
        {
            id = sambaLogin;
            displayName = "SambaLogin";
            canAuthenticate = YES;
            type = ldap;
            CNFieldName = cn;
            IDFieldName = cn;
            UIDFieldName = sAMAccountName;
            hostname = "<% $sambaHost %>";
            baseDN = "CN=Users,<% $sambaBaseDN %>";
            bindDN = "<% $sambaBindDN %>";
            bindPassword = "<% $sambaBindPwd %>";
            bindFields = (sAMAccountName);
        },
        {
            id = sambaShared;
            displayName = "Shared Addressbook";
            canAuthenticate = NO;
            isAddressBook = YES;
            type = ldap;
            CNFieldName = cn;
            IDFieldName = mail;
            UIDFieldName = mail;
            hostname = "<% $sambaHost %>";
            baseDN = "<% $sambaBaseDN %>";
            bindDN = "<% $sambaBindDN %>";
            bindPassword = "<% $sambaBindPwd %>";
            filter = "((NOT isCriticalSystemObject='TRUE') AND (mail=\'*\') AND (NOT objectClass=contact))";
        },
        {
            id = sambaContacts;
            displayName = "Shared Contacts";
            canAuthenticate = NO;
            isAddressBook = YES;
            type = ldap;
            CNFieldName = cn;
            IDFieldName = mail;
            UIDFieldName = mail;
            hostname = "<% $sambaHost %>";
            baseDN = "<% $sambaBaseDN %>";
            bindDN = "<% $sambaBindDN %>";
            bindPassword = "<% $sambaBindPwd %>";
            filter = "((((objectClass=person) AND (objectClass=contact) AND ((uidNumber>=2000) OR (mail=\'*\'))) AND (NOT isCriticalSystemObject='TRUE') AND (NOT showInAdvancedViewOnly='TRUE') AND (NOT uid=Guest)) OR (((objectClass=group) AND (gidNumber>=2000)) AND (NOT isCriticalSystemObject='TRUE') AND (NOT showInAdvancedViewOnly='TRUE')))";
            mapping = {
                displayname = ("cn");
            };
        }
    );

    /* Debug */
    GCSFolderDebugEnabled = NO;
    GCSFolderStoreDebugEnabled = NO;
    LDAPDebugEnabled = NO;
    MySQL4DebugEnabled = NO;
    NGImap4DisableIMAP4Pooling = NO;
    OCSFolderManagerSQLDebugEnabled = NO;
    PGDebugEnabled = NO;
    SOGoDebugRequests = NO;
    SOGoMailKeepDraftsAfterSend = NO;
    SOGoUIxDebugEnabled = NO;
    SoDebugObjectTraversal = NO;
    SoSecurityManagerDebugEnabled = NO;
    WODontZipResponse = NO;
    WODebugZipResponse = NO;
}

Is my /usr/share/zentyal/stubs/openchange/sogo.conf.mas haven't tried but can you provide more input?

dissimile

  • Zen Apprentice
  • *
  • Posts: 3
  • Karma: +1/-0
    • View Profile
Re: Enable users to send from virtual/alias addresses
« Reply #3 on: July 10, 2014, 11:20:21 am »
It turns out that although the change I suggested provides the desired "from" address in the webmail compose window "From" dropdown, it doesn't actually change the from address in the sent email. Worse, the file that does the sending is a binary, so it's not user-editable to fix it.

zippydan

  • Zen Monk
  • **
  • Posts: 80
  • Karma: +1/-0
    • View Profile
Re: Enable users to send from virtual/alias addresses
« Reply #4 on: August 18, 2014, 08:14:12 pm »
so is there any resolution to this?

this seems like such a big and obvious feature that any email system should have ...

I should add that it seems like common sense to enable users to send both as a variety of personal aliases and also as a group email alias.

Simple example:

Kathy works in purchasing and billing for LocalCompany which is a subsidiary of InternationalCompany.  As a purchasing representative, sometimes she purchases for both the local company and for the international umbrella company.  She has personal email address kathy@localcompany.com and kathy@internationalcompany.com.  When making purchases, she wants to use the domain that matches the entity making the purchase, so as not to confuse the supplier. 

She is also a member of the purchasing and billing groups, and therefore receives email sent to the group email billing@localcompany.com and purchasing@localcompany.com.  Other people work in the department, so sometimes she wants to send email from the group as a whole, and not from her personal email, because she wants replies to go to the group and not just directly to her email address where only she would be able to read it.

Is this such an uncommon situation that Zentyal does not think it needs to be supported?
« Last Edit: August 18, 2014, 08:21:17 pm by zippydan »

Jonne

  • Zen Apprentice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Enable users to send from virtual/alias addresses
« Reply #5 on: November 19, 2014, 11:50:35 pm »
Has anyone found a way to do this already? I've looked for hours, but i can't seem to activate it.
Thanks,
Jonne

ejortegau

  • Zen Apprentice
  • *
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: Enable users to send from virtual/alias addresses
« Reply #6 on: November 21, 2014, 03:24:44 pm »
It turns out that although the change I suggested provides the desired "from" address in the webmail compose window "From" dropdown, it doesn't actually change the from address in the sent email. Worse, the file that does the sending is a binary, so it's not user-editable to fix it.

Did you ever find a solution for this? I currently have the same issue.

Regards,


E.

Jonne

  • Zen Apprentice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Enable users to send from virtual/alias addresses
« Reply #7 on: November 23, 2014, 09:51:25 pm »

Is this such an uncommon situation that Zentyal does not think it needs to be supported?

I don't think it's uncommon at all!
I have a small business, where i use multiple aliases.
info@domain.com and jonne@domain.com

Now i need to make 2 user accounts for the 2 email addresses, while i just would like to use one mailbox.
Also, i can't create 2 users with the same first-/last name.


Bug report: https://tracker.zentyal.org/issues/1908
« Last Edit: November 26, 2014, 03:42:25 pm by Jonne »

auzy7

  • Zen Apprentice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Enable users to send from virtual/alias addresses
« Reply #8 on: January 25, 2017, 04:18:18 pm »
bump, I have the same question