大网数据广告活动
服务器运维问答

Fetchmail does not use the indicated protocol

· 52CE 我爱测

I'm trying to setup fetchmail for download some mail from gmail using pop3. The problem, as you can see, is that fetchmail instead of use the pop protocol will use imap. For being sure to not have commit any error during the conf…

问题原文

原帖链接 · DottorBooom · CC BY-SA 4.0

I'm trying to setup fetchmail for download some mail from gmail using pop3. The problem, as you can see, is that fetchmail instead of use the pop protocol will use imap.

For being sure to not have commit any error during the configuration i will summarize the procedure:

  1. I edited the file called "fetchmail" in the folder /etc/default and set the variable demon to "yes";

  2. Now I created the configuration file "fetchmailrc" in the folder /etc. In this one I wrote:

    set postmaster "root"
    set daemon 600
    
    poll pop.gmail.com with proto POP3
        user '[email omitted]' there with password 'secretPWD' is root here options ssl
    
  3. And then i proceed with a test for see if it works using the command:"fetchmail -d0 -vk pop.gmail.com". The response of the command is as follows:

    fetchmail: 6.4.2 querying pop.gmail.com (protocol auto) at Mon Jul 12 12:43:41 2021: poll started
    fetchmail: 6.4.2 querying pop.gmail.com (protocol IMAP) at Mon Jul 12 12:43:41 2021: poll started
    Trying to connect to 173.194.69.109/143...connection failed.
    fetchmail: connection to pop.gmail.com:imap [173.194.69.109/143] failed: Connection timed out.
    Trying to connect to 173.194.69.108/143...connection failed.
    fetchmail: connection to pop.gmail.com:imap [173.194.69.108/143] failed: Connection timed out.
    Trying to connect to 2a00:1450:4013:c00::6c/143...connection failed.
    fetchmail: connection to pop.gmail.com:imap [2a00:1450:4013:c00::6c/143] failed: Network is unreachable.
    Trying to connect to 2a00:1450:4013:c00::6d/143...connection failed.
    fetchmail: connection to pop.gmail.com:imap [2a00:1450:4013:c00::6d/143] failed: Network is unreachable.
    fetchmail: Connection errors for this poll:
    name 0: connection to pop.gmail.com:imap [173.194.69.109/143] failed: Connection timed out.
    name 1: connection to pop.gmail.com:imap [173.194.69.108/143] failed: Connection timed out.
    name 2: connection to pop.gmail.com:imap [2a00:1450:4013:c00::6c/143] failed: Network is unreachable.
    name 3: connection to pop.gmail.com:imap [2a00:1450:4013:c00::6d/143] failed: Network is unreachable.
    IMAP connection to pop.gmail.com failed: Network is unreachable
    fetchmail: 6.4.2 querying pop.gmail.com (protocol IMAP) at Mon Jul 12 12:48:02 2021: poll                         completed
    fetchmail: 6.4.2 querying pop.gmail.com (protocol auto) at Mon Jul 12 12:48:02 2021: poll completed
    fetchmail: Query status=2 (SOCKET)
    fetchmail: normal termination, status 2
    

As I can assume, fetchmail is trying to force the imap protocol instead of pop. I can't understand at all why is doing something like that.

Maybe my low conoscence are made me missing something. Right now I'm working on the last version of Ubuntu server. Thank you very much for your attention and I'm sorry for my bad English.

P.S. I know that using the root account is discouraged, but for now I'm only doing some tries. When I will understand how to configure fetchmail the next step is to setup a compleat mail server using postfix, dovecot and fetchmail. Also, I already know the existence of getmail and his extreamly easy setup. But now I would like to understand the cause of this error.

已采纳解答

原帖链接 · Nobody · CC BY-SA 4.0

When you run fetchmail from the commandline, by default it will use the /.fetchmailrc file and nothing else.

To manually test the configuration file "fetchmailrc" in the folder /etc you need to use the -f <pathname> or --fetchmailrc <pathname> option.

In other words test with

fetchmail -d0 -vk --fetchmailrc /etc/fetchmailrc

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-07-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。