你指的应该是 fetchmail(一个从远程邮箱拉取邮件到本地的命令行工具)。下面是在 Debian 上安装和使用的基本步骤:
以 root 或具有 sudo 权限的用户执行:
sudo apt update
sudo apt install fetchmail
安装完成后可检查版本:
fetchmail -V
fetchmail 的配置文件通常是:
/etc/fetchmailrc~/.fetchmailrc推荐用用户配置(更安全)
nano ~/.fetchmailrc
示例(POP3 / IMAP):
poll mail.example.com
protocol IMAP
user "yourname@example.com"
password "yourpassword"
ssl
keep
poll pop.example.com
protocol POP3
user "yourname@example.com"
password "yourpassword"
ssl
keep
keep表示不在服务器上删除邮件
不使用keep会下载后删除
设置权限(必须):
chmod 600 ~/.fetchmailrc
手动运行一次:
fetchmail -v
后台常驻(每 300 秒检查一次):
fetchmail -d 300
停止:
fetchmail --quit
fetchmail 只是“拉邮件”,通常需要:
postfix / exim / sendmail 来投送procmail / maildrop例如安装 postfix:
sudo apt install postfix
sslcertck 或 no sslcertck600fetchmail -v --nodaemon
如果你说的是 fetchdebian(某个特定项目/脚本),请告诉我具体来源或用途,我可以进一步说明。