LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Z-push problems still (http://www.linuxquestions.org/questions/linux-newbie-8/z-push-problems-still-877806/)

luvmax 04-29-2011 05:51 AM

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?

bathory 04-29-2011 04:17 PM

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

luvmax 04-29-2011 04:34 PM

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.

luvmax 04-29-2011 04:36 PM

P.S.

Someone has suggested I should have conigured php with iconv. Does this sound feasible?

bathory 04-29-2011 05:04 PM

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.

luvmax 05-01-2011 01:13 PM

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.

bathory 05-01-2011 02:04 PM

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.

luvmax 05-02-2011 02:08 PM

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.

bathory 05-03-2011 07:00 AM

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

luvmax 06-15-2011 10:23 AM

Quote:

Originally Posted by bathory (Post 4344960)
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

bathory 06-15-2011 12:05 PM

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

luvmax 06-15-2011 03:24 PM

Quote:

Originally Posted by bathory (Post 4386650)
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

bathory 06-15-2011 05:44 PM

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.


All times are GMT -5. The time now is 07:54 AM.