{
  "id": "fetchmail",
  "name": "Fetchmail",
  "homepage": "https://www.fetchmail.info/",
  "description": "Client for fetching mail from POP, IMAP, ETRN or ODMR-capable servers",
  "executables": [
    "fetchmail",
    "fetchmailconf"
  ],
  "platforms": [
    "macos",
    "linux"
  ],
  "dotfiles": {
    "paths": [],
    "secret": [
      "~/.fetchmailrc"
    ]
  },
  "commands": {
    "format": 1,
    "label": "Fetch mail",
    "description": "Run fetchmail once against a server, or check for waiting mail. Daemon mode, SMTP/MDA delivery and TLS tuning options are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "manual",
        "kind": "manual",
        "url": "https://manpages.debian.org/unstable/fetchmail/fetchmail.1.en.html",
        "revision": "debian unstable 2026-10-27",
        "evidence": "  -c | --check\n  -s | --silent\n  -v | --verbose\n  (-v -v) causes extra diagnostic information to be printed.\n  -a | --all | (since v6.3.3)\n    --fetchall\n  -k | --keep\n  -K | --nokeep\n  -p <proto> | --proto\n    <proto> | --protocol <proto>\n  AUTO POP2 POP3 APOP RPOP KPOP SDPS IMAP ETRN ODMR\n  -t <seconds> | --timeout\n    <seconds>\n  -r <name> | --folder\n    <name>\n  --ssl\n  -u <name> | --user\n    <name> | --username <name>\n  -f <pathname> |\n    --fetchmailrc <pathname>\n"
      }
    ],
    "field": [
      {
        "id": "check",
        "label": "Check only",
        "description": "Report whether mail is waiting without fetching or deleting it.",
        "type": "boolean",
        "option": [
          "--check",
          "-c"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "verbose",
        "label": "Verbose",
        "type": "count",
        "option": [
          "--verbose",
          "-v"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "silent",
        "label": "Silent",
        "type": "boolean",
        "option": [
          "--silent",
          "-s"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "all",
        "label": "Fetch old and new",
        "type": "boolean",
        "option": [
          "--all",
          "-a"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "keep",
        "label": "Keep on server",
        "type": "boolean",
        "option": [
          "--keep",
          "-k"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "nokeep",
        "label": "Delete from server",
        "type": "boolean",
        "option": [
          "--nokeep",
          "-K"
        ],
        "effect": "delete",
        "sources": [
          "manual"
        ]
      },
      {
        "id": "proto",
        "label": "Protocol",
        "type": "enum",
        "option": [
          "--protocol",
          "--proto",
          "-p"
        ],
        "choices": [
          {
            "value": "AUTO",
            "label": "Auto"
          },
          {
            "value": "POP2",
            "label": "POP2"
          },
          {
            "value": "POP3",
            "label": "POP3"
          },
          {
            "value": "APOP",
            "label": "APOP"
          },
          {
            "value": "RPOP",
            "label": "RPOP"
          },
          {
            "value": "KPOP",
            "label": "KPOP"
          },
          {
            "value": "SDPS",
            "label": "SDPS"
          },
          {
            "value": "IMAP",
            "label": "IMAP"
          },
          {
            "value": "ETRN",
            "label": "ETRN"
          },
          {
            "value": "ODMR",
            "label": "ODMR"
          }
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "user",
        "label": "User name",
        "type": "string",
        "option": [
          "--username",
          "--user",
          "-u"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "folder",
        "label": "Folder",
        "type": "string",
        "option": [
          "--folder",
          "-r"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "ssl",
        "label": "Use SSL/TLS",
        "type": "boolean",
        "option": [
          "--ssl"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "timeout",
        "label": "Timeout (seconds)",
        "type": "integer",
        "option": [
          "--timeout",
          "-t"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "rcfile",
        "label": "Run control file",
        "type": "path",
        "option": [
          "--fetchmailrc",
          "-f"
        ],
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "manual"
        ]
      },
      {
        "id": "server",
        "label": "Server",
        "type": "string",
        "position": 0,
        "sources": [
          "manual"
        ]
      }
    ],
    "task": [
      {
        "id": "check",
        "label": "Check for waiting mail",
        "set": {
          "check": [
            true
          ]
        },
        "lock": [
          "check"
        ],
        "fields": [
          "check",
          "server",
          "proto",
          "user",
          "ssl",
          "verbose",
          "rcfile"
        ],
        "required": []
      },
      {
        "id": "fetch-keep",
        "label": "Fetch and keep on server",
        "set": {
          "keep": [
            true
          ]
        },
        "lock": [
          "keep"
        ],
        "fields": [
          "keep",
          "server",
          "proto",
          "user",
          "ssl",
          "folder",
          "all",
          "verbose",
          "rcfile"
        ],
        "required": [
          "server"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "server",
          "proto",
          "user",
          "ssl",
          "check",
          "keep",
          "verbose"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "nokeep",
          "all",
          "folder",
          "silent",
          "timeout",
          "rcfile"
        ]
      }
    ]
  }
}
