查看 github 并尝试使用他们的例子配置文件:
nicholas@mordor:~$
nicholas@mordor:~$ cat .config/getmail/getmail
[options]
verbose = 1
delete = false
message_log = ~/.getmail/log
message_log_verbose = true
read_all = false
[retriever]
type = SimpleIMAPSSLRetriever
server = imap.gmail.com
port = 993
username = [email protected]
password = xxx
#mailboxes = ("INBOX")
[destination]
type = Mboxrd
path = ~/GotMail/inbox
user = saunders
nicholas@mordor:~$
nicholas@mordor:~$ getmail
getmail version 6.18.4
Copyright (C) 1998-2021 Charles Cazabon and others. Licensed under GNU GPL version 2.
SimpleIMAPSSLRetriever:[email protected]@imap.gmail.com:993:
Configuration error: no such specified user ("getpwnam(): name not found: 'saunders'")
nicholas@mordor:~$
nicholas@mordor:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy
nicholas@mordor:~$
尝试 getmail 从 gmail 存档旧电子邮件。我尝试了服务器、端口和用户名的一些选项,但找不到有效的组合。
Pine 电子邮件客户端可以与 2FA 配合使用并使用应用程序密码,因此可以相当确定它是服务器名称、用户名或类似内容。日志为空。
也可以看看:
https://www.bytereef.org/howto/oauth2/getmail.html
他指定:
type = SimpleIMAPSSLRetriever
server = imap.gmail.com
username = [email protected]