[Dovecot] deliver + quota failure

Mark Ruijs mark.ruys at in2sports.net
Sun Oct 29 02:04:29 UTC 2006


I investigated the deliver with quota's bug a little more (rc10, mysql,
virtual domains, maildir). My log files reads:

 

deliver(test at ruijs.cc): Info: msgid=<000f01c6fac1$bd4e8670$8801a8c0 at Moskou>:
save failed to INBOX

deliver(test at ruijs.cc): Info: sieve runtime error: Keep: Generic Error

deliver(test at ruijs.cc): Info: msgid=<000f01c6fac1$bd4e8670$8801a8c0 at Moskou>:
save failed to INBOX

deliver(test at ruijs.cc): Error:
open(ruijs.cc/test//.temp.in2sports2.vianetworks.nl.13210.72d247ac698d0019)
failed: No such file or directory

deliver(mark at ruijs.cc): Info:
msgid=<dovecot-1162066721-407295-0 at in2sports2.vianetworks.nl>: saved mail to
Junk

 

Dovecot tries to deliver, but notices quota exceeded. I don't think Sieve is
playing a role here - I added Sieve before I encountered the problem.

 

Two problems:

1)       The .dovecot.lda-dupes can't be written (that's what the
open...failed notice is about).

2)       The Quota Exceed mail seem to contain mal-formed headers (that's
why it the notice-mail ends in my junk-folder).

 

Digging into deliver.c, I noticed that auth_client_put_user_env() changes
the HOME environment from /var/mail (which is ok), to ruijs.cc/test/ (which
is the maildir, relative to /var/mail). And then fopen fails (see the trace
below). So I think that the code

 

    auth_socket = getenv("AUTH_SOCKET_PATH");

    if (auth_socket == NULL)

      auth_socket = DEFAULT_AUTH_SOCKET_PATH;

 

    ret = auth_client_put_user_env(ioloop, auth_socket,

                 destination, process_euid);

    if (ret != 0)

      return ret;

 

    home = getenv("HOME");

    if (home != NULL) {

      /* If possible chdir to home directory so core file

         could be written. If it fails, don't worry. */

      (void)chdir(home);

 

is the key. Should the chdir be done *before* the call to
auth_client_put_user_env()? I'm not familiar with the internal workings of
the Dovecot LDA, so I won't suggest a proper fix. Who will.

 

As for the mal-formed headers, I'll take a look at it later.

 

Mark

 

#0  i_error (format=0x80ac5f7 "open(%s) failed: %m") at failures.c:203

#1  0x0809f900 in dotlock_create (path=0x9ece2c0
"ruijs.cc/test//.dovecot.lda-dupes", dotlock=0x9edfc48, flags=Variable
"flags" is not available.

) at file-dotlock.c:265

#2  0x0809fb71 in file_dotlock_open (set=0x80b9c90, path=0x9ece2c0
"ruijs.cc/test//.dovecot.lda-dupes", flags=0, dotlock_r=0x9ee7920) at
file-dotlock.c:614

#3  0x08056ec5 in duplicate_new (path=0x9ece2c0
"ruijs.cc/test//.dovecot.lda-dupes") at duplicate.c:157

#4  0x080571c6 in duplicate_mark (id=0x9ece270, id_size=55, user=0xbf9edb45
"test at ruijs.cc", time=1162163205) at duplicate.c:195

#5  0x080573c9 in mail_send_rejection (mail=0x9ede7e0, recipient=0xbf9edb45
"test at ruijs.cc", reason=0x9edc218 "Quota exceeded") at mail-send.c:51

#6  0x08056c51 in main (argc=5, argv=0xbf9ec5d4) at deliver.c:595

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dovecot.org/pipermail/dovecot/attachments/20061029/c9e2f1a3/attachment.html 


More information about the dovecot mailing list