LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-29-2011, 05:51 AM   #1
luvmax
LQ Newbie
 
Registered: Apr 2011
Posts: 21

Rep: Reputation: 0
Z-push problems still


Hi,

Although I marked my previous thread as solved (assuming I was now more in the realms of problems with the iphone itself), I don't seem to be able to resolve this one.

My Phone keeps reporting
Cannot Get Mail
The connection to the server failed

My phone does seem to show (all?) the contents of my home directory so must have received some data but no actual mail.

In debug.txt, this keeps repeating over and over:

Found 0 message changes
Initializing message diff engine
1 messages in state

and in /var/log/maillog, this does:

Killed (lost mailbox lock)

There are no other imap connections running.

Can anyone help please?
 
Old 04-29-2011, 04:17 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi luvmax,

This looks like a problem of imapd using the old mailbox format, instead of the more recent mbx that supports simultaneous access.
Read this to see how to create an mbx, or transform existing mailbox to mbx.
And of course you need to configure procmail, or whatever program you use to deliver mail to users, to deliver in mbx format (I guess you need to configure it to use dmail as in FAQ)

Once again, you could spare yourself a lot of frustration if you install a recent distro, with courier-imap or dovecot for imap server and postfix (that natively supports maildir format) as the smtp server.

Regards
 
Old 04-29-2011, 04:34 PM   #3
luvmax
LQ Newbie
 
Registered: Apr 2011
Posts: 21

Original Poster
Rep: Reputation: 0
Thanks.

You've been and continue to be a big help but, are you quite sure about this? I LIKE traditional unix mailboxes where I can vi any problems etc. out and, as I said, there are no other imap clients accessing the mail.

As you can tell, I'm a little nervous about risking breaking anything that is currently working well.

Regards.
 
Old 04-29-2011, 04:36 PM   #4
luvmax
LQ Newbie
 
Registered: Apr 2011
Posts: 21

Original Poster
Rep: Reputation: 0
P.S.

Someone has suggested I should have conigured php with iconv. Does this sound feasible?
 
Old 04-29-2011, 05:04 PM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
I've googled "imapd lost mailbox lock" and came out that the mailbox format is the problem. I guess your device is trying to access multiple times the mailbox resulting in this error.
If you're afraid breaking your system, you can create a new account with a mbx mailbox and try to use your device on this account.
Note: if you're using (the Slackware default) sendmail, you'll need a ~/.procmailrc calling dmail to deliver mail.
 
Old 05-01-2011, 01:13 PM   #6
luvmax
LQ Newbie
 
Registered: Apr 2011
Posts: 21

Original Poster
Rep: Reputation: 0
Hi,

Many thanks. I tried converting one mailbox to mbx (after having saved a copy of it) and outlook (using imap) couldn't find any mail. I'm sure I did what the hyperlin (and man page) suggest. So I.ve reverted back to the copy.

I tried the default as per the suggestion i.e. creates a file called INBOX as that didn't work, I tired again telling it to create a file called mbox. Neither worked with outlook/imap.

I also saw a suggestion to make imap look in a sub folder (Mail) but I cant see where that is an option anywhere.

Regards.
 
Old 05-01-2011, 02:04 PM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

I've told you a couple of times, that you need to configure procmail (I assume you use sendmail to get mail and procmail to deliver it to users, as it's the default for Slackware) to use dmail, so it can deliver mail to a user's mbx formatted mailbox.
 
Old 05-02-2011, 02:08 PM   #8
luvmax
LQ Newbie
 
Registered: Apr 2011
Posts: 21

Original Poster
Rep: Reputation: 0
Sorry. Please excuse my misunderstanding. I did see you say that but I assumed a CONVERTED mbox would contain all the original email (It's certainly big enough to) and that Outlook using imap would thereore still be able to see the mail. Had that been the case, I would have had more confidence to proceed with the conversion.

As I (thought) I was testing existing rather than new email, I didn't realise I needed to change sendmail at that stage.

Thanks.
 
Old 05-03-2011, 07:00 AM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

From what I've read about uw-imapd, I think that you first need to create INBOX, running as the user you want:
Code:
imapd
1 create #driver.mbx:INBOX
2 logout
Note that you need to type the numbers in front of the imap commands.
Then to transfer the existing mailbox into INBOX, you'll need "mailutil append" to copy mail from old to new mailbox. Again as that user, run:
Code:
mailutil append /var/mail/USERNAME INBOX
 
Old 06-15-2011, 10:23 AM   #10
luvmax
LQ Newbie
 
Registered: Apr 2011
Posts: 21

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
Hi,

From what I've read about uw-imapd, I think that you first need to create INBOX, running as the user you want:
Code:
imapd
1 create #driver.mbx:INBOX
2 logout
Note that you need to type the numbers in front of the imap commands.
Then to transfer the existing mailbox into INBOX, you'll need "mailutil append" to copy mail from old to new mailbox. Again as that user, run:
Code:
mailutil append /var/mail/USERNAME INBOX
This is really spooky. After all this time, today my email clients suddenly started reporting that my mailboxes were all empty!

Remembering this thread, I ran the mailutil command above (except I told it to append my mbox contents) and, guess what. I now have all my read email back!

I think I just need to complete the last step - getting new mail in var/spool/mail to be delivered to the INBOX file. I'm not all that clear on how to do that. I know it needs something like a ~.procmailrc to call dmail (as suggested above - can't see that whilst writing this) but, what does it have to contain? I seem to recall configuring sendmail is a bit of a nightmare.

I seem to be stuck with going down this approach now so any help would be much appreciated.

Best regards

Last edited by luvmax; 06-15-2011 at 10:37 AM.
 
Old 06-15-2011, 12:05 PM   #11
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,
Quote:
I think I just need to complete the last step - getting new mail in var/spool/mail to be delivered to the INBOX file.
If you're using the appropriate client it should be done automatically. Quoting from the link above:
Quote:
f you create an mbx-format INBOX, by creating "#driver.mbx/INBOX" (note that "INBOX" must be all uppercase), then subsequent access to INBOX by any c-client based application will use the mbx-format INBOX. Any mail delivered to the traditional format mailbox in the spool directory (e.g. /var/spool/mail/$USER) will automatically be copied into the mbx-format INBOX and the spool directory copy removed.
In fact I can confirm this behavior with pine.

If your client cannot do this, you need a ~/.procmail (or /etc/procmailrc if you want to do this for all users) containing:
Code:
:0
*
 | /path/to/dmail +INBOX
Change the /path/to/dmail accordingly
Normally you don't need to mess with sendmail, if you're using the stock sendmail that comes with Slackware, as it's already configured to use procmail to deliver mail.
Note that you can also use tmail instead of dmail. In this case delivery to INBOX is done for all users and you need to edit sendmail.cf. Read tmail manpage for details.

Regards
 
Old 06-15-2011, 03:24 PM   #12
luvmax
LQ Newbie
 
Registered: Apr 2011
Posts: 21

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
Hi,

If you're using the appropriate client it should be done automatically. Quoting from the link above:

In fact I can confirm this behavior with pine.

If your client cannot do this, you need a ~/.procmail (or /etc/procmailrc if you want to do this for all users) containing:
Code:
:0
*
 | /path/to/dmail +INBOX
Change the /path/to/dmail accordingly
Normally you don't need to mess with sendmail, if you're using the stock sendmail that comes with Slackware, as it's already configured to use procmail to deliver mail.
Note that you can also use tmail instead of dmail. In this case delivery to INBOX is done for all users and you need to edit sendmail.cf. Read tmail manpage for details.
Thanks so much.

I did read that somewhere. However, I did actually work out what the .procmailrc file should contain (almost identical to what you have suggested). I am getting some strange behaviour. LOCAL mail from the server does indeed get delivered to the INBOX file (but only when the .procmailrc file is present), external email still goes to the old /var/spool/mail/USER file and stays there.

Any thoughts?

Regards
 
Old 06-15-2011, 05:44 PM   #13
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
It should be the same regardless of internal or external mail. Unless you use something else to get external mail (like getmail, fetchmail etc).
You may enable procmail logging in ~/.procmailrc. To do so, add before anything else the following:
Code:
PMDIR=$HOME/.procmail
LOGFILE=$PMDIR/procmail.log
VERBOSE=on
and check ~/.procmail/procmail.log to see if you find anything.
 
  


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
Need a push in the right direction. computer_freak_8 Programming 35 08-03-2010 08:21 AM
Push my SSH to another pc ojha_riddhish Linux - Software 8 09-11-2009 07:41 AM
Non programmer looking for push... sir-lancealot Programming 3 09-22-2008 06:50 PM
Obex Push thoyyib Linux - Software 2 05-10-2006 08:12 AM
Push installation balpeck Linux - Networking 1 09-21-2003 09:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:42 PM.

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