主题: Bad search filter

外部 ip ,以webmail 登入域內帳號寄給域內另一user
出現下面錯誤訊息, 但信件是可正常寄達, 只是稍感疑惑.
maillog:

Jul  9 14:27:05 mail roundcube: <omro80ij> PHP Error: Detected 'temp_dir' change. Access to '/var/www/roundcubemail-1.3.6/temp' restricted by filesystem permissions or open_basedir in /var/www/roundcubemail-1.3.6/plugins/filesystem_attachments/filesystem_attachments.php on line 219 (POST /mail/?_task=mail&_action=remove-attachment)
Jul  9 14:27:12 mail roundcube: <omro80ij> PHP Error: LDAP: ldap_list failed for dn=domainName=mydomain.com,o=domains,dc=mydomain,dc=com. Bad search filter (POST /mail/?_task=mail&_action=autocomplete)
Jul  9 14:27:12 mail roundcube: <omro80ij> PHP Error: LDAP: ldap_list failed for dn=domainName=mydomain.com,o=domains,dc=mydomain,dc=com. Bad search filter (POST /mail/?_task=mail&_action=autocomplete)
Jul  9 14:27:16 mail roundcube: <omro80ij> PHP Error: Detected 'temp_dir' change. Access to '/var/www/roundcubemail-1.3.6/temp' restricted by filesystem permissions or open_basedir in /var/www/roundcubemail-1.3.6/plugins/filesystem_attachments/filesystem_attachments.php on line 219 (POST /mail/?_task=mail&_unlock=loading1531117639174&_lang=en&_framed=1&_action=send)
Jul  9 14:27:16 mail postfix/submission/smtpd[28483]: connect from mail.mydomain.com[127.0.0.1]
Jul  9 14:27:16 mail postfix/submission/smtpd[28483]: Anonymous TLS connection established from mail.mydomain.com[127.0.0.1]: TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)
Jul  9 14:27:16 mail postfix/submission/smtpd[28483]: 2B86598000084: client=mail.mydomain.com[127.0.0.1], sasl_method=LOGIN, sasl_username=aaaa@mydomain.com
Jul  9 14:27:16 mail postfix/cleanup[28487]: 2B86598000084: message-id=<60a0b3add421f0d96a522700a2070b55@mydomain.com>
Jul  9 14:27:16 mail opendmarc[1382]: 2B86598000084: SPF(mailfrom): aaaa@mydomain.com pass
Jul  9 14:27:16 mail opendmarc[1382]: 2B86598000084: mydomain.com pass
Jul  9 14:27:16 mail roundcube: <omro80ij> User aaaa@mydomain.com [203.xx.xx.xx]; Message for bbbb@mydomain.com; 250: 2.0.0 Ok: queued as 2B86598000084
Jul  9 14:27:16 mail postfix/qmgr[2054]: 2B86598000084: from=<aaaa@mydomain.com>, size=8989, nrcpt=2 (queue active)
Jul  9 14:27:16 mail postfix/submission/smtpd[28483]: disconnect from mail.mydomain.com[127.0.0.1]
Jul  9 14:27:16 mail amavis[21122]: (21122-02) ESMTP [127.0.0.1]:10026 /var/spool/amavisd/tmp/amavis-20180709T120453-21122-TbD2HXhi: <aaaa@mydomain.com> -> <mydomainadmin@mydomain.com> Received: from mail.mydomain.com ([127.0.0.1]) by mail.mydomain.com (mail.mydomain.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP for <mydomainadmin@mydomain.com>; Mon,  9 Jul 2018 14:27:16 +0800 (CST)
Jul  9 14:27:16 mail amavis[18322]: (18322-12) ESMTP [127.0.0.1]:10026 /var/spool/amavisd/tmp/amavis-20180709T114651-18322-7dfvXkCC: <aaaa@mydomain.com> -> <bbbb@mydomain.com> Received: from mail.mydomain.com ([127.0.0.1]) by mail.mydomain.com (mail.mydomain.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP for <bbbb@mydomain.com>; Mon,  9 Jul 2018 14:27:16 +0800 (CST)
Jul  9 14:27:16 mail amavis[21122]: (21122-02) Checking: uBa9qCBrCldU ORIGINATING/MYNETS [127.0.0.1] <aaaa@mydomain.com> -> <mydomainadmin@mydomain.com>
Jul  9 14:27:16 mail amavis[18322]: (18322-12) Checking: R9lD7_1-1v70 ORIGINATING/MYNETS [127.0.0.1] <aaaa@mydomain.com> -> <bbbb@mydomain.com>
Jul  9 14:27:17 mail postfix/10025/smtpd[28496]: connect from mail.mydomain.com[127.0.0.1]
Jul  9 14:27:17 mail postfix/10025/smtpd[28496]: 085369800081B: client=mail.mydomain.com[127.0.0.1]
Jul  9 14:27:17 mail postfix/10025/smtpd[28497]: connect from mail.mydomain.com[127.0.0.1]
Jul  9 14:27:17 mail postfix/cleanup[28487]: 085369800081B: message-id=<60a0b3add421f0d96a522700a2070b55@mydomain.com>
Jul  9 14:27:17 mail postfix/10025/smtpd[28497]: 0B9439800082F: client=mail.mydomain.com[127.0.0.1]
Jul  9 14:27:17 mail postfix/cleanup[28500]: 0B9439800082F: message-id=<60a0b3add421f0d96a522700a2070b55@mydomain.com>
Jul  9 14:27:17 mail opendmarc[1382]: 085369800081B: SPF(mailfrom): aaaa@mydomain.com pass
Jul  9 14:27:17 mail opendmarc[1382]: 085369800081B: mydomain.com pass
Jul  9 14:27:17 mail opendmarc[1382]: 0B9439800082F: SPF(mailfrom): aaaa@mydomain.com pass
Jul  9 14:27:17 mail opendmarc[1382]: 0B9439800082F: mydomain.com pass
Jul  9 14:27:17 mail postfix/10025/smtpd[28496]: disconnect from mail.mydomain.com[127.0.0.1]
Jul  9 14:27:17 mail postfix/qmgr[2054]: 085369800081B: from=<aaaa@mydomain.com>, size=10160, nrcpt=1 (queue active)
Jul  9 14:27:17 mail amavis[21122]: (21122-02) uBa9qCBrCldU FWD from <aaaa@mydomain.com> -> <mydomainadmin@mydomain.com>, BODY=7BIT 250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 085369800081B
Jul  9 14:27:17 mail amavis[21122]: (21122-02) Passed CLEAN {RelayedInternal}, ORIGINATING/MYNETS LOCAL [127.0.0.1]:58417 <aaaa@mydomain.com> -> <mydomainadmin@mydomain.com>, Queue-ID: 2B86598000084, Message-ID: <60a0b3add421f0d96a522700a2070b55@mydomain.com>, mail_id: uBa9qCBrCldU, Hits: 0.212, size: 9204, queued_as: 085369800081B, dkim_new=dkim:mydomain.com, 855 ms, Tests: [ALL_TRUSTED=-1,SPF_PASS=-0.001,TVD_RCVD_SINGLE=1.213]
Jul  9 14:27:17 mail postfix/10025/smtpd[28497]: disconnect from mail.mydomain.com[127.0.0.1]
Jul  9 14:27:17 mail amavis[21122]: (21122-02) Passed CLEAN, <aaaa@mydomain.com> -> <mydomainadmin@mydomain.com>, Hits: 0.212, tag=2, tag2=6.2, kill=6.9, queued_as: 085369800081B, L/0/0/0
Jul  9 14:27:17 mail amavis[18322]: (18322-12) R9lD7_1-1v70 FWD from <aaaa@mydomain.com> -> <bbbb@mydomain.com>, BODY=7BIT 250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 0B9439800082F
Jul  9 14:27:17 mail postfix/qmgr[2054]: 0B9439800082F: from=<aaaa@mydomain.com>, size=10144, nrcpt=1 (queue active)
Jul  9 14:27:17 mail amavis[18322]: (18322-12) Passed CLEAN {RelayedInternal}, ORIGINATING/MYNETS LOCAL [127.0.0.1]:58417 <aaaa@mydomain.com> -> <bbbb@mydomain.com>, Queue-ID: 2B86598000084, Message-ID: <60a0b3add421f0d96a522700a2070b55@mydomain.com>, mail_id: R9lD7_1-1v70, Hits: 0.212, size: 9204, queued_as: 0B9439800082F, dkim_new=dkim:mydomain.com, 854 ms, Tests: [ALL_TRUSTED=-1,SPF_PASS=-0.001,TVD_RCVD_SINGLE=1.213]
Jul  9 14:27:17 mail amavis[18322]: (18322-12) Passed CLEAN, <aaaa@mydomain.com> -> <bbbb@mydomain.com>, Hits: 0.212, tag=2, tag2=6.2, kill=6.9, queued_as: 0B9439800082F, L/0/0/0
Jul  9 14:27:17 mail postfix/amavis/smtp[28489]: 2B86598000084: to=<mydomainadmin@mydomain.com>, relay=127.0.0.1[127.0.0.1]:10026, delay=1, delays=0.13/0.01/0/0.88, 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 085369800081B)
Jul  9 14:27:17 mail postfix/amavis/smtp[28491]: 2B86598000084: to=<bbbb@mydomain.com>, relay=127.0.0.1[127.0.0.1]:10026, delay=1.1, delays=0.13/0.02/0/0.95, 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 0B9439800082F)
Jul  9 14:27:17 mail postfix/qmgr[2054]: 2B86598000084: removed
Jul  9 14:27:17 mail postfix/pipe[28502]: 0B9439800082F: to=<bbbb@mydomain.com>, relay=dovecot, delay=0.33, delays=0.13/0.01/0/0.18, dsn=2.0.0, status=sent (delivered via dovecot service)
Jul  9 14:27:17 mail postfix/qmgr[2054]: 0B9439800082F: removed
Jul  9 14:27:17 mail postfix/pipe[28501]: 085369800081B: to=<mydomainadmin@mydomain.com>, relay=dovecot, delay=0.34, delays=0.13/0.02/0/0.19, dsn=2.0.0, status=sent (delivered via dovecot service)
Jul  9 14:27:17 mail postfix/qmgr[2054]: 085369800081B: removed 

/var/log/nginx/access.log

203.xx.xx.xx - - [09/Jul/2018:14:26:37 +0800] "GET /mail/?_task=mail&_action=compose&_id=14210552895b43001ccace0 HTTP/1.1" 200 11329 "https://mail.mydomain.com/mail/?_task=mail&_mbox=INBOX" "Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0"
203.xx.xx.xx - - [09/Jul/2018:14:27:05 +0800] "POST /mail/?_task=mail&_action=remove-attachment HTTP/1.1" 200 123 "https://mail.mydomain.com/mail/?_task=mail&_action=compose&_id=14210552895b43001ccace0" "Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0"
203.xx.xx.xx - - [09/Jul/2018:14:27:12 +0800] "POST /mail/?_task=mail&_action=autocomplete HTTP/1.1" 200 276 "https://mail.mydomain.com/mail/?_task=mail&_action=compose&_id=14210552895b43001ccace0" "Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0"
203.xx.xx.xx - - [09/Jul/2018:14:27:12 +0800] "POST /mail/?_task=mail&_action=autocomplete HTTP/1.1" 200 276 "https://mail.mydomain.com/mail/?_task=mail&_action=compose&_id=14210552895b43001ccace0" "Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0"
84.246.149.65 - - [09/Jul/2018:14:27:13 +0800] "GET / HTTP/1.0" 301 178 "-" "-"
203.xx.xx.xx - - [09/Jul/2018:14:27:16 +0800] "POST /mail/?_task=mail&_unlock=loading1531117639174&_lang=en&_framed=1 HTTP/1.1" 200 355 "https://mail.mydomain.com/mail/?_task=mail&_action=compose&_id=14210552895b43001ccace0" "Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0"
203.xx.xx.xx - - [09/Jul/2018:14:27:20 +0800] "GET /mail/?_task=mail&_refresh=1&_mbox=INBOX HTTP/1.1" 200 11014 "https://mail.mydomain.com/mail/?_task=mail&_action=compose&_id=14210552895b43001ccace0" "Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0"

1).
PHP Error: Detected 'temp_dir' change. Access to '/var/www/roundcubemail-1.3.6/temp' restricted by filesystem permissions or open_basedir in /var/www/roundcubemail-1.3.6/plugins/filesystem_attachments/filesystem_attachments.php on line 219 (POST /mail/?_task=mail&_action=remove-attachment)

這一個問題,我是解決掉了.
a).mkdir -p /var/run/roundcube/tmp
b).chown -R nginx:nginx  /var/run/roundcube/tmp
c)./var/www/roundcubemail/config/config.inc.php
// use this folder to store temp files
// must be writeable for the user who runs PHP process (Apache user if mod_php is being used)
//$config['temp_dir'] = RCUBE_INSTALL_PATH . 'temp/';
$config['temp_dir'] = '/var/run/roundcube/temp/';

2). 但下面問題我無法處理.
PHP Error: LDAP: ldap_list failed for dn=domainName=mydomain.com,o=domains,dc=mydomain,dc=com. Bad search filter (POST /mail/?_task=mail&_action=autocomplete)

回复: Bad search filter

啟動
$config['log_logins'] = true;
$config['ldap_debug'] = true;
所得到log

Jul  9 17:51:01 mail roundcube: <pij0jmsk> C: Connect [127.0.0.1:389]
Jul  9 17:51:01 mail roundcube: <pij0jmsk> S: OK
Jul  9 17:51:01 mail roundcube: <pij0jmsk> C: Bind [dn: mail=bbbb@mydomain.com,ou=Users,domainName=mydomain.com,o=domains,dc=mydomain,dc=com]
Jul  9 17:51:01 mail roundcube: <pij0jmsk> S: OK
Jul  9 17:51:01 mail roundcube: <pij0jmsk> C: Search base dn: [domainName=mydomain.com,o=domains,dc=mydomain,dc=com] scope [sub] with filter [(&(&(enabledService=mail)(enabledService=deliver)(enabledService=displayedInGlobalAddressBook)(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))(|(cn=*aaa*)(givenname=*aaa*)(sn=*aaa*)(mail=*aaa*)))]
Jul  9 17:51:01 mail roundcube: <pij0jmsk> Using function ldap_search on scope sub ($ns_function is ldap_search)
Jul  9 17:51:01 mail roundcube: <pij0jmsk> C: (Without VLV) Setting a filter of (&(&(enabledService=mail)(enabledService=deliver)(enabledService=displayedInGlobalAddressBook)(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))(|(cn=*aaa*)(givenname=*aaa*)(sn=*aaa*)(mail=*aaa*)))
Jul  9 17:51:01 mail roundcube: <pij0jmsk> Executing search with return attributes: array (#012  0 => 'cn',#012  1 => 'sn',#012  2 => 'givenname',#012  3 => 'title',#012  4 => 'mail',#012  5 => 'telephonenumber',#012  6 => 'mobile',#012  7 => 'facsimiletelephonenumber',#012  8 => 'street',#012  9 => 'postalcode',#012  10 => 'l',#012  11 => 'departmentnumber',#012  12 => 'description',#012  13 => 'jpegphoto',#012  14 => 'objectClass',#012  15 => 'cn',#012)
Jul  9 17:51:01 mail roundcube: <pij0jmsk> S: 1 record(s) found
Jul  9 17:51:01 mail roundcube: <pij0jmsk> C: Search base dn: [domainName=mydomain.com,o=domains,dc=mydomain,dc=com] scope [] with filter [(&(=*aaa*))]
Jul  9 17:51:01 mail roundcube: <pij0jmsk> Using function ldap_list on scope  ($ns_function is ldap_read)
Jul  9 17:51:01 mail roundcube: <pij0jmsk> C: (Without VLV) Setting a filter of (&(=*aaa*))
Jul  9 17:51:01 mail roundcube: <pij0jmsk> Executing search with return attributes: array (#012  0 => 'dn',#012  1 => 'objectClass',#012  2 => NULL,#012  3 => 'mail',#012)
Jul  9 17:51:01 mail roundcube: <pij0jmsk> PHP Error: LDAP: ldap_list failed for dn=domainName=mydomain.com,o=domains,dc=mydomain,dc=com. Bad search filter (POST /mail/?_task=mail&_action=autocomplete)
Jul  9 17:51:01 mail journal: ool www: <pij0jmsk> C: Close
Jul  9 17:51:02 mail roundcube: <pij0jmsk> C: Connect [127.0.0.1:389]
Jul  9 17:51:02 mail roundcube: <pij0jmsk> S: OK
Jul  9 17:51:02 mail roundcube: <pij0jmsk> C: Bind [dn: mail=bbbb@mydomain.com,ou=Users,domainName=mydomain.com,o=domains,dc=mydomain,dc=com]
Jul  9 17:51:02 mail roundcube: <pij0jmsk> S: OK
Jul  9 17:51:02 mail roundcube: <pij0jmsk> C: Search base dn: [domainName=mydomain.com,o=domains,dc=mydomain,dc=com] scope [sub] with filter [(&(&(enabledService=mail)(enabledService=deliver)(enabledService=displayedInGlobalAddressBook)(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))(|(cn=*aaaa*)(givenname=*aaaa*)(sn=*aaaa*)(mail=*aaaa*)))]
Jul  9 17:51:02 mail roundcube: <pij0jmsk> Using function ldap_search on scope sub ($ns_function is ldap_search)
Jul  9 17:51:02 mail roundcube: <pij0jmsk> C: (Without VLV) Setting a filter of (&(&(enabledService=mail)(enabledService=deliver)(enabledService=displayedInGlobalAddressBook)(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))(|(cn=*aaaa*)(givenname=*aaaa*)(sn=*aaaa*)(mail=*aaaa*)))
Jul  9 17:51:02 mail roundcube: <pij0jmsk> Executing search with return attributes: array (#012  0 => 'cn',#012  1 => 'sn',#012  2 => 'givenname',#012  3 => 'title',#012  4 => 'mail',#012  5 => 'telephonenumber',#012  6 => 'mobile',#012  7 => 'facsimiletelephonenumber',#012  8 => 'street',#012  9 => 'postalcode',#012  10 => 'l',#012  11 => 'departmentnumber',#012  12 => 'description',#012  13 => 'jpegphoto',#012  14 => 'objectClass',#012  15 => 'cn',#012)
Jul  9 17:51:02 mail roundcube: <pij0jmsk> S: 1 record(s) found
Jul  9 17:51:02 mail roundcube: <pij0jmsk> C: Search base dn: [domainName=mydomain.com,o=domains,dc=mydomain,dc=com] scope [] with filter [(&(=*aaaa*))]
Jul  9 17:51:02 mail roundcube: <pij0jmsk> Using function ldap_list on scope  ($ns_function is ldap_read)
Jul  9 17:51:02 mail roundcube: <pij0jmsk> C: (Without VLV) Setting a filter of (&(=*aaaa*))
Jul  9 17:51:02 mail roundcube: <pij0jmsk> Executing search with return attributes: array (#012  0 => 'dn',#012  1 => 'objectClass',#012  2 => NULL,#012  3 => 'mail',#012)
Jul  9 17:51:02 mail roundcube: <pij0jmsk> PHP Error: LDAP: ldap_list failed for dn=domainName=mydomain.com,o=domains,dc=mydomain,dc=com. Bad search filter (POST /mail/?_task=mail&_action=autocomplete)
Jul  9 17:51:02 mail journal: ool www: <pij0jmsk> C: Close
Jul  9 17:51:05 mail postfix/submission/smtpd[41063]: connect from mail.mydomain.com[127.0.0.1]
Jul  9 17:51:05 mail postfix/submission/smtpd[41063]: Anonymous TLS connection established from mail.mydomain.com[127.0.0.1]: TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)
Jul  9 17:51:05 mail postfix/submission/smtpd[41063]: E9E6B9800154E: client=mail.mydomain.com[127.0.0.1], sasl_method=LOGIN, sasl_username=bbbb@mydomain.com
Jul  9 17:51:05 mail postfix/cleanup[41065]: E9E6B9800154E: message-id=<c1ef861d81420e129912a9c376b4b305@mydomain.com>
Jul  9 17:51:05 mail opendmarc[1382]: E9E6B9800154E: SPF(mailfrom): bbbb@mydomain.com pass
Jul  9 17:51:05 mail opendmarc[1382]: E9E6B9800154E: mydomain.com pass
Jul  9 17:51:06 mail roundcube: <pij0jmsk> User bbbb@mydomain.com [203.xx.xx.xx]; Message for aaaa@mydomain.com; 250: 2.0.0 Ok: queued as E9E6B9800154E
Jul  9 17:51:06 mail postfix/qmgr[2054]: E9E6B9800154E: from=<bbbb@mydomain.com>, size=2642, nrcpt=2 (queue active)
Jul  9 17:51:06 mail postfix/submission/smtpd[41063]: disconnect from mail.mydomain.com[127.0.0.1]
Jul  9 17:51:06 mail amavis[34781]: (34781-13) ESMTP [127.0.0.1]:10026 /var/spool/amavisd/tmp/amavis-20180709T171257-34781-Olayc3aO: <bbbb@mydomain.com> -> <aaaa@mydomain.com> Received: from mail.mydomain.com ([127.0.0.1]) by mail.mydomain.com (mail.mydomain.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP for <aaaa@mydomain.com>; Mon,  9 Jul 2018 17:51:06 +0800 (CST)
Jul  9 17:51:06 mail amavis[19793]: (19793-15) ESMTP [127.0.0.1]:10026 /var/spool/amavisd/tmp/amavis-20180709T115847-19793-Td1pZR5X: <bbbb@mydomain.com> -> <mydomainadmin@mydomain.com> Received: from mail.mydomain.com ([127.0.0.1]) by mail.mydomain.com (mail.mydomain.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP for <mydomainadmin@mydomain.com>; Mon,  9 Jul 2018 17:51:06 +0800 (CST)
Jul  9 17:51:06 mail amavis[34781]: (34781-13) Checking: 9DZ0CO5LmDxK ORIGINATING/MYNETS [127.0.0.1] <bbbb@mydomain.com> -> <aaaa@mydomain.com>
Jul  9 17:51:06 mail clamd[2649]: SelfCheck: Database status OK.
Jul  9 17:51:06 mail amavis[19793]: (19793-15) Checking: 9_YNk6W7qsys ORIGINATING/MYNETS [127.0.0.1] <bbbb@mydomain.com> -> <mydomainadmin@mydomain.com>
Jul  9 17:51:07 mail postfix/10025/smtpd[41075]: connect from mail.mydomain.com[127.0.0.1]
Jul  9 17:51:07 mail postfix/10025/smtpd[41075]: 515379800154F: client=mail.mydomain.com[127.0.0.1]
Jul  9 17:51:07 mail postfix/cleanup[41065]: 515379800154F: message-id=<c1ef861d81420e129912a9c376b4b305@mydomain.com>
Jul  9 17:51:07 mail postfix/10025/smtpd[41076]: connect from mail.mydomain.com[127.0.0.1]
Jul  9 17:51:07 mail postfix/10025/smtpd[41076]: 54AE498001550: client=mail.mydomain.com[127.0.0.1]
Jul  9 17:51:07 mail postfix/cleanup[41079]: 54AE498001550: message-id=<c1ef861d81420e129912a9c376b4b305@mydomain.com>
Jul  9 17:51:07 mail opendmarc[1382]: 515379800154F: SPF(mailfrom): bbbb@mydomain.com pass
Jul  9 17:51:07 mail opendmarc[1382]: 515379800154F: mydomain.com pass
Jul  9 17:51:07 mail opendmarc[1382]: 54AE498001550: SPF(mailfrom): bbbb@mydomain.com pass
Jul  9 17:51:07 mail opendmarc[1382]: 54AE498001550: mydomain.com pass
Jul  9 17:51:07 mail postfix/10025/smtpd[41075]: disconnect from mail.mydomain.com[127.0.0.1]
Jul  9 17:51:07 mail postfix/qmgr[2054]: 515379800154F: from=<bbbb@mydomain.com>, size=4001, nrcpt=1 (queue active)
Jul  9 17:51:07 mail amavis[19793]: (19793-15) 9_YNk6W7qsys FWD from <bbbb@mydomain.com> -> <mydomainadmin@mydomain.com>, BODY=7BIT 250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 515379800154F
Jul  9 17:51:07 mail amavis[19793]: (19793-15) Passed CLEAN {RelayedInternal}, ORIGINATING/MYNETS LOCAL [127.0.0.1]:6130 <bbbb@mydomain.com> -> <mydomainadmin@mydomain.com>, Queue-ID: E9E6B9800154E, Message-ID: <c1ef861d81420e129912a9c376b4b305@mydomain.com>, mail_id: 9_YNk6W7qsys, Hits: 0.213, size: 3010, queued_as: 515379800154F, dkim_new=dkim:mydomain.com, 1367 ms, Tests: [ALL_TRUSTED=-1,SPF_PASS=-0.001,TVD_RCVD_SINGLE=1.213,URIBL_BLOCKED=0.001]
Jul  9 17:51:07 mail amavis[19793]: (19793-15) Passed CLEAN, <bbbb@mydomain.com> -> <mydomainadmin@mydomain.com>, Hits: 0.213, tag=2, tag2=6.2, kill=6.9, queued_as: 515379800154F, L/0/0/0
Jul  9 17:51:07 mail amavis[34781]: (34781-13) 9DZ0CO5LmDxK FWD from <bbbb@mydomain.com> -> <aaaa@mydomain.com>, BODY=7BIT 250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 54AE498001550
Jul  9 17:51:07 mail postfix/qmgr[2054]: 54AE498001550: from=<bbbb@mydomain.com>, size=3985, nrcpt=1 (queue active)
Jul  9 17:51:07 mail amavis[34781]: (34781-13) Passed CLEAN {RelayedInternal}, ORIGINATING/MYNETS LOCAL [127.0.0.1]:6130 <bbbb@mydomain.com> -> <aaaa@mydomain.com>, Queue-ID: E9E6B9800154E, Message-ID: <c1ef861d81420e129912a9c376b4b305@mydomain.com>, mail_id: 9DZ0CO5LmDxK, Hits: 0.213, size: 3010, queued_as: 54AE498001550, dkim_new=dkim:mydomain.com, 1387 ms, Tests: [ALL_TRUSTED=-1,SPF_PASS=-0.001,TVD_RCVD_SINGLE=1.213,URIBL_BLOCKED=0.001]
Jul  9 17:51:07 mail amavis[34781]: (34781-13) Passed CLEAN, <bbbb@mydomain.com> -> <aaaa@mydomain.com>, Hits: 0.213, tag=2, tag2=6.2, kill=6.9, queued_as: 54AE498001550, L/0/0/0
Jul  9 17:51:07 mail postfix/10025/smtpd[41076]: disconnect from mail.mydomain.com[127.0.0.1]
Jul  9 17:51:07 mail postfix/amavis/smtp[41070]: E9E6B9800154E: to=<mydomainadmin@mydomain.com>, relay=127.0.0.1[127.0.0.1]:10026, delay=1.6, delays=0.13/0.03/0/1.4, 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 515379800154F)
Jul  9 17:51:07 mail postfix/amavis/smtp[41067]: E9E6B9800154E: to=<aaaa@mydomain.com>, relay=127.0.0.1[127.0.0.1]:10026, delay=1.6, delays=0.13/0.02/0/1.4, 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 54AE498001550)
Jul  9 17:51:07 mail postfix/qmgr[2054]: E9E6B9800154E: removed
Jul  9 17:51:07 mail postfix/pipe[41080]: 515379800154F: to=<mydomainadmin@mydomain.com>, relay=dovecot, delay=0.29, delays=0.13/0.02/0/0.14, dsn=2.0.0, status=sent (delivered via dovecot service)
Jul  9 17:51:07 mail postfix/qmgr[2054]: 515379800154F: removed
Jul  9 17:51:07 mail postfix/pipe[41081]: 54AE498001550: to=<aaaa@mydomain.com>, relay=dovecot, delay=0.29, delays=0.13/0.01/0/0.15, dsn=2.0.0, status=sent (delivered via dovecot service)
Jul  9 17:51:07 mail postfix/qmgr[2054]: 54AE498001550: removed

回复: Bad search filter

rain6966 写道:

Jul  9 17:51:02 mail roundcube: <pij0jmsk> C: (Without VLV) Setting a filter of (&(=*aaaa*))

这里 roundcube 没有加上 ldap attribute name。

回复: Bad search filter

版大, 感謝回覆.

不過 "这里 roundcube 没有加上 ldap attribute name" , 我實在不知如何加.

今天再 try 了一下  webmail :
1).
在收件者欄位, 直接key 收件帳號 "a" , 會自動出現 "aaaaa<aaaaa@mydomain.com> "的帳號,選擇自動出現的帳號,寄出信件.
則 log 有異常的, 如下面的 "異常的log"
2).
在收件者欄位 , 是經由左邊 "Global LDAP Adress Book" 選出 "aaaaa" 收件者,寄出信件.
則 log 是正常 , 如最下面"正常log".

3).
a).第7888 和7948 行 , 異常log 為 6 , 正常 log 為 8.

b).config.inc.php 最後一行 ,註解掉
//$config['autocomplete_addressbooks'] = array('sql', 'global_ldap_abook');
log 是正常 ,但key 帳號時不會出現 帳號全名, 須自己整個key才行.

c). 第7884 , 7944  出現不一樣的 欄位
7884  scope [sub] with filter [(&(&(enabledService=mail)...
7944 scope [sub] with filter [(&(enabledService=mail)....

以上是測試結果, 不過還是沒解決.

感謝.


PS:
這是異常log

7880-Jul 10 17:44:40 mail roundcube: <n7te3lf6> C: Connect [127.0.0.1:389]
7881-Jul 10 17:44:40 mail roundcube: <n7te3lf6> S: OK
7882-Jul 10 17:44:40 mail roundcube: <n7te3lf6> C: Bind [dn: mail=bbbbb@mydomain.com,ou=Users,domainName=mydomain.com,o=domains,dc=mydomain,dc=com]
7883-Jul 10 17:44:40 mail roundcube: <n7te3lf6> S: OK
7884-Jul 10 17:44:40 mail roundcube: <n7te3lf6> C: Search base dn: [domainName=mydomain.com,o=domains,dc=mydomain,dc=com] scope [sub] with filter [(&(&(enabledService=mail)(enabledService=deliver)(enabledService=displayedInGlobalAddressBook)(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))(|(cn=*a*)(givenname=*a*)(sn=*a*)(mail=*a*)))]
7885-Jul 10 17:44:40 mail roundcube: <n7te3lf6> Using function ldap_search on scope sub ($ns_function is ldap_search)
7886-Jul 10 17:44:40 mail roundcube: <n7te3lf6> C: (Without VLV) Setting a filter of (&(&(enabledService=mail)(enabledService=deliver)(enabledService=displayedInGlobalAddressBook)(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))(|(cn=*a*)(givenname=*a*)(sn=*a*)(mail=*a*)))
7887-Jul 10 17:44:40 mail roundcube: <n7te3lf6> Executing search with return attributes: array (#012  0 => 'cn',#012  1 => 'sn',#012  2 => 'givenname',#012  3 => 'title',#012  4 => 'mail',#012  5 => 'telephonenumber',#012  6 => 'mobile',#012  7 => 'facsimiletelephonenumber',#012  8 => 'street',#012  9 => 'postalcode',#012  10 => 'l',#012  11 => 'departmentnumber',#012  12 => 'description',#012  13 => 'jpegphoto',#012  14 => 'objectClass',#012  15 => 'cn',#01 2)
7888-Jul 10 17:44:40 mail roundcube: <n7te3lf6> S: 6 record(s) found
7889-Jul 10 17:44:40 mail roundcube: <n7te3lf6> C: Search base dn: [domainName=mydomain.com,o=domains,dc=mydomain,dc=com] scope [] with filter [(&(=*a*))]
7890-Jul 10 17:44:40 mail roundcube: <n7te3lf6> Using function ldap_list on scope  ($ns_function is ldap_read)
7891-Jul 10 17:44:40 mail roundcube: <n7te3lf6> C: (Without VLV) Setting a filter of (&(=*a*))
7892-Jul 10 17:44:40 mail roundcube: <n7te3lf6> Executing search with return attributes: array (#012  0 => 'dn',#012  1 => 'objectClass',#012  2 => NULL,#012  3 => 'mail',#012)
7893:Jul 10 17:44:40 mail roundcube: <n7te3lf6> PHP Error: LDAP: ldap_list failed for dn=domainName=mydomain.com,o=domains,dc=mydomain,dc=com. Bad search filter (POST /mail/?_task=mail&_action=autocomplete)
7894-Jul 10 17:44:40 mail journal: ool www: <n7te3lf6> C: Close

這是正常 log

7940-Jul 10 17:45:26 mail roundcube: <n7te3lf6> C: Connect [127.0.0.1:389]
7941-Jul 10 17:45:26 mail roundcube: <n7te3lf6> S: OK
7942-Jul 10 17:45:26 mail roundcube: <n7te3lf6> C: Bind [dn: mail=bbbbb@mydomain.com,ou=Users,domainName=mydomain.com,o=domains,dc=mydomain,dc=com]
7943-Jul 10 17:45:26 mail roundcube: <n7te3lf6> S: OK
7944-Jul 10 17:45:26 mail roundcube: <n7te3lf6> C: Search base dn: [domainName=mydomain.com,o=domains,dc=mydomain,dc=com] scope [sub] with filter [(&(enabledService=mail)(enabledService=deliver)(enabledService=displayedInGlobalAddressBook)(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))]
7945-Jul 10 17:45:26 mail roundcube: <n7te3lf6> Using function ldap_search on scope sub ($ns_function is ldap_search)
7946-Jul 10 17:45:26 mail roundcube: <n7te3lf6> C: (Without VLV) Setting a filter of (&(enabledService=mail)(enabledService=deliver)(enabledService=displayedInGlobalAddressBook)(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))
7947-Jul 10 17:45:26 mail roundcube: <n7te3lf6> Executing search with return attributes: array (#012  0 => 'cn',#012  1 => 'sn',#012  2 => 'givenname',#012  3 => 'title',#012  4 => 'mail',#012  5 => 'telephonenumber',#012  6 => 'mobile',#012  7 => 'facsimiletelephonenumber',#012  8 => 'street',#012  9 => 'postalcode',#012  10 => 'l',#012  11 => 'departmentnumber',#012  12 => 'description',#012  13 => 'jpegphoto',#012  14 => 'objectClass',#012  15 => 'cn',#01 2)
7948-Jul 10 17:45:26 mail roundcube: <n7te3lf6> S: 8 record(s) found
7949-Jul 10 17:45:26 mail journal: ool www: <n7te3lf6> C: Close
7950-Jul 10 17:45:26 mail roundcube: <n7te3lf6> C: Connect [127.0.0.1:389]
7951-Jul 10 17:45:26 mail roundcube: <n7te3lf6> S: OK
7952-Jul 10 17:45:26 mail roundcube: <n7te3lf6> C: Bind [dn: mail=bbbbb@mydomain.com,ou=Users,domainName=mydomain.com,o=domains,dc=mydomain,dc=com]
7953-Jul 10 17:45:26 mail roundcube: <n7te3lf6> S: OK
7954-Jul 10 17:45:26 mail roundcube: <n7te3lf6> C: Search base dn: [domainName=mydomain.com,o=domains,dc=mydomain,dc=com] scope [sub] with filter [(&(enabledService=mail)(enabledService=deliver)(enabledService=displayedInGlobalAddressBook)(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))]
7955-Jul 10 17:45:26 mail roundcube: <n7te3lf6> Using function ldap_search on scope sub ($ns_function is ldap_search)
7956-Jul 10 17:45:26 mail roundcube: <n7te3lf6> C: (Without VLV) Setting a filter of (&(enabledService=mail)(enabledService=deliver)(enabledService=displayedInGlobalAddressBook)(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))
7957-Jul 10 17:45:26 mail roundcube: <n7te3lf6> Executing search with return attributes: array (#012  0 => 'cn',#012  1 => 'sn',#012  2 => 'givenname',#012  3 => 'title',#012  4 => 'mail',#012  5 => 'telephonenumber',#012  6 => 'mobile',#012  7 => 'facsimiletelephonenumber',#012  8 => 'street',#012  9 => 'postalcode',#012  10 => 'l',#012  11 => 'departmentnumber',#012  12 => 'description',#012  13 => 'jpegphoto',#012  14 => 'objectClass',#012  15 => 'cn',#01 2)
7958-Jul 10 17:45:26 mail roundcube: <n7te3lf6> S: 8 record(s) found