3

After being able to retrieve emails from an IMAP account on a remote mail server using fetchmail and POSTFIX as an MTA, I am able to see the emails in the spool folder /var/spool/mail/ghassan in a text file which is called "ghassan". Upon opening mutt I get a note that says

"/var/spool/mail/ghassan" is not a mailbox.

Any ideas what the reason behind that could be?

How should I proceed

Content of .muttrc looks like this:

set realname=ghassan
set from [email protected]
set use_from = yes
set envelope_from = "yes"
set sendmail="/usr/bin/Postfix"

set spoolfile = /var/spool/mail/ghassan

set folder = "~/Mail"
set record = "+sent"
set postponed = "+postponed"

Contents of .procmailrc is the following:

#Environment variable assignments

PATH=/bin:/usr/bin:/usr/local/bin
VERBOSE=off
MAILDIR=$HOME/Mail
LOGFILE=$HOME/.procmaillog

#Recipes
:0:
* ^TOmutt-user
mutt

ls -ld /var/spool/mail/ghassan returns the following:

-rw-rw---- 1 ghassan mail 27556 Apr 16 12:46 /var/spool/mail/ghassan

while head -1 /var/spool/mail/ghassan does not return anything.

9
  • It would probably help to post your config file (~/.muttrc)? Also, what OS/distribution, please? Commented Apr 15, 2015 at 11:46
  • thanks for your comment i just posted the contents of muttrc Commented Apr 15, 2015 at 12:16
  • What's the output of file /var/spool/mail/myname? Commented Apr 15, 2015 at 12:42
  • /var/spool/mail/myname vs /var/spool/mail/ghassan, what is the correct path? Commented Apr 15, 2015 at 12:45
  • the output is basically the content of the text file called "ghassan" when i view it using nano it shows me the emails, but mutt remains empty wit a blank screen and says that it is not a mailbox... Commented Apr 15, 2015 at 12:58

1 Answer 1

0

This is a problem:

head -1 /var/spool/mail/ghassan does not return anything.

The first line of /var/spool/mail/ghassan must be one that starts with From (that's the word From followed by a space, not a colon) and looks a little like this:

From [email protected] Mon Apr 20 09:48:02 2015

You may find that this is the second or third line in the file; delete the leading blank lines from the spool file and try again. (If you're concerned about doing this and destroying the mailbox, run cp -p /var/spool/mail/ghassan "$HOME/mbox.ghassan" first.)

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.