您需要一个像fetchmail或 getmail 这样的工具。他们通过 POP/IMAP 接收邮件并将其插入本地邮件系统。
您可以将 fetchmail 与配置文件一起使用,通常.fetchmailrc这样调用:
poll mail.example.com protocol pop3:
username "admin" password "dir3cti0n" is "squire" here;
username "fore" password "0rd3r" is "foreman" here;
Run Code Online (Sandbox Code Playgroud)
这里is squire进行从远程地址到本地地址的映射。
(从这里提取的示例)