1

Topic: Moderation not working

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 1.3.1 OPENLDAP edition..
- Linux/BSD distribution name and version: CentOS Linux release 7.6.1810 (Core)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I am facing challenges with iredadmin -Pro 4.5 Moderation,is not working for mailing lists,when you set restriction to allow only moderators to send to the list,the condition does not work instead every member of the list is able to send to the list,please assist.

2

Re: Moderation not working

I will try to reproduce it locally, stay tuned.

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

3

Re: Moderation not working

ZhangHuangbin wrote:

I will try to reproduce it locally, stay tuned.

Thanks Zhang.

4

Re: Moderation not working

Btw, is this a subscribeable mailing list?

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

5

Re: Moderation not working

ZhangHuangbin wrote:

Btw, is this a subscribeable mailing list?

No its not,its a normal mailing list

6

Re: Moderation not working

- Please turn on debug mode in iRedAPD, restart "iredapd" service, then send a testing mail to reproduce your issue.
- Extract all log lines of this testing email and paste here for troubleshooting.

FYI: https://docs.iredmail.org/debug.iredapd.html

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

7

Re: Moderation not working

Aug 15 20:22:39 email postfix/submission/smtpd[8407]: 387FAF00088: client=unknown[IP], sasl_method=LOGIN, sasl_username=user@domain.com
Aug 15 20:22:39 email postfix/cleanup[4960]: 387FAF00088: message-id=<172001d67328$3ac28140$b04783c0$@domain.com>
Aug 15 20:22:39 email postfix/qmgr[26538]: 387FAF00088: from=<bozra@domain.com>, size=2673, nrcpt=12 (queue active)
Aug 15 20:22:39 email postfix/pipe[10130]: 387FAF00088: to=<user1@domain.com>, relay=dovecot, delay=0.5, delays=0.15/0.07/0/0.28, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[10132]: 387FAF00088: to=<user2@domain.com>, relay=dovecot, delay=0.55, delays=0.15/0.08/0/0.32, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[8369]: 387FAF00088: to=<user3@domain.com>, relay=dovecot, delay=0.55, delays=0.15/0.06/0/0.34, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[10135]: 387FAF00088: to=<user4@domain.com>, relay=dovecot, delay=0.6, delays=0.15/0.09/0/0.36, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[10140]: 387FAF00088: to=<user5@domain.com>, relay=dovecot, delay=0.63, delays=0.15/0.13/0/0.36, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[10144]: 387FAF00088: to=<user6@domain.com>, relay=dovecot, delay=0.63, delays=0.15/0.14/0/0.34, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[10138]: 387FAF00088: to=<user7@domain.com>, relay=dovecot, delay=0.63, delays=0.15/0.11/0/0.37, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[10146]: 387FAF00088: to=<user8@domain.com>, relay=dovecot, delay=0.65, delays=0.15/0.15/0/0.35, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[10150]: 387FAF00088: to=<user9@domain.com>, relay=dovecot, delay=0.65, delays=0.15/0.17/0/0.33, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[10142]: 387FAF00088: to=<user10@domain.com>, relay=dovecot, delay=0.66, delays=0.15/0.13/0/0.37, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[10136]: 387FAF00088: to=<user11@domain.com>, relay=dovecot, delay=0.68, delays=0.15/0.1/0/0.43, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[10148]: 387FAF00088: to=<user12@domain.com>, relay=dovecot, delay=0.72, delays=0.15/0.16/0/0.4, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/qmgr[26538]: 387FAF00088: removed

8

Re: Moderation not working

Did you manage to check on this issue?

Bozra wrote:

Aug 15 20:22:39 email postfix/submission/smtpd[8407]: 387FAF00088: client=unknown[IP], sasl_method=LOGIN, sasl_username=user@domain.com
Aug 15 20:22:39 email postfix/cleanup[4960]: 387FAF00088: message-id=<172001d67328$3ac28140$b04783c0$@domain.com>
Aug 15 20:22:39 email postfix/qmgr[26538]: 387FAF00088: from=<bozra@domain.com>, size=2673, nrcpt=12 (queue active)
Aug 15 20:22:39 email postfix/pipe[10130]: 387FAF00088: to=<user1@domain.com>, relay=dovecot, delay=0.5, delays=0.15/0.07/0/0.28, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[10132]: 387FAF00088: to=<user2@domain.com>, relay=dovecot, delay=0.55, delays=0.15/0.08/0/0.32, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[8369]: 387FAF00088: to=<user3@domain.com>, relay=dovecot, delay=0.55, delays=0.15/0.06/0/0.34, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[10135]: 387FAF00088: to=<user4@domain.com>, relay=dovecot, delay=0.6, delays=0.15/0.09/0/0.36, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[10140]: 387FAF00088: to=<user5@domain.com>, relay=dovecot, delay=0.63, delays=0.15/0.13/0/0.36, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[10144]: 387FAF00088: to=<user6@domain.com>, relay=dovecot, delay=0.63, delays=0.15/0.14/0/0.34, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[10138]: 387FAF00088: to=<user7@domain.com>, relay=dovecot, delay=0.63, delays=0.15/0.11/0/0.37, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[10146]: 387FAF00088: to=<user8@domain.com>, relay=dovecot, delay=0.65, delays=0.15/0.15/0/0.35, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[10150]: 387FAF00088: to=<user9@domain.com>, relay=dovecot, delay=0.65, delays=0.15/0.17/0/0.33, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[10142]: 387FAF00088: to=<user10@domain.com>, relay=dovecot, delay=0.66, delays=0.15/0.13/0/0.37, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[10136]: 387FAF00088: to=<user11@domain.com>, relay=dovecot, delay=0.68, delays=0.15/0.1/0/0.43, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/pipe[10148]: 387FAF00088: to=<user12@domain.com>, relay=dovecot, delay=0.72, delays=0.15/0.16/0/0.4, dsn=2.0.0, status=sent (delivered via dovecot service)
Aug 15 20:22:39 email postfix/qmgr[26538]: 387FAF00088: removed

9

Re: Moderation not working

I need related log lines in /var/log/iredapd/iredapd.log.

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

10

Re: Moderation not working

ZhangHuangbin wrote:

I need related log lines in /var/log/iredapd/iredapd.log.

Hi Zhang,

Please find the logs below

where the moderated list =list@domain.com
                moderator  id= moderator@domain.com
                sender id = user@domain.com


Oct  8 14:15:26 email journal: iredapd [srs][recipient]  input: get list@domain.com
Oct  8 14:15:26 email journal: iredapd [policy] recipient=list@domain.com
Oct  8 14:15:26 email journal: iredapd [+] Getting LDIF data of account: list@domain.com
Oct  8 14:15:26 email journal: iredapd search base dn: o=domains,dc=domain,dc=co,dc=tz#012search scope: SUBTREE #012search filter: (&(!(domainStatus=disabled))(|(mail=list@domain.com)(shadowAddress=list@domain.com))(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))#012search attributes: ['objectClass', 'accountStatus', 'listAllowedUser', 'accessPolicy', 'enabledService']
Oct  8 14:15:26 email journal: iredapd result: [('mail=list@domain.com,ou=Groups,domainName=domain.com,o=domains,dc=domain,dc=co,dc=tz', {'objectClass': [b'mailList'], 'accountStatus': [b'active'], 'enabledService': [b'mail', b'deliver'], 'accessPolicy': [b'moderatorsonly'], 'listAllowedUser': [b'moderator@domain.com']})]
Oct  8 14:15:26 email journal: iredapd Possible policy recipients: ['list@domain.com', '@domain.com', '@.', '@.domain.com', '@.co.tz', '@.tz']
Oct  8 14:15:26 email journal: iredapd [SQL] Query external addresses: #012SELECT id, email#012               FROM mailaddr#012              WHERE email IN ('list@domain.com', '@domain.com', '@.', '@.domain.com', '@.co.tz', '@.tz')#012           ORDER BY priority DESC
Oct  8 14:15:26 email journal: iredapd [SQL] Query local addresses: #012SELECT id, email#012               FROM users#012              WHERE email IN ('list@domain.com', '@domain.com', '@.', '@.domain.com', '@.co.tz', '@.tz')#012           ORDER BY priority DESC
Oct  8 14:15:26 email journal: iredapd [IP] RCPT, user@domain.com => list@domain.com, OK [sasl_username=user@domain.com, sender=user@domain.com, client_name=unknown, reverse_client_name=unknown, helo=PCNAME, encryption_protocol=TLSv1.2, encryption_cipher=ECDHE-RSA-AES256-SHA384, server_port=, process_time=0.0580s]
Oct  8 14:15:26 email journal: iredapd [SQL] Insert into smtp_sessions: #012        INSERT INTO smtp_sessions (#012            time, time_num,#012            action, reason, instance,#012            client_address, client_name, reverse_client_name, helo_name,#012            encryption_protocol, encryption_cipher,#012            server_address, server_port,#012            sender, sender_domain,#012            sasl_username, sasl_domain,#012            recipient, recipient_domain)#012        VALUES (#012            '2020-10-08 11:15:26', 1602155726,#012            'OK', '', '5ba.5f7ef4ce.dd1a9.0',#012            'IP', 'unknown', 'unknown', 'PCNAME',#012            'TLSv1.2', 'ECDHE-RSA-AES256-SHA384',#012            '', '',#012            'user@domain.com', 'domain.com',#012            'user@domain.com', 'domain.com',#012            'list@domain.com', 'domain.com')
Oct  8 14:15:27 email journal: iredapd [policy] recipient=list@domain.com
Oct  8 14:15:27 email journal: iredapd [IP] END-OF-MESSAGE, user@domain.com => list@domain.com, DUNNO [recipient_count=1, size=2545, process_time=0.0057s]
Oct  8 14:15:27 email journal: iredapd [SQL] Insert into smtp_sessions: #012        INSERT INTO smtp_sessions (#012            time, time_num,#012            action, reason, instance,#012            client_address, client_name, reverse_client_name, helo_name,#012            encryption_protocol, encryption_cipher,#012            server_address, server_port,#012            sender, sender_domain,#012            sasl_username, sasl_domain,#012            recipient, recipient_domain)#012        VALUES (#012            '2020-10-08 11:15:27', 1602155727,#012            'DUNNO', '', '5ba.5f7ef4ce.dd1a9.0',#012            'IP', 'unknown', 'unknown', 'PCNAME',#012            'TLSv1.2', 'ECDHE-RSA-AES256-SHA384',#012            '', '',#012            'user@domain.com', 'domain.com',#012            'user@domain.com', 'domain.com',#012            'list@domain.com', 'domain.com')
Oct  8 14:15:27 email journal: iredapd [srs][recipient]  input: get list@domain.com

11

Re: Moderation not working

Could you apply this patch for iRedAPD-4.4 and try again?
https://github.com/iredmail/iRedAPD/com … 5c2922e7f2

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee