LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-07-2005, 10:00 AM   #1
acanton
Member
 
Registered: Jul 2004
Posts: 115

Rep: Reputation: 15
Mail does not work


Running Mepis 3.3 (final).

I installed exim. Restarted. It's running in the process table.

When I enter: mail al
I get the 'subject' and ability to type in mail fillowed by ctl-d.

When I enter: mail
I get "no mail for al'

Where is it going? Any idea how to fix this?

Thanks,
Al
 
Old 03-08-2005, 09:11 AM   #2
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
You might check to see if there is a /var/spool/mail/al file. That's al's mailbox. Subject to correction, I believe messages that have been retrieved from there but not deleted are stored in /home/al/mbox. So you might see if there's a file by that name, too.

If neither of those exists, I suspect the users of the mail system are not set up right.

You could try sending a message as root to root and checking in another console for it (ALT+CTL+F2 for example) as root. Even if al is not a correct user of the mail system, root should be. Then you could try sending a message as al to root and checking likewise. That should give you some clues--I hope.
 
Old 03-08-2005, 11:19 AM   #3
acanton
Member
 
Registered: Jul 2004
Posts: 115

Original Poster
Rep: Reputation: 15
There is a /var/spool/mail/al file but it is empty.

I did an su to root, sent root some mail and then checked it and it said:
No mail for root.

Somehow all mail is going to the bit-bucket and I can't figure out why!

Al
 
Old 03-08-2005, 12:12 PM   #4
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
When you checked mail for root, did you do it in an X session, or from another console (non-X)?

I always get the response "No mail for root" in X, but if I go to one of the six other consoles, and log in as root, I get the mail if there is any.

(I finally figured out a way to get mail for root in X session, just yesterday, by using the client mutt and specifying root's mailbox. But that's another story.)

You could also do this as root:

Code:
less /var/spool/mail/root
to see if there is anything in that mailbox.
 
Old 03-08-2005, 01:23 PM   #5
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
OK, by coincidence MY mail stopped getting delivered. It was fine yesterday. I did a Google search and quickly found the answer--and it might apply to your system, too.

I found out first that my mail was getting queued but not delivered. (It was not disappearing, just staying in the queue.) So I searched for that problem on Google and found that the default queue time for sendmail is one hour unless you tell it differently. The easy way to change it is to go into /etc/sysconfig/sendmail and change the line that says QUEUE=1h to QUEUE=3m or however many minutes you want (or you can even use s for seconds). Then do a service sendmail restart and you should be OK--if that was the problem, that is.

You might try it. It cured my problem and mail is delivered fast now.
 
Old 03-08-2005, 06:03 PM   #6
acanton
Member
 
Registered: Jul 2004
Posts: 115

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by jonr
When you checked mail for root, did you do it in an X session, or from another console (non-X)?

I always get the response "No mail for root" in X, but if I go to one of the six other consoles, and log in as root, I get the mail if there is any.

(I finally figured out a way to get mail for root in X session, just yesterday, by using the client mutt and specifying root's mailbox. But that's another story.)

You could also do this as root:

Code:
less /var/spool/mail/root
to see if there is anything in that mailbox.
I tried from both an su to root as well as an alt-ctl-F2 and login as root. There is no mail for root, nor for 'al'. Nothing. Nada. It's goin' to the bit bucket!

When I tried less /var/spool/mail/root I get

root@1[al]# less /var/spool/mail/root
/var/spool/mail/root: No such file or directory
root@1[al]#

Al
 
Old 03-08-2005, 06:43 PM   #7
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
Well, this is going to sound silly, perhaps--but I'd like to help solve your problem, and nobody else is coming forth with suggestions, so I suggest this:

Do
Code:
touch /var/spool/mail/root
touch /var/spool/mail/al
as root and send some test messages and see what happens.

Those mailboxes ought to exist even if they're completely empty, as far as I know. See what happens and report back...ok?
 
Old 03-08-2005, 07:17 PM   #8
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
Try this, too:

Go look in /var/log/mail. There should (may?) be three files: errors, info, and warnings. Take a look especially at the info file. It will show all the messages sent recently and their status. The status is shown at the very end of the long line about the message. It will show if it's "queued" or "sent" and you will also see lines showing "Message accepted for delivery".

The file also shows all the activity that took place regarding mail delivery, such as starting and restarting the daemon, etc.

If you see that messages were "accepted for delivery" but not "Stat=sent" then you know that those messages are sitting in a queue still waiting to be delivered.

Mine got freed up and delivered instantly once I changed the queue wait time from one hour (default) to three minutes as described earlier in the thread. All that activity is shown in the info log. So you might get a clue from looking at the log.

The "errors" and "warnings" logs seem less useful, but it wouldn't hurt to have a look at them, too.
 
Old 03-08-2005, 07:21 PM   #9
acanton
Member
 
Registered: Jul 2004
Posts: 115

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by jonr
Well, this is going to sound silly, perhaps--but I'd like to help solve your problem, and nobody else is coming forth with suggestions, so I suggest this:

Do
Code:
touch /var/spool/mail/root
touch /var/spool/mail/al
as root and send some test messages and see what happens.

Those mailboxes ought to exist even if they're completely empty, as far as I know. See what happens and report back...ok?
This is interesting:
al@1[~]$ ls -l /var/spool/mail
lrwxrwxrwx 1 root root 7 2005-02-28 16:17 /var/spool/mail -> ../mail

meannig this is symlink to /var/mail which only has ONE folder in it named 'al'.

Here is what I did... and still no mail!!
root@1[al]# cd /var/mail
root@1[mail]# touch root
root@1[mail]# ls
al root
root@1[mail]# ls -l
total 0
-rw-r--r-- 1 root root 0 2005-02-28 16:19 al
-rw-r--r-- 1 root root 0 2005-03-08 17:16 root
root@1[mail]# mail al
Subject: Test from root
this is a test
Cc:
root@1[mail]#
root@1[mail]# mail -u al
No mail for al
root@1[mail]# mail root
Subject: Test TO root
xxxxx
Cc:
root@1[mail]#
root@1[mail]# mail
No mail for root
root@1[mail]#
root@1[mail]# exit
exit
al@1[~]$ mail
No mail for al
al@1[~]$

Maybe this is user error? At the 'CC:' prompt I hit ctl-D. I've also tried the enter key as well. No matter. The mail is going to the bit bucket!

-Al
 
Old 03-08-2005, 07:31 PM   #10
acanton
Member
 
Registered: Jul 2004
Posts: 115

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by jonr
Try this, too:

Go look in /var/log/mail. There should (may?) be three files: errors, info, and warnings. Take a look especially at the info file. It will show all the messages sent recently and their status. The status is shown at the very end of the long line about the message. It will show if it's "queued" or "sent" and you will also see lines showing "Message accepted for delivery".

The file also shows all the activity that took place regarding mail delivery, such as starting and restarting the daemon, etc.

If you see that messages were "accepted for delivery" but not "Stat=sent" then you know that those messages are sitting in a queue still waiting to be delivered.

Mine got freed up and delivered instantly once I changed the queue wait time from one hour (default) to three minutes as described earlier in the thread. All that activity is shown in the info log. So you might get a clue from looking at the log.

The "errors" and "warnings" logs seem less useful, but it wouldn't hurt to have a look at them, too.
There was no /var/log/mail file.
There are 3 files in var/log but none of them had anything of inmportance.

It seems that exim4 is the 'real' mail program. But ther is a /var/log/exim4 directory.

root@1[exim4]# ls
mainlog mainlog.1 mainlog.2.gz mainlog.3.gz mainlog.4.gz mainlog.5.gz mainlog.6.gz
root@1[exim4]# ls -l
total 100
-rw-r----- 1 Debian-exim adm 32463 2005-03-08 17:17 mainlog
-rw-r----- 1 Debian-exim adm 48735 2005-03-08 06:09 mainlog.1
-rw-r----- 1 Debian-exim adm 1671 2005-03-08 06:25 mainlog.2.gz
-rw-r----- 1 Debian-exim adm 3402 2005-03-07 06:25 mainlog.3.gz
-rw-r----- 1 Debian-exim adm 3317 2005-03-06 06:25 mainlog.4.gz
-rw-r----- 1 Debian-exim adm 2153 2005-03-05 06:25 mainlog.5.gz
-rw-r----- 1 Debian-exim adm 2250 2005-03-04 06:25 mainlog.6.gz
root@1[exim4]# less mainlog


Does any of this make any sense. Thsi is from 'mainlog' above.

2005-03-08 15:51:02 1D8oTe-0002V5-KT <= clamav@mepis1 U=clamav P=local S=595
2005-03-08 15:51:02 1D8oTe-0002V5-KT == /var/mail/mail (root@mepis1) <clamav@mepis1> R=mail4root T=address_file defer (13):
Permission denied: creating lock file hitching post /var/mail/mail.lock.mepis1.422e3a66.00002591 (euid=8 egid=8)
2005-03-08 15:51:02 1D8oTe-0002V5-KT ** /var/mail/mail <root@mepis1>: retry timeout exceeded
2005-03-08 15:51:02 1D8oTe-0002V8-O3 <= <> R=1D8oTe-0002V5-KT U=Debian-exim P=local S=1559
2005-03-08 15:51:02 1D8oTe-0002V5-KT Completed
2005-03-08 15:51:02 1D8oTe-0002V8-O3 == /var/mail/mail (root@mepis1) <clamav@mepis1> R=mail4root T=address_file defer (13):
Permission denied: creating lock file hitching post /var/mail/mail.lock.mepis1.422e3a66.00002594 (euid=8 egid=8)
2005-03-08 15:51:02 1D8oTe-0002V8-O3 ** /var/mail/mail <root@mepis1>: retry timeout exceeded
2005-03-08 15:51:02 1D8oTe-0002V8-O3 /var/mail/mail <root@mepis1>: error ignored
2005-03-08 15:51:02 1D8oTe-0002V8-O3 Completed
2005-03-08 16:09:50 Start queue run: pid=9921
2005-03-08 16:09:50 1D8Kcu-00018V-0O == al@mepis1 R=local_user T=mail_spool defer (-52): Retry time not yet reached
2005-03-08 16:09:50 1D7jhy-0002kl-Du == al@mepis1 R=local_user T=mail_spool defer (-52): Retry time not yet reached
2005-03-08 16:09:50 1D8KWY-00017Z-Dk == al@mepis1 R=local_user T=mail_spool defer (-52): Retry time not yet reached
2005-03-08 16:09:50 1D8c7t-000217-IB == al@mepis1 R=local_user T=mail_spool defer (-52): Retry time not yet reached
2005-03-08 16:09:50 1D8WVV-0001qY-Fr == al@mepis1 R=local_user T=mail_spool defer (-52): Retry time not yet reached
2005-03-08 16:09:51 1D8KwY-0001Aa-HD == al@mepis1 R=local_user T=mail_spool defer (-52): Retry time not yet reached
2005-03-08 16:09:51 1D8ALM-0003e0-6K == al@mepis1 R=local_user T=mail_spool defer (-52): Retry time not yet reached
2005-03-08 16:09:51 1D8iNY-0002Ms-LH == al@mepis1 R=local_user T=mail_spool defer (-52): Retry time not yet reached
2005-03-08 16:09:51 1D8iKs-0002LT-U9 == al@mepis1 R=local_user T=mail_spool defer (-52): Retry time not yet reached
2005-03-08 16:09:51 1D7jib-0002kq-Po == al@mepis1 R=local_user T=mail_spool defer (-52): Retry time not yet reached
2005-03-08 16:09:51 End queue run: pid=9921
2005-03-08 16:39:51 Start queue run: pid=9990
 
Old 03-08-2005, 08:52 PM   #11
jonr
Senior Member
 
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040

Rep: Reputation: 47
I'm afraid I've run out of ideas, and it appears your setup is way different from mine...

Would it help to consult the documentation on exim4 at:

http://www.exim.org/exim-html-4.50/doc/html/

??? Wish I had some ideas, and I hope somebody knowledgable will come along to this thread.
 
Old 05-11-2008, 12:56 PM   #12
walterbyrd
Member
 
Registered: Apr 2004
Posts: 734

Rep: Reputation: 46
running debian - exact same problem
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't get mail aliases to work properly npinney Linux - General 5 08-25-2005 03:51 AM
Cannot get PHP mail() to work. jc materi Linux - Networking 4 01-19-2005 06:50 PM
mail -a would not work to send e-mail attachment saavik Linux - Networking 3 12-18-2003 09:33 AM
is this how mail server work? ziggie216 Linux - Newbie 1 11-11-2003 08:09 PM
mail.mydomain.com does not work saravanan1979 Linux - Networking 8 02-01-2002 10:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 02:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration