Quantcast
Channel: iRedMail 开源邮件服务解决方案 - iRedMail 技术支持
Viewing all articles
Browse latest Browse all 1467

回复: Notify users about quarantined mails 如何啟動

$
0
0
rain6966 写道:

此enabledService=quar_notify 如何加入?
...
伺服器:    Distinguished Name: mail=1@mydomain.com,ou=Users,domainName=mydomain.com,o=domains,dc=mydomain,dc=com
下的enabledService 加入 quar_notify
這樣變成是每一個user 皆須手動來加

原本的设计是让用户在 self-service 页面里自己选择是否要收到这样的通知,所以这个是加在每一个 user 里的。但目前 iRedAdmin-Pro 没有加入这个功能,所以作为管理员,你只能用 '--force-all' 参数来强制检查所有用户的隔离邮件并发送通知。

rain6966 写道:

執行# python notify_quarantined_recipients.py
* << ERROR >> Error while querying mail users: LDAPError('LDAP connection invalid',)

这个错误似乎是 python 连接 ldap 服务器出错了。先试下这个 patch,让它能打印出更详细的错误:

diff -r 9560b0c4ed4d tools/ira_tool_lib.py
--- a/tools/ira_tool_lib.py    Tue Feb 14 22:16:28 2017 +0800
+++ b/tools/ira_tool_lib.py    Wed Feb 15 12:30:46 2017 +0800
@@ -37,10 +37,6 @@
 logger.setLevel(logging.INFO)
 
 
-def print_error(msg):
-    print '< ERROR > ' + msg
-
-
 def get_db_conn(db):
     if backend == 'ldap' and db in ['ldap', 'vmail']:
         from libs.ldaplib.core import LDAPWrap
@@ -49,6 +45,7 @@
         conn = _wrap.conn
 
         return conn
+
     try:
         conn = web.database(dbn=sql_dbn,
                             host=settings.__dict__[db + '_db_host'],
@@ -61,7 +58,7 @@
 
         return conn
     except Exception, e:
-        print_error(e)
+        logger.error(e)
 
 
 # Log in `iredadmin.log`

Viewing all articles
Browse latest Browse all 1467

Trending Articles