1 (edited by B3x 2020-01-14 16:03:56)

Topic: Domain settings "Default mailing list(s) of new user" not working

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

Hello,

I have a problem with default mailing list for new users.
If i set default Default mailing list(s) of new user for the domain and then create a new user, user wont be added to mailing list.

Steps to reproduce:

1) Create mailing list:
iRedAdmin-Pro -> Add (subscribable) mailing list
Add alias all@example.org
    Who can send email to this list - Moderators
    Do not archive received emails
    Disable subscription and unsubscription via email (existing subscribers are still able to send to list)
    Disable subscription confirm
    Moderate all posts (Moderators are required)
   
2) Set default mail mailing list(s) of new user:

iRedAdmin-Pro -> Domains and Accounts -> example.org -> Advanced, Default mailing list(s) of new user
Set checked mailing list all@example.org.

3) Create user:
Create user test123@example.org.
Member of mailing list checkbox "all@example.org" is not checked.

----

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

2

Re: Domain settings "Default mailing list(s) of new user" not working

I can reproduce this bug locally. Working on it, will come back later with a fix.
Sorry about this trouble, and thank you very much for the feedback. smile

3

Re: Domain settings "Default mailing list(s) of new user" not working

Here's patch for iRedAdmin-Pro-LDAP-4.2. Please restart "iredadmin" service after applied the patch.

diff --git a/libs/ldaplib/user.py b/libs/ldaplib/user.py
index a6a23ea2..9a37e870 100644
--- a/libs/ldaplib/user.py
+++ b/libs/ldaplib/user.py
@@ -921,6 +921,8 @@ def add(domain, form, conn=None):
             if _domain in alias_domains:
                 _new_list = _username + '@' + domain
                 _unique_lists.add(_new_list)
+            else:
+                _unique_lists.add(i)
 
         # Assign user to mailing list.
         for ml in _unique_lists:

4

Re: Domain settings "Default mailing list(s) of new user" not working

Thanks a lot !