Topic: iRedAPD sql_user_restrictions.py not working?
==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
======== Required information ====
- iRedMail version: iRedAdmin-Pro-MySQL-1.8.1
- Store mail accounts in which backend (MySQL):
- Linux/BSD distribution name and version: CentOS 6.5
- Related log if you're reporting an issue: iredapd.log
====
Hello. I'm in the process of migrating one of our mail systems to using your product. So far, it's been great. I have had an issue implementing per-user whitelists and blacklists, however.
I understand that there are four fields in vmail.mailbox that are read by iRedAPD to determine if the mail goes through. On the user 'tim@mynewmailserver.net' I put 'joe@othermailhost.com' in the 'rejectedsenders' field and 'tim@othermailhost.com' in the 'rejectedrecipients' field.
Emails sent to his account from 'joe@othermailhost.com' go through without issue, and he is able to send to 'tim@othermailhost.com' from the 'tim@mynewmailserver.net' account. It "DUNNO" about this, for some reason:
2014-04-27 03:13:12 INFO Starting iRedAPD (version: 1.4.2, backend: mysql), listening on 127.0.0.1:7777.
2014-04-27 03:13:12 INFO Loading plugin: sql_alias_access_policy
2014-04-27 03:13:12 INFO Loading plugin: sql_user_restrictions
2014-04-30 10:36:26 INFO [10.0.4.240] btv1==197eb6cbcce==joe@othermailhost.com -> tim@mynewmailserver.net, DUNNO
2014-04-30 10:53:01 INFO [127.0.0.1] tim@mynewmailserver.net -> joe@mynewmailserver.com, DUNNO
2014-04-30 10:54:41 INFO [127.0.0.1] tim@mynewmailserver.net -> tim@othermailhost.com, DUNNO
2014-04-30 10:54:43 INFO [127.0.0.1] tim@mynewmailserver.net -> joe@othermailhost.com, DUNNO
I can see that iRedAPD is probably thrown off by the bounce address tag validation, not a big deal. However, after that, 'tim@mynewmailserver.net' sent a test message to 'tim@othermailhost.com', which went through without issue. It is my understanding that othermailhost.com should not have received the message, since it is in the 'rejectedrecipients' field.
I turned debugging logging on in settings.py, and turned this possibly relevant info up:
2014-05-01 10:38:23 DEBUG Returned SQL Record: (None, 'tim@othermailhost.com', None, 'joe@othermailhost.com')
2014-05-01 10:38:23 DEBUG <!> Error: 'NoneType' object has no attribute 'split'
2014-05-01 10:38:23 INFO [127.0.0.1] tim@mynewmailserver.net -> tim@othermailhost.com, DUNNO
2014-05-01 10:38:23 DEBUG Connection closed
2014-05-01 10:38:23 DEBUG Closed SQL connection.
I don't discount the possibility that I'm doing something wrong, but I'm not sure what it might be. iRedAPD was set up via the included script in iRedMail or iRedAdmin. I'm not sure which.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.