Re: [Dovecot] [Debian] Packages available for 1.0.0

2007-06-05 Thread Bernd Kuhls

Brian T Glenn wrote:
They aren't thoroughly tested, but I've been running on them for a 
little while and they seem stable. This is based on the latest RC from

backports.org and is built for sarge.

deb http://debian.delink.net/ sarge-delink main


Hi,

I would like to have the same for Etch.

Could you give me some hints on how to do that? A URL with generic
instructions on how to backports packages would be enough for me.

But if you had to tweak something special for Dovecot 1.0.0 I would
be grateful if you could post specific instructions here.

Greetings, Bernd Kuhls



[Dovecot] Latest MANAGESIEVE patch -- how to start daemon?

2007-06-05 Thread Andreas Ntaflos
Hello list, 

I'm using Dovecot 1.0.0 on FreeBSD 6.2-RELEASE and applied the latest 
MANAGESIEVE patch v3 [1] which seems to have worked smoothly, i.e. all 
hunks succeeded and no compilation problems.

Now this may be stupid question with an obvious answer, but I am at a 
loss at how to start the daemon? What's the binary called that starts 
the sieve server? Is there a special way to invoke it? I haven't been 
able to find anything useful on that matter and there doesn't seem to 
be a TFM to R yet, the Wiki just links to [1].

What do I have to do? Did I forgot to patch something?

I'd appreciate any insight on this subject!

Thanks in advance!

Andreas

[1] http://dovecot.org/list/dovecot/2007-March/021130.html
-- 
Andreas "daff" Ntaflos 
Vienna, Austria 

GPG Fingerprint: 6234 2E8E 5C81 C6CB E5EC  7E65 397C E2A8 090C A9B4


pgp3wSZqlhDQp.pgp
Description: PGP signature


Re: [Dovecot] Replication plans

2007-06-05 Thread Troy Benjegerdes
On Tue, Jun 05, 2007 at 09:56:29PM +0300, Timo Sirainen wrote:
> On Tue, 2007-05-22 at 09:58 -0500, Troy Benjegerdes wrote:
> > Best case, when all the nodes, and the network is up, locking latency
> > shouldn't be much longer than say twice the RTT. But what really
> > matters, and causes all the nasty bugs that even single-master
> > replication systems have to deal with is the *worst case* latency. So
> > everything is going along fine, and then due to a surge in incoming
> > spam, one of your switches starts dropping 2% of the packets, and the
> > server holding a lock starts taking 50ms instead of 1ms to respond to an
> > incoming packet. 
> > 
> > Now your previous lock latency of 1ms could easily extend into seconds if
> > a couple of responses to lock requests don't get through. And your 16
> > node imap cluster is now 8 times slower than a single server, instead of
> > 8 times faster ;)
> 
> If you're so worried about that, you could create another internal
> network just for replication :)

Things are worse if the internal network for replication is the one that
started having errors ;) .. Your machine is accessible to the world, but
you can't reliably communicate to get a lock

> > The nasty part about this for imap is that we can't ever have a UID be
> > handed out without *confirming* that it's been replicated to another
> > server before sending out the packet. Otherwise you can get in the
> > situation where node A sends out a new UID to a client out it's public
> > NIC card, while in the meantime, it's internal NIC melted so the update
> > never got propagated, so node B,C, and D  decides "ooops, node A is
> > dead, we are stealing his lock", and B takes over the lock and allocates
> > the same UID to a different message, and now the CEO didn't get that
> > notice from the SEC to save all his emails.
> 
> When the servers sync up again they'll notice the duplicated UID and
> both of the emails will be assigned a new UID to fix the situation. This
> conflict handling will have to be done in any case.

That sounds like a pretty clean solution, and makes a lot of the things
that make replication hard go away.


[Dovecot] [Debian] Packages available for 1.0.0

2007-06-05 Thread Brian T Glenn
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

They aren't thoroughly tested, but I've been running on them for a 
little while and they seem stable. This is based on the latest RC from
backports.org and is built for sarge.

deb http://debian.delink.net/ sarge-delink main

Enjoy,
- -- 
http://www.delink.net/
Ok, so he's got a cellphone in one hand and latte in the other, I know
what he's using to steer, but what is that soccer mom using, a strap-on?
- Brian Kantor in the monastery
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFGZdGMFy/L+4MovqIRApa7AJ4s3jU0La4dCijm08iOpa7m9dSaowCeN1eW
6he6hZFEzREtzZ/iA4mvEms=
=Ln6h
-END PGP SIGNATURE-


Re: [Dovecot] Public Namespace and ACLs with pure virtual users

2007-06-05 Thread Charles Marcus
I have a real need to have (at least) one shared folder (inbound faxes) 
with shared \Seen flags - so the 5 people assigned to monitor it will 
know when someone else has seen/forwarded a new fax - and private \Seen 
flags on other shared maildirs (like distribution lists, etc)...


Are you saying this may never be possible?



No, not never. I'll probably add private_flags setting to dovecot-shared
file or something.


Ak, ok, gotcha...


But if you use a single UID for all users you can already do this by not
adding dovecot-shared file for mailboxes where you don't want private
\Seen flags.


Gak! I can't believe I missed that... thanks!

--

Best regards,

Charles


Re: [Dovecot] multiple dovecot invocations

2007-06-05 Thread Timo Sirainen
On Tue, 2007-06-05 at 14:57 -0400, Stewart Dean wrote:
> How do I correctly run multiple dc instances?

Change the base_dir. Although if you're also using SSL, there's still a
bug: http://hg.dovecot.org/dovecot-1.0/rev/f7c1b6f2947d



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] UW-IMAP style mbox snarfing from /var/mail/ to ~/mbox

2007-06-05 Thread Timo Sirainen
On Tue, 2007-06-05 at 21:12 +0200, Bernd Kuhls wrote:
> In your original posting you said:
> > if all the
> > messages couldn't be copied, for example because of out of quota, then
> > none of the messages are copied. I suppose that could be a problem. It
> > might be possible to fix that by changing:
..
> > But I'm not sure about that. Try and tell me. :)
> 
> In your new patch you changed exactly this code, did you have a reason 
> to do so? I have yet to test your patch in an over-quota scenario, so I 
> can´t tell you my experience with the patch.

I changed it because I remembered my mail about it. With the previous
code if you had 1000 messages waiting in /var/spool/mail, either all or
none of them would be moved to ~/mbox. Now it should move as many as
fits. If it works.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] UW-IMAP style mbox snarfing from /var/mail/ to ~/mbox

2007-06-05 Thread Bernd Kuhls

Timo Sirainen wrote:

Jun  4 15:28:27 bach dovecot: IMAP(kuhls): Timeout leak: 0x808ad10


Fixed and uploaded new version.


Hi,

thanks, the log message disappeared.

In your original posting you said:

if all the
messages couldn't be copied, for example because of out of quota, then
none of the messages are copied. I suppose that could be a problem. It
might be possible to fix that by changing:

if (mailbox_copy(dest_trans, mail, 0, NULL, NULL) < 0) {
if (!mail->expunged) {
ret = -1;
break;
}
}

to just:

if (mailbox_copy(dest_trans, mail, 0, NULL, NULL) < 0) {
if (!mail->expunged)
break;
}

But I'm not sure about that. Try and tell me. :)


In your new patch you changed exactly this code, did you have a reason 
to do so? I have yet to test your patch in an over-quota scenario, so I 
can´t tell you my experience with the patch.


Greetings, Bernd Kuhls



[Dovecot] multiple dovecot invocations

2007-06-05 Thread Stewart Dean
I need to have multiple invocations of dovecot running, one for 
productions and then one or more for test/dev, doing things like trying 
different authentication methods, getting quota working, etc.  I knew 
how to do this with inetd, but I have been convinced that direct 
invocation is preferable, so I need to know how to do multiple 
invocations of dovecot.


I had thought that perhaps I could do this:
   dovecot -c /usr/local/etc/dovecot2.conf
where dovecot2.conf has different different listen port parms.  This I 
did, and while it does seem to work, I get this error in the syslog:

Jun  5 14:42:43 mercury mail:err|error dovecot: Socket already exists: 
/usr/local/var/run/dovecot/dict-server
Jun  5 14:42:43 mercury mail:crit dovecot: 
execv(/usr/local/libexec/dovecot/dict) failed: No such file or directo
ry
Jun  5 14:42:43 mercury mail:err|error dovecot: child 1437914 (dict) returned 
error 84 (exec() failed)

How do I correctly run multiple dc instances?

--

Stewart Dean, Unix System Admin, Henderson Computer Resources 
Center of Bard College, Annandale-on-Hudson, New York  12504  
[EMAIL PROTECTED]  voice: 845-758-7475, fax: 845-758-7035




Re: [Dovecot] Replication plans

2007-06-05 Thread Timo Sirainen
On Tue, 2007-05-22 at 09:58 -0500, Troy Benjegerdes wrote:
> Best case, when all the nodes, and the network is up, locking latency
> shouldn't be much longer than say twice the RTT. But what really
> matters, and causes all the nasty bugs that even single-master
> replication systems have to deal with is the *worst case* latency. So
> everything is going along fine, and then due to a surge in incoming
> spam, one of your switches starts dropping 2% of the packets, and the
> server holding a lock starts taking 50ms instead of 1ms to respond to an
> incoming packet. 
> 
> Now your previous lock latency of 1ms could easily extend into seconds if
> a couple of responses to lock requests don't get through. And your 16
> node imap cluster is now 8 times slower than a single server, instead of
> 8 times faster ;)

If you're so worried about that, you could create another internal
network just for replication :)

> The nasty part about this for imap is that we can't ever have a UID be
> handed out without *confirming* that it's been replicated to another
> server before sending out the packet. Otherwise you can get in the
> situation where node A sends out a new UID to a client out it's public
> NIC card, while in the meantime, it's internal NIC melted so the update
> never got propagated, so node B,C, and D  decides "ooops, node A is
> dead, we are stealing his lock", and B takes over the lock and allocates
> the same UID to a different message, and now the CEO didn't get that
> notice from the SEC to save all his emails.

When the servers sync up again they'll notice the duplicated UID and
both of the emails will be assigned a new UID to fix the situation. This
conflict handling will have to be done in any case.


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] AIX mail quota plugin problems + dotlock problem resolved

2007-06-05 Thread Timo Sirainen
On Tue, 2007-06-05 at 14:29 -0400, Stewart Dean wrote:
> 1) The AIX quotactl subroutine is defined here(put it in the search box)
> http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp
> Partial cut and paste of it:
..
> Did the trace hold any more information?

It only confirms that it should work the way I'm using it.

>   Note that I didn't attach it 
> the first time I sent it to you, the second time I did.  I also resent 
> the note with the trace attached to mailing list, but the mailman 
> software said it was too big, so I canceled the second post.

I didn't notice anything wrong in the trace either. You could try
running truss for some command that reports the current user's quota and
see what's different between it and how Dovecot calls quotactl().



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] AIX mail quota plugin problems + dotlock problem resolved

2007-06-05 Thread Stewart Dean

1) The AIX quotactl subroutine is defined here(put it in the search box)
http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp
Partial cut and paste of it:

*#include *

*int quotactl (*/Path/*,*/ Cmd/*,*/ ID/*,*/ Addr/*)*
*int*  /Cmd/ 
*,*  /ID/ 
*;*
*char ** /Addr/ 
*, 
** /Path/ 
*;*



  Description

The *quotactl* subroutine enables, disables, and manipulates disk 
quotas for file systems on which quotas have been enabled.


On AIX, disk quotas are supported by the legacy Journaled File System 
(JFS) and the enhanced Journaled File System (JFS2).


The /Cmd/ parameter is constructed through use of the 
*QCMD(*/Qcmd/*,*/ type/*)* macro contained within the 
*sys/fs/quota_common.h* file. The /Qcmd/ parameter specifies the quota 
control command. The /type/ parameter specifies either user 
(*USRQUOTA*) or group (*GRPQUOTA*) quota type.


The valid values for the /Cmd/ parameter in all supported file system 
types sare:


*Q_QUOTAON*
Enables disk quotas for the file system specified by the /Path/
parameter. The /Addr/ parameter specifies a file from which to
take the quotas. The quota file must exist; it is normally created
with the *quotacheck*


command. The /ID/ parameter is unused. Root user authority is
required to enable quotas. By specifying the new quota file path
in the /Addr/ parameter, the *quotactl* command can also be used
to change the quota file that is being used without first
disabling disk quotas. 
*Q_QUOTAOFF*

Disables disk quotas for the file system specified by the /Path/
parameter. The /Addr/ and /ID/ arguments are unused. Root user
authority is required to disable quotas. 


Additional JFS specific values for the /Cmd/ parameter are as follows:

*Q_GETQUOTA*
Gets disk quota limits and current usage for a user or group
specified by the /ID/ parameter. The /Addr/ parameter points to a
*dqblk* buffer to hold the returned information. The *dqblk*
structure is defined in the *jfs/quota.h* file. Root user
authority is required if the /ID/ value is not the current ID of
the caller.

Did the trace hold any more information?  Note that I didn't attach it 
the first time I sent it to you, the second time I did.  I also resent 
the note with the trace attached to mailing list, but the mailman 
software said it was too big, so I canceled the second post.


2) No, nothing is remote here:
1) dovecot is running here on mercury
2) mercury is where all the inboxes and home/folder dirs physically reside
3) These /are/ exported to other machines by mercury.
4) The quotaing is running on here mercury itself as part of O/S and 
FSes; it is enabled during boot
5) rquotad runs to provide quota info to the remote machines where the 
inboxes and home/folder dirs are NFS client imported and mounted



Timo Sirainen wrote:

On Tue, 2007-06-05 at 12:30 -0400, Stewart Dean wrote:
  

quotactl(Q_GETQUOTA, /) failed: Invalid argument



So apparently this quotactl() call is wrong with AIX:

if (quotactl(root->mount->mount_path, QCMD(Q_GETQUOTA, USRQUOTA),
 root->uid, (void *)&dqblk) < 0) {

I don't know why though. You could try changing root->mount->mount_path
to some actual mbox file path to see if it returns errors then.

Except weren't your mailboxes NFS mounted? quotactl() doesn't work for
NFS mounts at all. For NFS you could try this instead
http://dovecot.org/patches/quota-rquotad.c

  


--

Stewart Dean, Unix System Admin, Henderson Computer Resources 
Center of Bard College, Annandale-on-Hudson, New York  12504  
[EMAIL PROTECTED]  voice: 845-758-7475, fax: 845-758-7035




Re: [Dovecot] errors in dovecot-uidlist

2007-06-05 Thread Timo Sirainen
On Mon, 2007-06-04 at 12:47 +0200, Erland Nylend wrote:
> As you can see, the unix timestamps are descending between uid 35
> and uid 36 .. and this causes problems if we intend to make webmail
> access the messages through imap. (it expects to receive the
> messages sorted by when they were received)
> 
> Is there any way I can sort the list accourding to the unix
> timestamps, and still make it transparent to the pop3/imap clients?
> 
> I would prefer a solution that does not involve users downloading
> allready downloaded messages via pop3. 

There's no easy way. The UID numbers were apparently converted from
courierpop3dsizelist file. So either the UID numbers need to be lost, or
the list isn't sorted. Dovecot doesn't yet support having separate UIDs
for POP3 and IMAP.

One thing you could do is insert X-UIDL headers to the maildir files and
set pop3_reuse_xuidl=yes, but that would change the file sizes and
possibly break some things.

But IMAP supports sorting messages by received date (internaldate).
Maybe your webmail can be configured to do that?



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Public Namespace and ACLs with pure virtual users

2007-06-05 Thread Timo Sirainen
On Mon, 2007-06-04 at 13:53 -0400, Charles Marcus wrote:
> On 6/3/2007 Timo Sirainen ([EMAIL PROTECTED]) wrote:
> > ACL plugin shouldn't have anything to do with that decision. The
> > \Seen flag is stored privately if you have created dovecot-shared
> > file to the maildir. There isn't yet support for separate shared and
> > private flags (and I'm not sure if there ever will be).
> 
> Yikes!
> 
> Or maybe I musunderstood...
> 
> I have a real need to have (at least) one shared folder (inbound faxes) 
> with shared \Seen flags - so the 5 people assigned to monitor it will 
> know when someone else has seen/forwarded a new fax - and private \Seen 
> flags on other shared maildirs (like distribution lists, etc)...
> 
> Are you saying this may never be possible?

No, not never. I'll probably add private_flags setting to dovecot-shared
file or something.

But if you use a single UID for all users you can already do this by not
adding dovecot-shared file for mailboxes where you don't want private
\Seen flags.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] IMAP traffic logging

2007-06-05 Thread Timo Sirainen
On Mon, 2007-06-04 at 13:48 -0400, Charles Marcus wrote:
> >>> I wonder if it is possible to log the number of bytes send in response
> >>> to IMAP commands. Unfortunately there seems to be no config option
> >>> similar to "pop3_logout_format".
> 
> >> There's a patch for it. Someone already gave a link to it within last
> >> few weeks. I think it was originally posted some months ago. If you
> >> can't find it I can try to look for it.
> >>
> >> I guess it could be put to http://dovecot.org/patches/ since it's
> >> somewhat commonly requested..
> 
> > Added: http://dovecot.org/patches/imap-bytes.diff
> 
> Curious - this seems useful... is there any reason you don't want this 
> added to the main code base - ie, any reason I should be wary of using it?

No reason. I'm just planning on adding a more generic
imap_logout_format.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] UW-IMAP style mbox snarfing from /var/mail/ to ~/mbox

2007-06-05 Thread Timo Sirainen
On Mon, 2007-06-04 at 15:37 +0200, Bernd Kuhls wrote:
> Is it possible to snarf more than one mbox from /var/mail to 
> /home/$user, like this?

Shouldn't be too difficult to modify the plugin.

> Jun  4 15:28:27 bach dovecot: IMAP(kuhls): Timeout leak: 0x808ad10

Fixed and uploaded new version.



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Dovecot Authentication Problem - Help pls!

2007-06-05 Thread Timo Sirainen
On Mon, 2007-06-04 at 16:27 +0300, Odhiambo WASHINGTON wrote:
> -bash-2.05b$ sudo su
> Password:
> [EMAIL PROTECTED] ax | grep dove
> 43802  ??  Ss 0:00.08 /usr/local/sbin/dovecot
> 43803  ??  S  0:00.05 dovecot-auth
> [EMAIL PROTECTED] attach 43803
> GNU gdb 4.18 (FreeBSD)
> Copyright 1998 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "i386-unknown-freebsd"...
> 
> attach: No such file or directory.

Oh, so BSD needs to have the path specified. I knew the "attach" wasn't
really correct or meaningful, but I've been using it anyway. So the
correct way would be

gdb /usr/local/libexec/dovecot/dovecot-auth 43803

> # At this point, I go to another shell where I attempt pop3 login.
> The login fails with an error, of course.
> 
> Now, what am I supposed to type/do on the gdb shell?
> As you can see, it has the word "Continuing"... anything I need to type 
> to get it our of that so that it again accepts my commands?

dovecot-auth process should have crashed and gdb dropped back to
accepting commands.


signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] AIX mail quota plugin problems + dotlock problem resolved

2007-06-05 Thread Timo Sirainen
On Tue, 2007-06-05 at 12:30 -0400, Stewart Dean wrote:
> quotactl(Q_GETQUOTA, /) failed: Invalid argument

So apparently this quotactl() call is wrong with AIX:

if (quotactl(root->mount->mount_path, QCMD(Q_GETQUOTA, USRQUOTA),
 root->uid, (void *)&dqblk) < 0) {

I don't know why though. You could try changing root->mount->mount_path
to some actual mbox file path to see if it returns errors then.

Except weren't your mailboxes NFS mounted? quotactl() doesn't work for
NFS mounts at all. For NFS you could try this instead
http://dovecot.org/patches/quota-rquotad.c



signature.asc
Description: This is a digitally signed message part


Re: [Dovecot] Dovecot Authentication Problem - Help pls! - RESOLVED

2007-06-05 Thread Gerard
On Tuesday June 05, 2007 at 10:51:04 (AM) Dominic Marks wrote:

> Odhiambo WASHINGTON wrote:
> > * On 04/06/07 16:27 +0300, Wash wrote:
> > | * On 04/06/07 15:16 +0300, Timo Sirainen wrote:
> > | | On Mon, 2007-06-04 at 09:02 +0300, Odhiambo WASHINGTON wrote:
> > | | > I have built and manually copied dovecot-auth to the install
> > destination
> > | | > and now it id not stripped. Now this is the result of the debug:
> > | | ..
> > | | > #0  0x805d848 in sql_query_get_result ()
> > | | > (gdb) bt
> > | |
> > | | Now this backtrace looks correct, but it's still stripped. Otherwise
> > it
> > | | would have shown parameters inside the ().
> > |
> > | Oh, so do I need to build everything unstripped? That would be difficult
> > | when using the ports.
> > |
> 
> Let me help you then! :-)
> 
> cd /usr/ports/mail/dovecot && make CFLAGS+=-g STRIP= install
> 
> Will install an unstripped Dovecot.  If you use portupgrade you can set
> these are MAKE_ARGS in pkgtools.conf if you want to always have one
> available.

You could also go this route.

Look at /usr/ports/Mk/bsd.port.mk in this section:

.if defined(WITH_DEBUG) && !defined(WITHOUT_DEBUG)
STRIP=  #none
STRIP_CMD=  ${TRUE}
DEBUG_FLAGS?=   -g
CFLAGS:=${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS}
.endif

As you can see, if WITH_DEBUG is defined, then $STRIP will be a empty,
DEBUG_FLAGS and CFLAGS changes too.

Simply set 'WITH_DEBUG=yes' in the environment on on the command line.
I also set 'DEBUG_FLAGS=-ggdb3' which supplies slightly more output.
That is of course your call. It is important to realize that the
default is "CFLAGS=-O2 -fno-strict-aliasing -pipe". You need to change
the '02' to '0' or to insure that proper debug information is
available at run time. Using the 'WITH_DEBUG=yes' accomplishes that
objective.

HTH

-- 
Gerard


  DISCLAIMER
  
  If you find a posting or message from me 
  offensive, inappropriate, or disruptive, 
  please ignore it. If you don't know how to 
  ignore a posting, complain to me and I will 
  be only too happy to demonstrate... ;-)



Re: [Dovecot] AIX mail quota plugin problems + dotlock problem resolved

2007-06-05 Thread Stewart Dean
Duh.  Egg all over my face, for missing such a simple thing as a 
misspelled word.  OK.


Incidentally, I have found and resolved the dotlock problem.  Nothing to 
do with NFS, rather there was some legacy (something my predecessor had 
set up 10 years ago or more) instructions in the .procmailrc file that 
were trashing the locks;

details to follow.

Anway, I corrected the misspelled filename, and Dovecot now loads 
successfully with the fs quota plugin...but that then fails...
Please again, your help...hopefully, this is not as elementary as a 
misspelled filename, but just as quickly fixable with your eagle eye.  
Again this is AIX; FWIW, what Ralf does doesn't use fs quota, so this is 
new territory.  There is a trace attached.

Here it goes:

I start DC under truss
truss -d -f -t !_poll dovecot > /tmp/dovecot.truss.out  2>&1

in maillog, I see:
==
Jun  5 11:31:38 mercury mail:info dovecot: Dovecot v1.0.0 starting up

Draves does some stuff:

Jun  5 11:32:56 mercury mail:info dovecot: auth(default): client out: OK
1   user=draves
Jun  5 11:32:56 mercury mail:info dovecot: auth(default): master in: REQUEST
1   851978  1
Jun  5 11:32:56 mercury mail:info dovecot: auth(default): 
passwd(draves,10.20.30.14): lookup
Jun  5 11:32:56 mercury mail:info dovecot: auth(default): master out: USER  
1   draves  system_user=draves  uid=220 gid=20
0   home=/home/hcrc/draves
Jun  5 11:32:56 mercury mail:info dovecot: imap-login: Login: user=, 
method=PLAIN, rip=10.20.30.14, lip=192.246.229.21, TLS
Jun  5 11:32:56 mercury mail:info dovecot: IMAP(draves): Loading modules from 
directory: /usr/local/lib/dovecot/imap
Jun  5 11:32:56 mercury mail:info dovecot: IMAP(draves): Module loaded: 
/usr/local/lib/dovecot/imap/lib10_quota_plugin.so
Jun  5 11:32:56 mercury mail:info dovecot: IMAP(draves): Module loaded: 
/usr/local/lib/dovecot/imap/lib11_imap_quota_plugin.so
Jun  5 11:32:57 mercury mail:info dovecot: IMAP(draves): Effective uid=220, 
gid=200, home=/home/hcrc/draves
Jun  5 11:32:57 mercury mail:info dovecot: IMAP(draves): mbox: 
data=/home/hcrc/draves/mail:INBOX=/var/spool/mail/draves:INDEX=/var/dcn
dx/draves
Jun  5 11:32:57 mercury mail:info dovecot: IMAP(draves): mbox: 
root=/home/hcrc/draves/mail, index=/var/dcndx/draves, inbox=/var/spool/
mail/draves
Jun  5 11:32:57 mercury mail:info dovecot: IMAP(draves): fs quota add storage 
dir = /home/hcrc/draves/mail
Jun  5 11:32:57 mercury mail:info dovecot: IMAP(draves): fs quota block device 
= /dev/hd4
Jun  5 11:32:57 mercury mail:info dovecot: IMAP(draves): fs quota mount point = 
/
Jun  5 11:32:58 mercury mail:err|error dovecot: IMAP(draves): 
quotactl(Q_GETQUOTA, /) failed: Invalid argument

This is 1:20 or 80 seconds after the start of DC and about line 11982 in the 
trace file

I (sdean) do some stuff:

Jun  5 11:33:05 mercury mail:info dovecot: auth(default): client out: OK
1   user=sdean
Jun  5 11:33:05 mercury mail:info dovecot: auth(default): master in: REQUEST
2   1351756 1
Jun  5 11:33:05 mercury mail:info dovecot: auth(default): 
passwd(sdean,10.20.10.75): lookup
Jun  5 11:33:05 mercury mail:info dovecot: auth(default): master out: USER  
2   sdean   system_user=sdean   uid=202 gid=20
0   home=/home/hcrc/sdean
Jun  5 11:33:05 mercury mail:info dovecot: imap-login: Login: user=, 
method=PLAIN, rip=10.20.10.75, lip=192.246.229.21, TLS
Jun  5 11:33:05 mercury mail:info dovecot: IMAP(sdean): Loading modules from 
directory: /usr/local/lib/dovecot/imap
Jun  5 11:33:05 mercury mail:info dovecot: IMAP(sdean): Module loaded: 
/usr/local/lib/dovecot/imap/lib10_quota_plugin.so
Jun  5 11:33:05 mercury mail:info dovecot: IMAP(sdean): Module loaded: 
/usr/local/lib/dovecot/imap/lib11_imap_quota_plugin.so
Jun  5 11:33:06 mercury mail:info dovecot: IMAP(sdean): Effective uid=202, 
gid=200, home=/home/hcrc/sdean
Jun  5 11:33:06 mercury mail:info dovecot: IMAP(sdean): mbox: 
data=/home/hcrc/sdean/mail:INBOX=/var/spool/mail/sdean:INDEX=/var/dcndx/
sdean
Jun  5 11:33:06 mercury mail:info dovecot: IMAP(sdean): mbox: 
root=/home/hcrc/sdean/mail, index=/var/dcndx/sdean, inbox=/var/spool/mai
l/sdean
Jun  5 11:33:06 mercury mail:info dovecot: IMAP(sdean): fs quota add storage 
dir = /home/hcrc/sdean/mail
Jun  5 11:33:06 mercury mail:info dovecot: IMAP(sdean): fs quota block device = 
/dev/hd4
Jun  5 11:33:06 mercury mail:info dovecot: IMAP(sdean): fs quota mount point = /
Jun  5 11:33:06 mercury mail:err|error dovecot: IMAP(sdean): 
quotactl(Q_GETQUOTA, /) failed: Invalid argument

This is 1:28 or 88 seconds after the start of DC and about line 23478 in the 
trace file

==

In syslog, the same stuff:

4220 [EMAIL PROTECTED]:/var/log ## tail -f syslog | grep dovecot
Jun  5 11:32:58 mercury mail:err|error dovecot: IMAP(draves): 
quotactl(Q_GETQUOTA, /) failed: Invalid argument
Jun  5 11:33:06 mercury mail:err|error dovecot: IMAP(sdean): 
quot

Re: [Dovecot] Dovecot Authentication Problem - Help pls! - RESOLVED

2007-06-05 Thread Odhiambo WASHINGTON
* On 05/06/07 15:51 +0100, Dominic Marks wrote:
| Odhiambo WASHINGTON wrote:
| > * On 04/06/07 16:27 +0300, Wash wrote:
| > | * On 04/06/07 15:16 +0300, Timo Sirainen wrote:
| > | | On Mon, 2007-06-04 at 09:02 +0300, Odhiambo WASHINGTON wrote:
| > | | > I have built and manually copied dovecot-auth to the install
| > destination
| > | | > and now it id not stripped. Now this is the result of the debug:
| > | | ..
| > | | > #0  0x805d848 in sql_query_get_result ()
| > | | > (gdb) bt
| > | |
| > | | Now this backtrace looks correct, but it's still stripped. Otherwise
| > it
| > | | would have shown parameters inside the ().
| > |
| > | Oh, so do I need to build everything unstripped? That would be difficult
| > | when using the ports.
| > |
| 
| Let me help you then! :-)
| 
| cd /usr/ports/mail/dovecot && make CFLAGS+=-g STRIP= install
| 
| Will install an unstripped Dovecot.  If you use portupgrade you can set
| these are MAKE_ARGS in pkgtools.conf if you want to always have one
| available.

Wow!

Thanks for that tip! Kept for future reference.


-Wash

http://www.netmeister.org/news/learn2quote.html

DISCLAIMER: See http://www.wananchi.com/bms/terms.php

--
+==+
|\  _,,,---,,_ | Odhiambo Washington<[EMAIL PROTECTED]>
Zzz /,`.-'`'-.  ;-;;,_ | Wananchi Online Ltd.   www.wananchi.com
   |,4-  ) )-,_. ,\ (  `'-'| Tel: +254 20 313985-9  +254 20 313922
  '---''(_/--'  `-'\_) | GSM: +254 722 743223   +254 733 744121
+==+

"Spare no expense to save money on this one."
-- Samuel Goldwyn


smime.p7s
Description: S/MIME cryptographic signature


Re: [Dovecot] Dovecot Authentication Problem - Help pls! - RESOLVED

2007-06-05 Thread Dominic Marks
Odhiambo WASHINGTON wrote:
> * On 04/06/07 16:27 +0300, Wash wrote:
> | * On 04/06/07 15:16 +0300, Timo Sirainen wrote:
> | | On Mon, 2007-06-04 at 09:02 +0300, Odhiambo WASHINGTON wrote:
> | | > I have built and manually copied dovecot-auth to the install
> destination
> | | > and now it id not stripped. Now this is the result of the debug:
> | | ..
> | | > #0  0x805d848 in sql_query_get_result ()
> | | > (gdb) bt
> | |
> | | Now this backtrace looks correct, but it's still stripped. Otherwise
> it
> | | would have shown parameters inside the ().
> |
> | Oh, so do I need to build everything unstripped? That would be difficult
> | when using the ports.
> |

Let me help you then! :-)

cd /usr/ports/mail/dovecot && make CFLAGS+=-g STRIP= install

Will install an unstripped Dovecot.  If you use portupgrade you can set
these are MAKE_ARGS in pkgtools.conf if you want to always have one
available.

Dominic


Re: [Dovecot] Dovecot Authentication Problem - Help pls! - RESOLVED

2007-06-05 Thread Odhiambo WASHINGTON
* On 04/06/07 16:27 +0300, Wash wrote:
| * On 04/06/07 15:16 +0300, Timo Sirainen wrote:
| | On Mon, 2007-06-04 at 09:02 +0300, Odhiambo WASHINGTON wrote:
| | > I have built and manually copied dovecot-auth to the install destination
| | > and now it id not stripped. Now this is the result of the debug:
| | ..
| | > #0  0x805d848 in sql_query_get_result ()
| | > (gdb) bt
| | 
| | Now this backtrace looks correct, but it's still stripped. Otherwise it
| | would have shown parameters inside the ().
| 
| Oh, so do I need to build everything unstripped? That would be difficult
| when using the ports.
| 
| 
| | Did you build manually from the tarball or using ports? 
| 
| From the ports!
| 
| 
| | Building it with -g and without -O2 would be the best way to
| | debug this properly. I don't know about ports, but using
| | tarball you're able to do this with:
| | 
| | CFLAGS=-g ./configure
| | 
| | Once you do get the sql_query_get_result() to show a bit more
| | information, type also these:
| | 
| | p i
| | p fields_count
| | p name
| | p value
| | p *auth_result
| 
| 
| I do believe this problem is something to do with the OS version on 
| which it is happening, and perhaps might be so difficult to get round
| to solving. All this is happening on FreeBSD 4.11, with MySQL-4.0.27.
| This system could be "dirty" - some stale libscould be lying around!
| 
| I have simulated a similar setup on FreeBSD 5.5 and 6.2 both using
| MySQL-4.1.22, and FreeBSD 7.x using MySQL-5.0.41 and there is no
| crash at all. I create a file hierarchy for the mail_location and
| everything seems to work perfectly.
| 
| The only problem I am facing is that the actual mail_store that I
| need to move to another server via imapsync does live on the
| FreeBSD 4.11 box!
| 
| It would be nice to get to solve this problem, as that would make
| life easy for me, but now I am beginning to think that I could as
| well rsync the data onto another machine and access it from there.
| NFS-mounting the mail store would be another option but I hate to
| deal with NFS-related problems too:-)
| 
| 
| | > While trying the other method you have detailed, I just don't seem to get 
it right:
| | > 
| | > [EMAIL PROTECTED] ax | grep dove
| | > 11446  ??  Ss 0:00.04 /usr/local/sbin/dovecot
| | > 11447  ??  S  0:00.02 dovecot-auth
| | > 17279  p2  RV 0:00.00 grep dove (csh)
| | > 
| | > [EMAIL PROTECTED] attach 11447 -w process
| | 
| | I meant just "gdb attach 11447". Except not 11447 but the "dovecot-auth
| | -w" process. Apparently it hasn't been started yet. You could do a login
| | with invalid user/pass to make sure it's created but without getting it
| | to crash. But this isn't really needed since you managed to get a
| | noncorrupted backtrace anyway using the core.
| 
| Ok. Allow me to understand this, even if just for another day..
| 
| -bash-2.05b$ sudo su
| Password:
| [EMAIL PROTECTED] ax | grep dove
| 43802  ??  Ss 0:00.08 /usr/local/sbin/dovecot
| 43803  ??  S  0:00.05 dovecot-auth
| [EMAIL PROTECTED] attach 43803
| GNU gdb 4.18 (FreeBSD)
| Copyright 1998 Free Software Foundation, Inc.
| GDB is free software, covered by the GNU General Public License, and you are
| welcome to change it and/or distribute copies of it under certain conditions.
| Type "show copying" to see the conditions.
| There is absolutely no warranty for GDB.  Type "show warranty" for details.
| This GDB was configured as "i386-unknown-freebsd"...
| 
| attach: No such file or directory.
| 
| 
| /mailstore/home/wash/43803: No such file or directory.
| Attaching to process 43803
| 0x2812bc50 in ?? ()
| (gdb) cont
| Continuing.
| 
| # At this point, I go to another shell where I attempt pop3 login.
| The login fails with an error, of course.
| 
| Now, what am I supposed to type/do on the gdb shell?
| As you can see, it has the word "Continuing"... anything I need to type 
| to get it our of that so that it again accepts my commands?


While still waiting for clarification so that I get to have ideas how 
developers debug crashes, I got round to solving this problem on FreeBSD 
4.11.
It turns out that dovecot-auth was linking against an old library of
libmysqlclient that was lying somewhere in /usr/local/lib/compat/pkg.
I am not sure what created that libs container, but all I had to do
was to make a symlink to the correct library inside this container,
rebuild dovecot from the ports and voila! No more dovecot-auth crashes.

Thanks, Timo, for your time on trying to help me with this. I am 
awaiting your answers to the questions above - on gdb.


-Wash

http://www.netmeister.org/news/learn2quote.html

DISCLAIMER: See http://www.wananchi.com/bms/terms.php

--
+==+
|\  _,,,---,,_ | Odhiambo Washington<[EMAIL PROTECTED]>
Zzz /,`.-'`'-.  ;-;;,_ | Wananchi Online Ltd.   www.wananchi.com
   |,4-  ) )-,_. ,\ (  `'-'| Tel: +254 20 313985-9  +254 20 313922
  '---''(_/--'  `-'\_)