Linux command
fetchmail 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Fetch mail from server
fetchmail
Fetch from specific server
fetchmail [mail.example.com]
Keep messages on server
fetchmail -k
Check for mail only
fetchmail -c
Verbose output
fetchmail -v
Run as daemon
fetchmail -d [300]
Use specific config file
fetchmail -f [~/.fetchmailrc]
说明
fetchmail retrieves mail from remote servers and forwards it to the local mail system. It supports POP3, IMAP, ETRN, and ODMR protocols with SSL/TLS encryption. The tool is configured through ~/.fetchmailrc or command-line options. It can run as a daemon, periodically checking for new mail, and integrates with local MTAs.
参数
- -c, --check
- Check for mail only, don't fetch.
- -k, --keep
- Keep messages on server.
- -a, --all
- Fetch all messages (including seen).
- -d _seconds_
- Daemon mode with poll interval.
- -f _file_
- Use alternate config file.
- -u _user_
- Remote username.
- -p _proto_, --proto _proto_
- Protocol (auto, pop3, imap, etrn, odmr).
- --ssl
- Use implicit SSL/TLS (connect directly over encrypted channel).
- --sslproto _value_
- SSL/TLS protocol version and STARTTLS control. Recommended: tls1.2+.
- -v, --verbose
- Verbose output.
- -s, --silent
- Suppress progress messages.
- -q, --quit
- Kill running daemon.
- -l _maxbytes_, --limit _maxbytes_
- Skip messages larger than maxbytes.
- -r _folder_, --folder _folder_
- Retrieve from non-default mail folder (IMAP only).
- --idle
- Use IMAP IDLE for push notification of new mail.
FAQ
What is the fetchmail command used for?
fetchmail retrieves mail from remote servers and forwards it to the local mail system. It supports POP3, IMAP, ETRN, and ODMR protocols with SSL/TLS encryption. The tool is configured through ~/.fetchmailrc or command-line options. It can run as a daemon, periodically checking for new mail, and integrates with local MTAs.
How do I run a basic fetchmail example?
Run `fetchmail` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -c, --check do in fetchmail?
Check for mail only, don't fetch.