Не может открыть почтовый ящик/var/mail / <пользователь>: Разрешение отклонено

Почему я не могу считать почту с mail команда?

(Существует почти наверняка проблема с mail-stack-delivery конфигурация, также postfix или dovecot, или оба, но я должен все еще смочь, по крайней мере, считать, что нет никакой почты от CLI.)

thufir@mordor:~$ 
thufir@mordor:~$ ls -l /var/mail
total 0
thufir@mordor:~$ 

много посторонней детали для следования:

thufir@mordor:~$ 
thufir@mordor:~$ swaks --to thufir@localhost
=== Trying localhost:25...
=== Connected to localhost.
<-  220 mordor.bounceme.net ESMTP Postfix (Ubuntu)
 -> EHLO mordor.bounceme.net
<-  250-mordor.bounceme.net
<-  250-PIPELINING
<-  250-SIZE 10240000
<-  250-VRFY
<-  250-ETRN
<-  250-STARTTLS
<-  250-ENHANCEDSTATUSCODES
<-  250-8BITMIME
<-  250 DSN
 -> MAIL FROM:<thufir@mordor.bounceme.net>
<-  250 2.1.0 Ok
 -> RCPT TO:<thufir@localhost>
<-  250 2.1.5 Ok
 -> DATA
<-  354 End data with <CR><LF>.<CR><LF>
 -> Date: Tue, 16 Feb 2016 05:01:02 -0800
 -> To: thufir@localhost
 -> From: thufir@mordor.bounceme.net
 -> Subject: test Tue, 16 Feb 2016 05:01:02 -0800
 -> X-Mailer: swaks v20130209.0 jetmore.org/john/code/swaks/
 -> 
 -> This is a test mailing
 -> 
 -> .
<-  250 2.0.0 Ok: queued as 305E2540242
 -> QUIT
<-  221 2.0.0 Bye
=== Connection closed with remote host.
thufir@mordor:~$ 
thufir@mordor:~$ mail
Cannot open mailbox /var/mail/thufir: Permission denied
No mail for thufir
thufir@mordor:~$ 
thufir@mordor:~$ ll /var/mail/
total 8
drwxrwsr-x  2 root mail 4096 Oct 21 08:49 ./
drwxr-xr-x 13 root root 4096 Oct 21 09:07 ../
thufir@mordor:~$ 
thufir@mordor:~$ sudo apt-get install mailutils
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mailutils is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 145 not upgraded.
thufir@mordor:~$ 

почтовые журналы:

thufir@mordor:~$ 
thufir@mordor:~$ tail /var/log/mail.err 
Feb 16 04:08:02 mordor postfix/sendmail[12090]: fatal: open /etc/postfix/main.cf: No such file or directory
thufir@mordor:~$ 
thufir@mordor:~$ tail /var/log/mail.log 
Feb 16 04:59:42 mordor postfix/qmgr[17837]: 9717754023A: from=<thufir@mordor.bounceme.net>, size=475, nrcpt=1 (queue active)
Feb 16 04:59:42 mordor postfix/local[19239]: 9717754023A: to=<thufir@localhost>, relay=local, delay=0.28, delays=0.2/0/0/0.08, dsn=4.3.0, status=deferred (temporary failure. Command output: lda(thufir,)Error: Error reading configuration: stat(/etc/dovecot/dovecot.conf) failed: No such file or directory lda: Fatal: Internal error occurred. Refer to server log for more information. )
Feb 16 05:01:02 mordor postfix/smtpd[19234]: connect from localhost[127.0.0.1]
Feb 16 05:01:02 mordor postfix/smtpd[19234]: 305E2540242: client=localhost[127.0.0.1]
Feb 16 05:01:02 mordor postfix/cleanup[19238]: 305E2540242: message-id=<20160216130102.305E2540242@mordor.bounceme.net>
Feb 16 05:01:02 mordor postfix/smtpd[19234]: disconnect from localhost[127.0.0.1]
Feb 16 05:01:02 mordor postfix/qmgr[17837]: 305E2540242: from=<thufir@mordor.bounceme.net>, size=475, nrcpt=1 (queue active)
Feb 16 05:01:02 mordor postfix/local[19239]: 305E2540242: to=<thufir@localhost>, relay=local, delay=0.22, delays=0.15/0/0/0.08, dsn=4.3.0, status=deferred (temporary failure. Command output: lda(thufir,)Error: Error reading configuration: stat(/etc/dovecot/dovecot.conf) failed: No such file or directory lda: Fatal: Internal error occurred. Refer to server log for more information. )
Feb 16 05:05:49 mordor postfix/qmgr[17837]: 9717754023A: from=<thufir@mordor.bounceme.net>, size=475, nrcpt=1 (queue active)
Feb 16 05:05:49 mordor postfix/local[19491]: 9717754023A: to=<thufir@localhost>, relay=local, delay=367, delays=367/0.04/0/0.05, dsn=4.3.0, status=deferred (temporary failure. Command output: lda(thufir,)Error: Error reading configuration: stat(/etc/dovecot/dovecot.conf) failed: No such file or directory lda: Fatal: Internal error occurred. Refer to server log for more information. )
thufir@mordor:~$ 

Для краткости я не буду включать postconf вывод, но doveconf шоу:

thufir@mordor:~$ 
thufir@mordor:~$ doveconf 
# 2.2.18: /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.8 (0c4ae064f307+)
doveconf: Fatal: open(/etc/dovecot/dovecot.conf) failed: No such file or directory
thufir@mordor:~$ 

Я хотел бы просто произвести чистку всего mail-stack-delivery пакет.

3
задан 13 April 2017 в 15:25

1 ответ

возможное решение:

thufir@mordor:~$ 
thufir@mordor:~$ sudo touch /var/mail/thufir
thufir@mordor:~$ sudo chown thufir:mail /var/mail/thufir
thufir@mordor:~$ sudo chmod o-r /var/mail/thufir
thufir@mordor:~$ sudo chmod g+rw /var/mail/thufir
thufir@mordor:~$ 
thufir@mordor:~$ mail
No mail for thufir
thufir@mordor:~$ 

тип GIYF зафиксируйте:

http://www.linuxquestions.org/questions/linux-server-73/cannot-open-mailbox-var-mail-user-permission-denied-no-mail-for-user-4175481439/

сообщение TBone

7
ответ дан 1 December 2019 в 13:24

Другие вопросы по тегам:

Похожие вопросы: