1

Topic: Restrict the senders for alias

The function of Alias “Who can send email to this list” are not working:

- Users under domain domains.com
- Users under domain domains.com and its sub-domains
- Members
- Moderators
- Members and moderators

I had tried to set, only the members could send mail to alias by selecting the “members” option, but still the other email account can sent the mail to alias email account.


==== Required information ====
- iRedMail version (check /etc/iredmail-release):
iRedAdmin-Pro    v1.9.0 (MySQL)

- Linux/BSD distribution name and version:
CentOS release 6.5 (Final)

- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
(MySQL)

- Web server (Apache or Nginx):
Apache

- Manage mail accounts with iRedAdmin-Pro?
         -

- Related log if you're reporting an issue:
====

----

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

2

Re: Restrict the senders for alias

*) Do you have iRedAPD enabled in Postfix? Show us output of command "postconf smtpd_recipient_restrictions".
*) Do you have plugin "sql_alias_access_policy" enabled in iRedAPD? Show us output of command below:

grep '^plugins' /opt/iredapd/settings.py

3

Re: Restrict the senders for alias

both are enabled, you can check the outputs:

[root@~]# postconf smtpd_recipient_restrictions
smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unlisted_recipient, check_policy_service inet:127.0.0.1:7777, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_client_access hash:/etc/postfix/rbl_override, check_policy_service inet:127.0.0.1:10031, reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net, reject_rhsbl_sender dbl.spamhaus.org, reject_rhsbl_sender rhsbl.sorbs.net, reject_rhsbl_client dbl.spamhaus.org, reject_rhsbl_client rhsbl.sorbs.net


[root@~]# grep '^plugins' /opt/iredapd/settings.py
plugins = ["sql_alias_access_policy", "sql_user_restrictions","amavisd_wblist"]

4

Re: Restrict the senders for alias

Please turn on debug mode in iRedAPD, then try again. Extract related log from /var/log/iredapd/iredapd.log and paste here, so that we can help troubleshoot.

FYI: http://www.iredmail.org/docs/debug.iredapd.html

5 (edited by amol 2016-02-23 13:00:21)

Re: Restrict the senders for alias

We are getting these type of logs when we set the Moderators and send the mails from email account (pravesh@gmail.com) other than Moderators.

2016-02-21 16:23:18 ERROR Error while creating database connection: (2003, "Can't connect to MySQL server on '127.0.0.1' (111)")
2016-02-21 16:23:18 INFO [209.85.223.176] pravesh@gmail.com -> praveshtest@domain.ae, DUNNO

[root@mailbox iredapd]# tail -f /var/log/iredapd.log |grep apps.ae
2016-02-23 08:54:13 DEBUG smtp session: client_name=mailbox.apps.ae
2016-02-23 08:54:13 DEBUG smtp session: reverse_client_name=mailbox.apps.ae
2016-02-23 08:54:13 DEBUG smtp session: helo_name=mailbox.apps.ae
2016-02-23 08:54:14 DEBUG smtp session: client_name=mailbox.apps.ae
2016-02-23 08:54:14 DEBUG smtp session: reverse_client_name=mailbox.apps.ae
2016-02-23 08:54:14 DEBUG smtp session: helo_name=mailbox.apps.ae
2016-02-23 08:56:22 DEBUG smtp session: recipient=praveshtest@apps.ae
2016-02-23 08:56:22 INFO [209.85.223.170] pravesh@gmail.com -> praveshtest@apps.ae, DUNNO