[Dovecot] POP3 download problem
Jens Laas
jens.laas at data.slu.se
Fri Jun 3 13:39:41 EEST 2005
(05.06.03 kl.11:55) Eddie du Plessis skrev följande till dovecot at dovecot.org:
If you are using dovecot-test72 you can try and apply the attached patch.
Other dovecot versions I have no idea. (kindly always report the version
of the software you are using if you want help).
It will log every POP command.
Also for testing purposes make sure you disable all "secure" or TLS
connections made from clients. Thats is in client configuration.
We have had some confusing problems due to TLS certificates etc.
Cheers,
Jens
> Hi All
>
>
>
>
>
> I am experiencing a mail download problem with dovecot's pop3 protocol. We
> use outlook XP 2002 mail clients and I have setup a mail system with pop
> accounts on a Fedora 2 installation using dovecot.
>
>
>
> Some of the clients download email fine but others do not download email and
> also do not give any error messages. I have enabled the "verbose" options in
> the /etc/dovecot.conf and all the logged messages appear the same for those
> who get email and for those who don't. I listed the /var/spool/mail
> directory and can see mail in the accounts who do not seem to download. We
> are running an 80 - 90 user system.
>
>
>
> I have even tried IMAP on the clients with no success. There is nothing
> viable in the system log.
>
>
>
> I would appreciate it if you could help.
>
>
>
> Thank you
>
>
>
> Kind regards,
>
>
>
> Eddie
>
>
>
> Eddie du Plessis
> IT Administrator
>
>
> Now Media(PTY) Ltd
> 32 Fricker Road
> Illovo Boulevard
> Johannesburg
> Cell: 082 777 8110
> Tel: 011 214 7302
> Fax: 011 327 4094
> www.nowmedia.co.za
>
>
>
> _________
> "This e-mail, its attachments and any rights attaching hereto are,
> unless the contents clearly indicate otherwise, the property of Now
> Media (Proprietary) Limited. It is confidential, private and intended
> for the addressee only.
>
> Should you have received this email in error, kindly notify the sender
> and delete this e-mail immediately. Do not disclose or use this e-mail
> in any manner whatsoever.
>
> Views and opinions expressed in this e-mail are those of the sender,
> unless clearly stated as those of Now Media (Proprietary) Limited. Now
> Media (Proprietary) Limited accepts no liability for any loss or damages
> whatsoever and howsoever incurred or suffered, resulting or arising from
> the use of this email or its attachments.
>
> Now Media (Proprietary) Limited does not warrant the integrity of this
> e-mail or that it is free of errors, viruses, interception or
> interference."
>
-----------------------------------------------------------------------
'This mail automatically becomes portable when carried.'
-----------------------------------------------------------------------
Jens Låås Email: jens.laas at data.slu.se
Department of Computer Services, SLU Phone: +46 18 67 35 15
Vindbrovägen 1
P.O. Box 7079
S-750 07 Uppsala
SWEDEN
-----------------------------------------------------------------------
-------------- next part --------------
diff -ur dovecot-1.0-test72.orig/src/pop3/commands.c dovecot-1.0-test72/src/pop3/commands.c
--- dovecot-1.0-test72.orig/src/pop3/commands.c 2005-05-24 00:17:35.000000000 +0200
+++ dovecot-1.0-test72/src/pop3/commands.c 2005-06-02 11:32:49.562728136 +0200
@@ -47,6 +47,7 @@
if (client->deleted) {
if (client->deleted_bitmask[num / CHAR_BIT] &
(1 << (num % CHAR_BIT))) {
+ i_info("get_msgnum: msg %u is deleted", num+1);
client_send_line(client, "-ERR Message is deleted.");
return NULL;
}
@@ -98,16 +99,24 @@
unsigned int msgnum;
if (get_msgnum(client, args, &msgnum) == NULL)
- return FALSE;
+ {
+ i_info("DELE msg does not exits or is deleted %s", args);
+ return FALSE;
+ }
if (!client->deleted) {
+ i_info("DELE creating bitmap of size %u with room for %u msgs",
+ MSGS_BITMASK_SIZE(client),
+ MSGS_BITMASK_SIZE(client)*CHAR_BIT);
client->deleted_bitmask = i_malloc(MSGS_BITMASK_SIZE(client));
client->deleted = TRUE;
}
- client->deleted_bitmask[msgnum / CHAR_BIT] |= 1 << (msgnum % CHAR_BIT);
+ client->deleted_bitmask[msgnum / CHAR_BIT] |= (1 << (msgnum % CHAR_BIT));
client->deleted_count++;
client->deleted_size += client->message_sizes[msgnum];
+ i_info("DELE msg %u deleted (%u/%u deleted)",
+ msgnum+1, client->deleted_count, client->messages_count);
client_send_line(client, "+OK Marked to be deleted.");
return TRUE;
}
@@ -153,13 +162,17 @@
client->cmd = cmd_list_callback;
client->cmd_context = ctx;
+ i_info("LIST *");
cmd_list_callback(client);
} else {
unsigned int msgnum;
if (get_msgnum(client, args, &msgnum) == NULL)
- return FALSE;
-
+ {
+ i_info("LIST no such msg %u", msgnum);
+ return FALSE;
+ }
+ i_info("LIST %u", msgnum);
client_send_line(client, "+OK %u %"PRIuUOFF_T, msgnum+1,
client->message_sizes[msgnum]);
}
@@ -175,6 +188,7 @@
static int cmd_noop(struct client *client, const char *args __attr_unused__)
{
+ i_info("NOOP");
client_send_line(client, "+OK");
return TRUE;
}
@@ -188,7 +202,10 @@
int ret = TRUE;
if (client->deleted_bitmask == NULL)
+ {
+ i_info("expunge: no deleted messages");
return TRUE;
+ }
memset(&search_arg, 0, sizeof(search_arg));
search_arg.type = SEARCH_ALL;
@@ -201,6 +218,8 @@
1 << (idx % CHAR_BIT)) != 0) {
if (mail_expunge(mail) < 0) {
ret = FALSE;
+ i_info("expunge: failed to expunge %u",
+ idx/CHAR_BIT);
break;
}
}
@@ -209,11 +228,13 @@
if (mailbox_search_deinit(ctx) < 0)
ret = FALSE;
+ i_info("expunge: done");
return ret;
}
static int cmd_quit(struct client *client, const char *args __attr_unused__)
{
+ i_info("QUIT");
if (client->deleted) {
if (!expunge_mails(client)) {
client_send_storage_error(client);
@@ -221,15 +242,16 @@
return TRUE;
}
}
-
mailbox_transaction_commit(client->trans, MAILBOX_SYNC_FLAG_FULL_WRITE);
client->trans = NULL;
+ i_info("QUIT: transaction commit done");
if (!client->deleted)
client_send_line(client, "+OK Logging out.");
else
client_send_line(client, "+OK Logging out, messages deleted.");
+ i_info("QUIT: disconnecting");
client_disconnect(client, "Logout.");
return TRUE;
}
@@ -404,7 +426,10 @@
unsigned int msgnum;
if (get_msgnum(client, args, &msgnum) == NULL)
+ {
+ i_info("RETR: no such msg %s", args);
return FALSE;
+ }
if (client->last_seen <= msgnum)
client->last_seen = msgnum+1;
@@ -413,6 +438,7 @@
client->byte_counter = &client->retr_bytes;
client->byte_counter_offset = client->output->offset;
+ i_info("RETR: fetch %u", msgnum+1);
fetch(client, msgnum, (uoff_t)-1);
return TRUE;
}
@@ -423,6 +449,7 @@
struct mail *mail;
struct mail_search_arg search_arg;
+ i_info("RSET");
client->last_seen = 0;
if (client->deleted) {
@@ -459,6 +486,7 @@
static int cmd_stat(struct client *client, const char *args __attr_unused__)
{
+ i_info("STAT");
client_send_line(client, "+OK %u %"PRIuUOFF_T, client->
messages_count - client->deleted_count,
client->total_size - client->deleted_size);
@@ -470,6 +498,7 @@
unsigned int msgnum;
uoff_t max_lines;
+ i_info("TOP");
args = get_msgnum(client, args, &msgnum);
if (args == NULL)
return FALSE;
@@ -619,6 +648,7 @@
struct cmd_uidl_context *ctx;
if (*args == '\0') {
+ i_info("UIDL *");
client_send_line(client, "+OK");
ctx = cmd_uidl_init(client, 0);
list_uids_iter(client, ctx);
@@ -626,8 +656,12 @@
unsigned int msgnum;
if (get_msgnum(client, args, &msgnum) == NULL)
+ {
+ i_info("UIDL no such msg %u", msgnum);
return FALSE;
+ }
+ i_info("UIDL msg %u", msgnum);
ctx = cmd_uidl_init(client, msgnum+1);
if (!list_uids_iter(client, ctx))
client_send_line(client, "-ERR Message not found.");
More information about the dovecot
mailing list