在 mutt 中查看收件箱

在 mutt 中查看收件箱

我已经安装了 fetchmail、procmail 和 mutt。我可以看到我的已发送邮件,但看不到我的收件箱。这是我的 ~/.muttrc 文件

# Boring details
set realname =Aparna

set from = [email protected]

set use_from = yes

set envelope_from ="yes"

set sendmail="/usr/bin/msmtp"


# If not set in environment variables:
set spoolfile = /var/spool/mail/aparna

#======================================================#
# Folders
set folder="~/Mail"                # Mailboxes in here

set record="+sent"                 # where to store sent messages

set postponed="+postponed"         # where to store draft messages

set move=no                        # Don't move mail from the spool.

#======================================================#
# Watch these mailboxes for new mail:
mailboxes ! +Fetchmail +slrn +mutt
set sort_browser=alpha    # Sort mailboxes by alpha(bet)

#======================================================#
# Order of headers and what to show
hdr_order Date: From: User-Agent: X-Mailer \
          To: Cc: Reply-To: Subject:
ignore *
unignore Date: From: User-Agent: X-Mailer  \
         To: Cc: Reply-To: Subject:

#======================================================#
# which editor do you want to use? 
# vim of course!
set editor="vim -c 'set tw=70 et' '+/^$' " 

set edit_headers          # See the headers when editing

#======================================================#
# Aliases

set sort_alias=alias     # sort aliases in alpha order by alias name

#======================================================#
# Odds and ends
set markers          # mark wrapped lines of text in the pager with a +

set smart_wrap       # Don't wrap mid-word

set pager_context=5  # Retain 5 lines of previous page when scrolling.

set status_on_top    # Status bar on top.

push <show-version>  # Shows mutt version at startup

macro index,pager I '<shell-escape> fetchmail -v<enter>'

 set mbox_type=Maildir



 macro index c "<change-folder>?<toggle-mailboxes>" "open a different folder"

 macro pager c "<change-folder>?<toggle-mailboxes>" "open a different folder"

set mbox_type=maildir

set mbox="~/mail/inbox/"

set spoolfile="~/mail/inbox/"

set folder="~/mail/"

set record="~/mail/sent/"

set postponed="~/mail/postponed/"

set editor="vim"

set include=ask-yes

set sendmail="/usr/sbin/ssmtp" 

我的 ~/.fetchmailrc 文件:

poll pop.gmail.com                   
with proto POP3                      
user '[email protected]'        
there with password '*'        
is 'Aparna Karuthodi' here                              
mda "/usr/bin/procmail -d %T"        
options                                                             
no keep                                 
ssl                                  
sslcertck                            
sslcertpath /home/aparna/.certs/

我的 ~/.promailrc 文件

PATH=/bin:/usr/bin:/usr/local/bin 
VERBOSE=off  
DEFAULT=/var/spool/mail/aparna    
MAILDIR=$HOME/mail            
LOGFILE=$HOME/.procmaillog  
# Recipes below this comment:

:0:
* ^TOmutt-user
mutt

答案1

我承认我的一位老导游正在这里使用:)。 mutt 通常会为您创建此文件,但您可以手动创建文件,然后设置正确的权限和所有者。首先创建文件:

sudo touch /var/spool/mail/aparna

然后设置正确的权限:

sudo chmod 660 /var/spool/mail/aparna

最后确保所有权正确:

sudo chown aparna:mail /var/spool/mail/aparna

测试一下ls,在我的系统上我看到以下内容:

andrew@ilium~$ ls -l /var/spool/mail/andrew
-rw-rw---- 1 andrew mail 30743 Jul 17 15:30 /var/spool/mail/andrew

使用时你会看到类似的内容:

ls -l /var/spool/mail/aparna

这应该足以让你开始......

相关内容