之路 on it Road.com

配置mutt

  1. mutt 的配置文件位于每个用户的家目录中 ~/.muttrc 。
    下面是 .muttrc 文件的示例配置。
    这就是我们启动和运行 mutt 所需的全部内容。
# vi ~/.muttrc
# About Me
set from = "user@domain.com"
set realname = "Firstname Lastname"
# My credentials
set smtp_url = "smtp://user@domain.com@smtp.domain.com:587/"
set smtp_pass = "password"
set imap_user = "user@domain.com"
set imap_pass = "password"
# My mailboxes
set folder = "imaps://imap.domain.com:993"
set spoolfile = "+INBOX"

# Where to put the stuff
set header_cache = "~/.mutt/cache/headers"
set message_cachedir = "~/.mutt/cache/bodies"
set certificate_file = "~/.mutt/certificates"
# Etc
set mail_check = 30
set move = no
set imap_keepalive = 900
set sort = threads
set editor = "vim"
# GnuPG bootstrap
# source ~/.mutt/gpg.rc
  1. 配置完成后,创建缓存目录。
# mkdir -p ~/.mutt/cache
UNIX/Linux:如何安装和配置 mutt

Mutt以其快速且高度可配置的邮件客户端而闻名,并且由于它是基于文本的,因此非常适合通过SSH快速检查电子邮件。

检查确认

要验证一切设置是否正确,请从服务器发送测试电子邮件。

# echo "" | mutt -s "subject" -i body.txt -a attachment.txt recipient@example.com
-s used to specify subject of mail.
-i used to specify file containing message body.
-a used to specify attachment file.

mutt 的其他一些常用选项是:

-b used to add Bcc address.
-c used to add Cc address.
-e if you want to specify sender's address (something other than default).

安装mutt

mutt 可以通过 yum 实用程序安装,如下所示。

# yum install mutt
....

Installed size: 7.3 M
Is this ok [y/d/N]: y
日期:2020-09-17 00:13:40 来源:oir作者:oir