Discussion:
[bug-mailutils] mail doesn't list messages
Giorgos Anastasiou
2014-04-18 10:09:59 UTC
Permalink
Hello,

I am trying to use mailutils for local mail delivery in a gentoo server.
I used to have installed bsd-mailx for the same purpose. I thought that
mail is used the same way as the equivalent software bsd-mailx.
If i run /mail/ then i get No mail for user, but i can see in the spool
that there are email in the spooler(/var/mail/$USER). Do i have to
configure anything else?

My configuration is the following:

/poseidon ~ # mu --show-config-options//
//VERSION=2.99.98 - Version of this package//
//SYSCONFDIR=/etc - System configuration directory//
//MAILSPOOLDIR=/var/spool/mail/ - Default mail spool directory//
//SCHEME=mbox - Default mailbox type//
//LOG_FACILITY=mail - Default syslog facility//
//IPV6 - IPv6 support//
//USE_LIBPAM - PAM support//
//HAVE_LIBLTDL - a portable `dlopen' wrapper library//
//WITH_BDB - Berkeley DB//
//WITH_GDBM - GNU DBM//
//WITH_GNUTLS - TLS support using GNU TLS//
//WITH_PTHREAD - Support for POSIX threads//
//WITH_READLINE - GNU Readline//
//HAVE_MYSQL - MySQL//
//WITH_LDAP//
//WITH_LIBWRAP - Support for TCP wrappers//
//ENABLE_VIRTUAL_DOMAINS - Support for virtual mail domains//
//ENABLE_IMAP - IMAP4 protocol support//
//ENABLE_POP - POP3 protocol support//
//ENABLE_MH - MH mail storage support//
//ENABLE_MAILDIR - Maildir mail storage support//
//ENABLE_SMTP - SMTP protocol support//
//ENABLE_SENDMAIL - Sendmail command line interface support//
/
Any suggestion why mail doesn't show me the mails from
/var/spool/mail/$USER?
/
/Thanks in advance
Eray Aslan
2014-04-18 10:19:39 UTC
Permalink
Post by Giorgos Anastasiou
If i run /mail/ then i get No mail for user, but i can see in the spool
that there are email in the spooler(/var/mail/$USER).
which means that mail is looking at a different spool. Check the config
files at /etc/mailutils.rc and /etc/mailutils.d/*
--
Eray
Giorgos Anastasiou
2014-04-18 12:29:40 UTC
Permalink
Thanks for your reply.
I have checked /etc/mailutils.rc and /etc/mailutils.d, and after
commented out all the options still i cannot see the messages.
For a user, which belongs to mail group, using mail -f /var/mail/$USER,
i can see the messages.
For root using mail -f /var/mail/root gives the following output:

//var/mail/root: 0 messages/

Of course there are messages for both users.
I thought mail uses $MAIL variable to check for messages by default, so
i can skip using -f /path/to/mbox.
Post by Eray Aslan
Post by Giorgos Anastasiou
If i run /mail/ then i get No mail for user, but i can see in the spool
that there are email in the spooler(/var/mail/$USER).
which means that mail is looking at a different spool. Check the config
files at /etc/mailutils.rc and /etc/mailutils.d/*
Sergey Poznyakoff
2014-04-18 13:22:20 UTC
Permalink
Hi Giorgos,
Did you run this command as root, or as another user?
Post by Giorgos Anastasiou
//var/mail/root: 0 messages/
What are these slashes at the beginning and end of each output line?
Are they really displayed on your screen or do you add them manually
for some purpose?
Post by Giorgos Anastasiou
For a user, which belongs to mail group, using mail -f
/var/mail/$USER, i can see the messages.
What is the owner/group and permissions on that file?

Regards,
Sergey
Αναστασίου Γεώργιος
2015-08-06 06:04:35 UTC
Permalink
Hello again,
Can someone please help with that?
*mailutils-config
--infoVERSION=2.99.98SYSCONFDIR=/etcMAILSPOOLDIR=/var/spool/mail/SCHEME=mboxLOG_FACILITY=mailIPV6USE_LIBPAMHAVE_LIBLTDLWITH_BDBWITH_GDBMWITH_GNUTLSWITH_PTHREADWITH_READLINEHAVE_MYSQLWITH_LDAPWITH_LIBWRAPENABLE_VIRTUAL_DOMAINSENABLE_IMAPENABLE_POPENABLE_MHENABLE_MAILDIRENABLE_SMTPENABLE_SENDMAIL*
Tried with mailx package instead and i didn't have any issue.




*mail -f /var/spool/mail/root/var/spool/mail/root: 0 messages*
And the file has messages.




*ls -l /var/spool/mail/root -rw-rw---- 1 root mail 142196 Aug 6 08:51
/var/spool/mail/root*
Is there any way to run it in debug mode?

Thanks,
Hi Giorgos,
Did you run this command as root, or as another user?
Post by Giorgos Anastasiou
//var/mail/root: 0 messages/
What are these slashes at the beginning and end of each output line?
Are they really displayed on your screen or do you add them manually
for some purpose?
Post by Giorgos Anastasiou
For a user, which belongs to mail group, using mail -f
/var/mail/$USER, i can see the messages.
What is the owner/group and permissions on that file?
Regards,
Sergey
Loading...