在 /var/www/iredadmin/tools/notify_quarantined_recipients.py有
# How it works:
#
# - Mail user login to iRedAdmin-Pro (self-service) and choose to receive
# notification email when there's email quarantined.
#
# - OpenLDAP: user will be assigned `enabledService=quar_notify`.
此enabledService=quar_notify 如何加入?
在 phpldapadmin
伺服器: Distinguished Name: domainName=mydomain.com,o=domains,dc=mydomain,dc=com
下的enabledService 加入 quar_notify
還是在
伺服器: Distinguished Name: mail=1@mydomain.com,ou=Users,domainName=mydomain.com,o=domains,dc=mydomain,dc=com
下的enabledService 加入 quar_notify
這樣變成是每一個user 皆須手動來加
/var/www/iredadmin/settings.py
再加入:
# SMTP server address, port, username, password used to send notification mail.
NOTIFICATION_SMTP_SERVER = 'localhost'
NOTIFICATION_SMTP_PORT = 587
NOTIFICATION_SMTP_STARTTLS = True
#NOTIFICATION_SMTP_USER = 'no-reply@localhost.local'
#NOTIFICATION_SMTP_PASSWORD = ''
NOTIFICATION_SMTP_USER = 'spam@mydomain.com'
NOTIFICATION_SMTP_PASSWORD = 'xxxxxxxxx'
NOTIFICATION_SMTP_DEBUG_LEVEL = 0
NOTIFICATION_IREDADMIN_URL = 'https://mail.mydoamin.com/iredadmin/'
NOTIFICATION_QUARANTINE_MAIL_SUBJECT = '[Attention] You have emails quarantined and not delivered to mailbox'
執行# python notify_quarantined_recipients.py
* << ERROR >> Error while querying mail users: LDAPError('LDAP connection invalid',)
還是錯誤.
log: /var/log/openldap.log
Feb 15 10:27:28 mail slapd[23549]: daemon: shutdown requested and initiated.
Feb 15 10:27:28 mail slapd[23549]: slapd shutdown: waiting for 0 operations/tasks to finish
Feb 15 10:27:28 mail slapd[23549]: slapd stopped.
Feb 15 10:27:28 mail slapd[24438]: @(#) $OpenLDAP: slapd 2.4.40 (Nov 6 2016 01:21:28) $#012#011mockbuild@worker1.bsys.centos.org:/builddir/build/BUILD/openldap-2.4.40/openldap-2.4.40/servers/slapd
Feb 15 10:27:28 mail slapd[24440]: config_back_db_open: line 0: warning: cannot assess the validity of the ACL scope within backend naming context
Feb 15 10:27:28 mail slapd[24440]: mdb_monitor_db_open: monitoring disabled; configure monitor database to enable
Feb 15 10:27:28 mail slapd[24440]: slapd starting
Feb 15 10:27:48 mail slapd[24440]: => access_allowed: result not in cache (userPassword)
Feb 15 10:27:48 mail slapd[24440]: => access_allowed: auth access to "cn=vmailadmin,dc=mydomain,dc=com" "userPassword" requested
Feb 15 10:27:48 mail slapd[24440]: => acl_get: [1] attr userPassword
Feb 15 10:27:48 mail slapd[24440]: => acl_mask: access to entry "cn=vmailadmin,dc=mydomain,dc=com", attr "userPassword" requested
Feb 15 10:27:48 mail slapd[24440]: => acl_mask: to value by "", (=0)
Feb 15 10:27:48 mail slapd[24440]: <= check a_dn_pat: anonymous
Feb 15 10:27:48 mail slapd[24440]: <= acl_mask: [1] applying auth(=xd) (stop)
Feb 15 10:27:48 mail slapd[24440]: <= acl_mask: [1] mask: auth(=xd)
Feb 15 10:27:48 mail slapd[24440]: => slap_access_allowed: auth access granted by auth(=xd)
Feb 15 10:27:48 mail slapd[24440]: => access_allowed: auth access granted by auth(=xd)
logwatch 部分內容:
Warnings
--------
cleanup (total: 20)
10 proxy:ldap:/etc/postfix/ldap/sender_bcc_maps_user.cf lookup err...
1 21CD2C0000132: sender_bcc_maps lookup problem
1 8E342C0000132: sender_bcc_maps lookup problem
1 8E7DCC0000132: sender_bcc_maps lookup problem
1 B8A53C0000132: sender_bcc_maps lookup problem
1 B8CE6C0000132: sender_bcc_maps lookup problem
1 B8E57C0000132: sender_bcc_maps lookup problem
1 B8F7EC0000132: sender_bcc_maps lookup problem
1 C3188C0000132: sender_bcc_maps lookup problem
1 C3630C0000132: sender_bcc_maps lookup problem
1 C37E4C0000132: sender_bcc_maps lookup problem
pickup (total: 10)
1 maildrop/4C99CD009E58C: error writing 8E7DCC0000132: queue file...
1 maildrop/4C99CD009E58C: error writing C3630C0000132: queue file...
1 maildrop/4C99CD009E58C: error writing B8CE6C0000132: queue file...
1 maildrop/6997BD009E58B: error writing 8E342C0000132: queue file...
1 maildrop/6997BD009E58B: error writing B8A53C0000132: queue file...
1 maildrop/6997BD009E58B: error writing C3188C0000132: queue file...
1 maildrop/6997BD009E58B: error writing 21CD2C0000132: queue file...
1 maildrop/9B2F1D009E58E: error writing B8F7EC0000132: queue file...
1 maildrop/AE391D009E58D: error writing B8E57C0000132: queue file...
1 maildrop/AE391D009E58D: error writing C37E4C0000132: queue file...
proxymap (total: 12)
12 dict_ldap_connect: Unable to bind to server ldap://127.0.0.1:38...
trivial-rewrite (total: 2)
2 proxy:ldap:/etc/postfix/ldap/transport_maps_user.cf lookup erro...
其sender_bcc_maps_user.cf 及transport_maps_user.cf 出錯
ps: iRedMail 版本号:0.9.6, 才對; 寫錯為0.6.0