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.

----

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

2

Re: Moderation not working

I will try to reproduce it locally, stay tuned.

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?

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

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.

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

12

Re: Moderation not working

Hello Team,
I am facing the same issue as detailed below, please help to the solution to resolve the issue.
I have a problem with iredmail maillist restriction. After migrating to a new server with latest OS and iredmail services, all configurations are working fine except maillist restriction. If i set mail list to only moderator can send, it doesnt work as anybody can send to that group. I have enabled ldap_malist_policy_access in iredpad/settings plugins as: plugins = ["reject_null_sender", "wblist_rdns", "greylisting", "throttle", "amavisd_wblist", "ldap_maillist_access_policy"]
and also connect from postfix as:

# Recipient restrictions
smtpd_recipient_restrictions =
    reject_unknown_sender_domain
    reject_non_fqdn_sender
    reject_unknown_recipient_domain
    reject_non_fqdn_recipient
    reject_unlisted_recipient
    check_policy_service inet:10.1.2.100:7777
    permit_mynetworks
    permit_sasl_authenticated
    reject_unauth_destination
   # check_policy_service inet:127.0.0.1:12340

# END-OF-MESSAGE restrictions
smtpd_end_of_data_restrictions =
    check_policy_service inet:10.1.2.100:7777

The maillist ldif are as follows:-

dn: mail=mtest@demo.egov.go.tz,ou=Groups,domainName=demo.egov.go.tz,o=domains,dc=gov,dc=go,dc=tz
accessPolicy: allowedOnly
accountStatus: active
cn: moderator testing
enabledService: mail
enabledService: deliver
listAllowedUser: test1.demo@demo.egov.go.tz
mail: mtest@demo.egov.go.tz
objectClass: mailList


The logs in iredapd is set in debug mode and below are the logs showing when a user (non moderator)  test3.demo@demo.egov.go.tz sent an email to a group mtest@demo.egov.go.tz  but it get delivered to its members.

Jan 20 15:33:36 imap journal: iredapd [policy] sender=test3.demo@demo.egov.go.tz
Jan 20 15:33:36 imap journal: iredapd [policy] recipient=mtest@demo.egov.go.tz
Jan 20 15:33:36 imap journal: iredapd [policy] sasl_username=test3.demo@demo.egov.go.tz
Jan 20 15:33:36 imap journal: iredapd Sender: test3.demo@demo.egov.go.tz, SASL username: test3.demo@demo.egov.go.tz
Jan 20 15:33:36 imap journal: iredapd [+] Getting LDIF data of account: mtest@demo.egov.go.tz
Jan 20 15:33:36 imap journal: iredapd search base dn: o=domains,dc=gov,dc=go,dc=tz#012search scope: SUBTREE #012search filter: (&(!(domainStatus=disabled))(|(mail=mtest@demo.egov.go.tz)(shadowAddress=mtest@demo.egov.go.tz))(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))#012search attributes: ['objectClass', 'accountStatus', 'listAllowedUser', 'accessPolicy', 'enabledService']
Jan 20 15:33:36 imap journal: iredapd [LDAP] query target domain of given alias domain: demo.egov.go.tz#012[LDAP] query filter: (&(objectClass=mailDomain)(accountStatus=active)(domainAliasName=demo.egov.go.tz))
Jan 20 15:33:36 imap journal: iredapd [LDAP] query target domain of given alias domain: demo.egov.go.tz#012[LDAP] query filter: (&(objectClass=mailDomain)(accountStatus=active)(domainAliasName=demo.egov.go.tz))
Jan 20 15:33:36 imap journal: iredapd Possible policy senders: ['test3.demo@demo.egov.go.tz', '@demo.egov.go.tz', '@.', '@.demo.egov.go.tz', '@.egov.go.tz', '@.go.tz', '@.tz', '10.1.2.55', '10.1.2.*', '10.1.*.55']
Jan 20 15:33:36 imap journal: iredapd Possible policy recipients: ['mtest@demo.egov.go.tz', '@demo.egov.go.tz', '@.', '@.demo.egov.go.tz', '@.egov.go.tz', '@.go.tz', '@.tz']
Jan 20 15:33:36 imap journal: iredapd [SQL] Query local addresses: #012SELECT id, email#012               FROM users#012              WHERE email IN ('test3.demo@demo.egov.go.tz', '@demo.egov.go.tz', '@.', '@.demo.egov.go.tz', '@.egov.go.tz', '@.go.tz', '@.tz', '10.1.2.55', '10.1.2.*', '10.1.*.55')#012           ORDER BY priority DESC
Jan 20 15:33:36 imap journal: iredapd [SQL] Query external addresses: #012SELECT id, email#012               FROM mailaddr#012              WHERE email IN ('mtest@demo.egov.go.tz', '@demo.egov.go.tz', '@.', '@.demo.egov.go.tz', '@.egov.go.tz', '@.go.tz', '@.tz')#012           ORDER BY priority DESC
Jan 20 15:33:36 imap journal: iredapd [SQL] Query local addresses: #012SELECT id, email#012               FROM users#012              WHERE email IN ('mtest@demo.egov.go.tz', '@demo.egov.go.tz', '@.', '@.demo.egov.go.tz', '@.egov.go.tz', '@.go.tz', '@.tz')#012           ORDER BY priority DESC
Jan 20 15:33:36 imap journal: iredapd [SQL] Query external addresses: #012SELECT id, email#012               FROM mailaddr#012              WHERE email IN ('test3.demo@demo.egov.go.tz', '@demo.egov.go.tz', '@.', '@.demo.egov.go.tz', '@.egov.go.tz', '@.go.tz', '@.tz', '10.1.2.55', '10.1.2.*', '10.1.*.55')#012           ORDER BY priority DESC
Jan 20 15:33:36 imap journal: iredapd [10.1.2.55] RCPT, test3.demo@demo.egov.go.tz => mtest@demo.egov.go.tz, OK [sasl_username=test3.demo@demo.egov.go.tz, sender=test3.demo@demo.egov.go.tz, client_name=unknown, reverse_client_name=unknown, helo=10.1.2.54, encryption_protocol=TLSv1.2, encryption_cipher=ECDHE-RSA-AES256-GCM-SHA384, server_port=, process_time=0.0156s]
Jan 20 15:33:36 imap 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            '2021-01-20 12:33:36', 1611146016,#012            'OK', '', '12ba4.60082320.2f034.0',#012            '10.1.2.55', 'unknown', 'unknown', '10.1.2.54',#012            'TLSv1.2', 'ECDHE-RSA-AES256-GCM-SHA384',#012            '', '',#012            'test3.demo@demo.egov.go.tz', 'demo.egov.go.tz',#012            'test3.demo@demo.egov.go.tz', 'demo.egov.go.tz',#012            'mtest@demo.egov.go.tz', 'demo.egov.go.tz')
Jan 20 15:33:36 imap journal: iredapd [policy] sender=test3.demo@demo.egov.go.tz
Jan 20 15:33:36 imap journal: iredapd [policy] recipient=mtest@demo.egov.go.tz
Jan 20 15:33:36 imap journal: iredapd [policy] sasl_username=test3.demo@demo.egov.go.tz
Jan 20 15:33:36 imap journal: iredapd [10.1.2.55] END-OF-MESSAGE, test3.demo@demo.egov.go.tz => mtest@demo.egov.go.tz, DUNNO [recipient_count=1, size=2374, process_time=0.0020s]
Jan 20 15:33:36 imap 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            '2021-01-20 12:33:36', 1611146016,#012            'DUNNO', '', '12ba4.60082320.2f034.0',#012            '10.1.2.55', 'unknown', 'unknown', '10.1.2.54',#012            'TLSv1.2', 'ECDHE-RSA-AES256-GCM-SHA384',#012            '', '',#012            'test3.demo@demo.egov.go.tz', 'demo.egov.go.tz',#012            'test3.demo@demo.egov.go.tz', 'demo.egov.go.tz',#012            'mtest@demo.egov.go.tz', 'demo.egov.go.tz')
Jan 20 15:33:36 imap journal: iredapd [policy] sender=test3.demo@demo.egov.go.tz
Jan 20 15:33:36 imap journal: iredapd [10.1.2.54] RCPT, test3.demo@demo.egov.go.tz -> arch2@gmsarch.gov.go.tz, OK [sasl_username=, sender=test3.demo@demo.egov.go.tz, client_name=unknown, reverse_client_name=unknown, helo=imap-ngoro.eganet.go.tz, encryption_protocol=TLSv1.2, encryption_cipher=ECDHE-RSA-AES256-GCM-SHA384, server_port=25, process_time=0.0195s]
Jan 20 15:33:36 imap journal: iredapd [10.1.2.54] END-OF-MESSAGE, test3.demo@demo.egov.go.tz -> arch2@gmsarch.gov.go.tz, DUNNO [recipient_count=1, size=4020, process_time=0.0106s]
Jan 20 15:33:36 imap journal: iredapd [10.1.2.54] RCPT, test3.demo@demo.egov.go.tz -> ramadhani.mdachi@ega.go.tz, OK [sasl_username=, sender=test3.demo@demo.egov.go.tz, client_name=unknown, reverse_client_name=unknown, helo=imap-ngoro.eganet.go.tz, encryption_protocol=TLSv1.2, encryption_cipher=ECDHE-RSA-AES256-GCM-SHA384, server_port=25, process_time=0.0190s]
Jan 20 15:33:36 imap journal: iredapd [10.1.2.54] END-OF-MESSAGE, test3.demo@demo.egov.go.tz -> ramadhani.mdachi@ega.go.tz, DUNNO [recipient_count=1, size=4026, process_time=0.0101s]

Output of postconf smtpd_recipient_restrictions

postconf smtpd_recipient_restrictions
smtpd_recipient_restrictions = reject_unknown_sender_domain reject_non_fqdn_sender reject_unknown_recipient_domain reject_non_fqdn_recipient reject_unlisted_recipient check_policy_service inet:10.1.2.54:7777 permit_mynetworks permit_sasl_authenticated reject_unauth_destination


postconf smtpd_end_of_data_restrictions
smtpd_end_of_data_restrictions = check_policy_service inet:10.1.2.54:7777

13

Re: Moderation not working

ramadhani.maulid28 wrote:

The logs in iredapd is set in debug mode and below are the logs showing when a user

Please show us full log without filter related to this testing email.

14

Re: Moderation not working

Hello Team,
I am facing the same issue as detailed below, please help to the solution to resolve the issue.
I have a problem with iredmail maillist restriction. After migrating to a new server with latest OS and iredmail services, all configurations are working fine except maillist restriction. If i set mail list to only moderator can send, it doesnt work as anybody can send to that group. I have enabled ldap_malist_policy_access in iredpad/settings plugins as: plugins = ["reject_null_sender", "ldap_maillist_access_policy", "wblist_rdns", "reject_sender_login_mismatch", "greylisting", "throttle", "amavisd_wblist"] and also connect from postfix as:

# Recipient restrictions
smtpd_recipient_restrictions =
    reject_non_fqdn_recipient
    reject_unlisted_recipient
    reject_unknown_sender_domain
    reject_non_fqdn_sender
    reject_non_fqdn_recipient
    reject_unlisted_recipient
    permit_sasl_authenticated
    reject_unauth_destination
    check_policy_service inet:10.1.2.51:7777
    permit_mynetworks
    permit_sasl_authenticated
    reject_unauth_destination
    #check_policy_service inet:127.0.0.1:12340


# END-OF-MESSAGE restrictions
smtpd_end_of_data_restrictions =
    check_policy_service inet:10.1.2.51:7777



The maillist ldif are as follows:-

dn: mail=test_mod@mu.ac.tz,ou=Groups,domainName=mu.ac.tz,o=domains,dc=gov,dc=go,dc=tz
accessPolicy: allowedOnly
accountStatus: active
cn: test_mod
enabledService: mail
enabledService: deliver
listAllowedUser: test.03@mu.ac.tz
mail: test_mod@mu.ac.tz
objectClass: mailList


The logs in iredapd is set in debug mode and below are the logs showing when a user (non moderator)  test.01@mu.ac.tz sent an email to a group test_mod@mu.ac.tz  but it get delivered to its members.


Aug  7 12:18:02 serv001-ser-gms01 amavis[125195]: (rel-zlmEEM3EJd4R) Quarantined message release (miscategorized): pY0yGb2ZoGKH <nancy.mwamfwagasi@hkmu.ac.tz> -> <temeke.info@nct.ac.tz>
Aug  7 12:18:02 serv001-ser-gms01 postfix/qmgr[5617]: 4RK9hp2230z66b: from=<nancy.mwamfwagasi@hkmu.ac.tz>, size=36408, nrcpt=1 (queue active)
Aug  7 12:18:02 serv001-ser-gms01 amavis[125195]: (rel-dDVFjIE39VUB) Quarantined message release (miscategorized): 26CWk2sHBG8A <nancy.mwamfwagasi@hkmu.ac.tz> -> <said.likoko@nct.ac.tz>
Aug  7 12:18:02 serv001-ser-gms01 postfix/qmgr[5617]: 4RK9hp2Qnzz66f: from=<nancy.mwamfwagasi@hkmu.ac.tz>, size=36408, nrcpt=1 (queue active)
Aug  7 12:18:02 serv001-ser-gms01 amavis[125195]: (rel-4chlzP_t5_tS) Quarantined message release (miscategorized): u-5HkVcWIBz0 <nancy.mwamfwagasi@hkmu.ac.tz> -> <info@nct.ac.tz>
Aug  7 12:18:02 serv001-ser-gms01 postfix/qmgr[5617]: 4RK9hp2rJRz66b: from=<nancy.mwamfwagasi@hkmu.ac.tz>, size=36380, nrcpt=1 (queue active)
Aug  7 12:18:05 serv001-ser-gms01 postfix/cleanup[12260]: 4RK9hs4nrPz66b: message-id=<f5fb5e6307d5d99fa33644cdc2446f61@mu.ac.tz>
Aug  7 12:18:05 serv001-ser-gms01 postfix/qmgr[5617]: 4RK9hs4nrPz66b: from=<test.01@mu.ac.tz>, size=5892, nrcpt=1 (queue active)
Aug  7 12:18:05 serv001-ser-gms01 amavis[81634]: (81634-08) Passed CLEAN {RelayedInternal}, ORIGINATING LOCAL [10.1.2.80]:33652 ESMTP/ESMTP <test.01@mu.ac.tz> -> <test.01@mu.ac.tz>, (), Queue-ID: 4RK9hd34jNz66d, Message-ID: <f5fb5e6307d5d99fa33644cdc2446f61@mu.ac.tz>, mail_id: OfNDOB_jlW6t, b: oW_KpDduA, Hits: -0.999, size: 1172, queued_as: 4RK9hs4nrPz66b, Subject: "TEST MOD", From: <test.01@mu.ac.tz>, helo=mail.mu.ac.tz, Tests: [ALL_TRUSTED=-1,HTML_MESSAGE=0.001], autolearn=ham autolearn_force=no, autolearnscore=0.001, dkim_new=dkim:gov.go.tz, 12202 ms
Aug  7 12:18:05 serv001-ser-gms01 amavis[81634]: (81634-08) Passed CLEAN, <test.01@mu.ac.tz> -> <test.01@mu.ac.tz>, Hits: -0.999, tag=-100, tag2=6, kill=6, queued_as: 4RK9hs4nrPz66b, L/Y/0/0
Aug  7 12:18:05 serv001-ser-gms01 postfix/amavis/smtp[13985]: 4RK9hd34jNz66d: to=<test.01@mu.ac.tz>, relay=127.0.0.1[127.0.0.1]:10026, delay=12, delays=0.07/0/0.01/12, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 4RK9hs4nrPz66b)
Aug  7 12:18:05 serv001-ser-gms01 postfix/pipe[10915]: 4RK9hs4nrPz66b: to=<test.01@mu.ac.tz>, relay=dovecot, delay=0.06, delays=0/0.01/0/0.05, dsn=2.0.0, status=sent (delivered via dovecot service)