bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-mailutils] Configuring debug in imap4d.rc


From: Sergey Poznyakoff
Subject: Re: [bug-mailutils] Configuring debug in imap4d.rc
Date: Sat, 09 Jun 2012 15:40:54 +0300

Hi Chris,

> I found how to get debug messages sent to syslog.

OK, nevertheless, a couple of short answers to your previous post:

> Jun  9 05:08:20 kaikala imap4d[15022]: Cannot change to home directory
> `mbox:///home/chris/mail/mailboxes/': No such file or directory

This can happen if you specify an URL where it does not belong.
The rule of thumb is: URLs are for Mailutils, paths for anything else.
That is, specifying

   homedir "mbox:///home/${user}/mail/mailboxes"; # Wrong!

will lead to the above error message, because chdir(2) never understood
(and, hopefully, never will) anything but pathnames.  The correct way
is:

   homedir "/home/${user}/mail/mailboxes";

> The BNF is great, but how do you put it in the config file so that
> imap4d doesn't error out and refuse to start?

Like that:

  debug-level "mailbox.prot,!trace6";

> And where is the output supposed to go?

As any debugging output, it goes to the current logging channel,
facility "debug".  That is, if you have in your syslog.conf:

   mail.info                  -/var/log/maillog

you won't see the debugging output, because numerically debug < info.
To see it, change the above to:
   
   mail.debug                  -/var/log/maillog

or add an additional logfile, like that:

   mail.info                  -/var/log/maillog
   mail.=debug                -/var/log/mail.debug

(most syslogd variants require the logfile to exist prior to writing to
it, so in the latter case the common sense tells to do
"touch /var/log/mail.debug" first, and then "killall -1 syslogd").

That's all regarding the previous message.  Now let's see the current
one:

> The problem seems to be that if one changes the 'homedir', imap4d
> cannot find mailboxes:

You seem to mix notions here.  Changing to any directory does not by
itself make anything else invisible, of course.  What's important here
(as far as I can judge by your logs) are the *mailbox formats* that
Mailutils is told to expect.

Mailutils works with almost any existing mailbox format.  Consequently,
when you tell it to open a mailbox, you either specify its format
explicitly, using URLs (e.g. mbox://, maildir://, imap://, etc.) or you
let it guess the format.  In the latter case, it obviously can guess the
format only if the corresponding support has been compiled in (or, in
other words, enabled at the configuration time).  Now, returning to your
logs I see:

> Jun  9 10:52:26 kaikala imap4d[16299]:
> mu_mailbox_open(/home/chris/mail/mailboxes/Trash) failed: Is a directory

in other words, you are trying to open a directory as a mailbox.  There
are two mailbox formats that keep the messages in a directory: maildir
and mh.  Now, in one of your earlier posts (Message-ID:
<address@hidden>), you wrote:

> Now, there was, however, one little thing in the new testsuite: comsatd
> tried to test MH and Maildir, I think, which I disabled at configuration
> time.

So, both of them are disabled, and consequently not supported at all by
your build of Mailutils!  That's why it can't open your mailboxes.
The solution is simple: reconfigure it with the necessary mailbox
formats turned on and recompile.

Regards,
Sergey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]