Centos服务器接收邮件方法

2025-11-11 04:23:21

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服务器接收邮件方法

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢