How to fix SMTP authen fail with error "curl_easy_perform: error(56)"
เมื่อไม่สามารถใช้งาน SMTP authenication บน Zimbra กับทุก user และทุกโปรแกรม และทำการตรวจสอบ error log ที่ไฟล์ /var/log/zimbra.log ได้พบ error ที่มีลักษณะดังนี้
Jul 28 16:34:05 server saslauthd[33294]: authentication against url ’ https://s1.ezymailhosting.com:7071/service/admin/soap’ caused error ‘curl_easy_perform: error(56): Received HTTP code 403 from proxy after CONNECT’
สาเหตุของปัญหา ระบบ Zimbra ไม่สามารถใช้ SMTP authenication กับทุก user และทุกโปรแกรม เกิดจากมีการกำหนดค่า proxy ไว้ในระดับ OS จึงทำให้ระบบไม่สามารถเชื่อมต่อไปยัง mailboxd service ที่ port 7071 ได้ วิธีการตรวจสอบปัญหา ทดสอบการเรียกใช้งาน mailbox service ที่ Port 7071 ด้วยคำสั่ง
[root@S1 ~]# wget -d --no-check-certificate https://s1.ezymailhosting.com:7071
หากผลลัพธ์ออกมา เป็น “Proxy tunneling failed: Method Not AllowedUnable to establish SSL connection.” ดังตัวอย่างด้านล่าง แสดงว่ามีการ set proxy ไว้ที่ระดับ OS จริง
---request end---
proxy responded with: [HTTP/1.1 405 Method Not Allowed
Date: Sun, 28 Jul 2013 16:36:20 GMT
Content-Length: 235
Connection: close
Content-Type: text/html; charset=iso-8859-1
X-Squid-Error: ERR_ACCESS_DENIED 0
X-Cache: MISS from proxy.ezymailhosting.com
X-Cache-Lookup: NONE from proxy.ezymailhosting.com:8080
Via: 1.0 proxy.ezymailhosting.com (squid/3.0.STABLE24)
Proxy-Connection: close
]
Proxy tunneling failed: Method Not AllowedUnable to establish SSL connection.
วิธีการแก้ไขปัญหา ให้ตรวจสอบที่ /opt/zimbra/.bashrc หรือ /etc/bashrc ว่ามี HTTPS_PROXY หรือ ALL_PROXY หรือไม่ ถ้าหากมีให้ลบออกทันที และทำการ restart saslauthd service ด้วยคำสั่ง
[root@S1 ~]# su - zimbra
[zimbra@S1 ~]$ zmsaslauthdctl restart