Centos服务器接收邮件方法

时间:2026-02-16 12:48:10

1、系统版本和内核

Centos服务器接收邮件方法

2、yum install epel-release 

Centos服务器接收邮件方法

3、安装getmail


yum -y install getmail

Centos服务器接收邮件方法

4、创建用户并设置密码

Centos服务器接收邮件方法

5、切换到getmail用户

创建配置文件、日志文件


mkdir ~/.getmail
touch ~/.getmail/log
touch ~/.getmail/getmailrc

Centos服务器接收邮件方法

6、编辑配置文件~/.getmail/getmailrc

verbose = 0


delete = true
message_log = ~/.getmail/log
message_log_verbose = true

[retriever]


type = SimplePOP3Retriever
server = pop.163.com
username = username //username 或 username@163.com,自行替换为163邮箱帐号即可
password = userpwd //163邮箱帐号的密码

[destination]


type = Maildir
path = ~jeffp/Maildir/

Centos服务器接收邮件方法

7、创建邮件保存目录


mkdir -p ~/Maildir/cur
mkdir -p ~/Maildir/new
mkdir -p ~/Maildir/tmp

Centos服务器接收邮件方法

8、收取邮件

getmail -v -n -r ~/.getmail/getmailrc

Centos服务器接收邮件方法

© 2026 途途旅游
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com