使用 CLI“邮件”命令

hey*_*ema 10 mail command-line sendmail 21.10

我觉得问这个问题有点傻……因为答案可能很简单……但是在 AU、Google 或 上搜索man mail,没有给我答案。

如果我开始mail,我会看到这个:

"/var/mail/al": 8 messages 8 unread
>U   1 root@al-Inspiron-7 Sun Nov 28 06:01 156/5409  Logwatch for al-Inspiron-
 U   2 root@al-Inspiron-7 Mon Nov 29 06:11 173/6447  Logwatch for al-Inspiron-
 U   3 root@al-Inspiron-7 Tue Nov 30 05:23 149/5261  Logwatch for al-Inspiron-
 U   4 root@al-Inspiron-7 Wed Dec  1 01:53 215/9228  Logwatch for al-Inspiron-
 U   5 root@al-Inspiron-7 Thu Dec  2 02:27 187/7610  Logwatch for al-Inspiron-
 U   6 root@al-Inspiron-7 Fri Dec  3 05:42 204/8129  Logwatch for al-Inspiron-
 U   7 root@al-Inspiron-7 Sat Dec  4 06:37 143/5074  Logwatch for al-Inspiron-
 U   8 root@al-Inspiron-7 Sun Dec  5 07:09 170/5922  Logwatch for al-Inspiron-
?
Run Code Online (Sandbox Code Playgroud)

读完第一条消息后,我得到以下信息:

? h
>R   1 root@al-Inspiron-7 Sun Nov 28 06:01 156/5409  Logwatch for al-Inspiron-
 U   2 root@al-Inspiron-7 Mon Nov 29 06:11 173/6447  Logwatch for al-Inspiron-
 U   3 root@al-Inspiron-7 Tue Nov 30 05:23 149/5261  Logwatch for al-Inspiron-
 U   4 root@al-Inspiron-7 Wed Dec  1 01:53 215/9228  Logwatch for al-Inspiron-
 U   5 root@al-Inspiron-7 Thu Dec  2 02:27 187/7610  Logwatch for al-Inspiron-
 U   6 root@al-Inspiron-7 Fri Dec  3 05:42 204/8129  Logwatch for al-Inspiron-
 U   7 root@al-Inspiron-7 Sat Dec  4 06:37 143/5074  Logwatch for al-Inspiron-
 U   8 root@al-Inspiron-7 Sun Dec  5 07:09 170/5922  Logwatch for al-Inspiron-
?
Run Code Online (Sandbox Code Playgroud)

如果我q退出mail并重新启动mail,我会看到以下内容:

? q
Saved 1 message in /home/al/mbox
Held 7 messages in /var/mail/al
al@al-Inspiron-7700-AIO:~$ mail
"/var/mail/al": 7 messages 7 unread
>U   1 root@al-Inspiron-7 Mon Nov 29 06:11 174/6491  Logwatch for al-Inspiron-
 U   2 root@al-Inspiron-7 Tue Nov 30 05:23 149/5261  Logwatch for al-Inspiron-
 U   3 root@al-Inspiron-7 Wed Dec  1 01:53 215/9228  Logwatch for al-Inspiron-
 U   4 root@al-Inspiron-7 Thu Dec  2 02:27 187/7610  Logwatch for al-Inspiron-
 U   5 root@al-Inspiron-7 Fri Dec  3 05:42 204/8129  Logwatch for al-Inspiron-
 U   6 root@al-Inspiron-7 Sat Dec  4 06:37 143/5074  Logwatch for al-Inspiron-
 U   7 root@al-Inspiron-7 Sun Dec  5 07:09 170/5922  Logwatch for al-Inspiron-
?
Run Code Online (Sandbox Code Playgroud)

我如何列出/阅读上一条消息#1(不再在列表中)?

hey*_*ema 7

我刚刚学到的...

Thunderbird 91.*.* (Ubuntu 21.10) 已删除 movemail 支持,因此对我的本地主机 mbox 的所有访问都消失了。请参阅Ubuntu 21.10 - Thunderbird 91.xx 删除 (movemail) mbox 支持!一些背景信息。

使用 CLI 时mail,读取消息后,读取的消息将从 /var/mail/al 移动到 /home/al/mbox。

如果我使用,mail -f /home/al/mbox我现在可以阅读以前阅读过的旧邮件。

如果我将 /home/al/mbox 符号链接到 /home/al/.thunderbird/kzn2n9g5.default/Mail/Local\ 文件夹,那么我可以使用 Thunderbird 读取它们。请阅读前面的链接以了解有关此内容的更多详细信息。

ln -s /home/al/mbox /home/al/.thunderbird/kzn2n9g5.default/Mail/Local\ Folders/mbox-home
Run Code Online (Sandbox Code Playgroud)

更新#1:

如果我使用内容创建 /home/al/.hidden ,mbox那么我就不必在 Nautilus 中查看 mbox 文件。