fetchmail 和 SSL 证书错误

fetchmail 和 SSL 证书错误

我在 Mac OS 10.6.8 上配置邮件客户端时遇到问题。这些是我所做的步骤:

# touch ~/.fetchmailrc

我编辑了文件并创建了内容:

poll pop.gmail.com with proto POP3 and options no dns
user '[email protected]' there with password 'GMAIL_PASSWORD' is 'LOCAL_USERNAME'            
here and wants mda "/usr/bin/procmail -d %T"  options ssl keep sslcertck sslcertpath 
"/Users/LOCAL_USERNAME/.ssl/certs"  

然后我执行了:

# chmod 710 ~/.fetchmailrc

我从这里复制了证书http://af-design.com/blog/2010/04/28/using-linux-fetchmail-with-gmail/进入目录~/.ssl/certs/并发出以下命令:

# ls ~/.ssl/certs/

    equifax.pem    gmail.pem   imap.gmail.pem

# c_rehash ~/.ssl/certs/

这会在目录中生成以下文件~/.ssl/certs

17974aab.0     578d5c04.0     b627f838.0     equifax.pem    gmail.pem      
imap.gmail.pem

看来我的选择是正确的,因为我没有收到任何投诉。最后我运行了命令:

# fetchmail -v

并得到错误:

fetchmail: 6.3.11 querying pop.gmail.com (protocol POP3) at Thu, 03 May 2012 16:41:02    +0200 (CEST): poll started
Trying to connect to 173.194.67.108/995...connected.
fetchmail: Server certificate verification error: unable to get local issuer certificate
fetchmail: Certificate/fingerprint verification was somehow skipped!
fetchmail: SSL connection failed.
fetchmail: socket error while fetching from [email protected]@pop.gmail.com
fetchmail: 6.3.11 querying pop.gmail.com (protocol POP3) at Thu, 03 May 2012 16:41:02 +0200 (CEST): poll completed
fetchmail: Query status=2 (SOCKET)
fetchmail: normal termination, status 2

我尝试按照某些论坛的建议进行操作,例如修改用户名或类似的操作,但没有帮助。

任何帮助表示赞赏。

答案1

根据你应该去你的~/.ssl/certs并且:

wget -O Equifax_Secure_Certificate_Authority.pem  https://www.geotrust.com/resources/root_certificates/certificates/Equifax_Secure_Certificate_Authority.cer

那么你必须运行以下行:

  c_rehash ~/.ssl/certs

那么 fechmail -v不应该给出服务器证书验证错误

相关内容