Score:0

'FETCH' command with a 'BAD' response: Error in IMAP command FETCH: Invalid messageset (0.001 + 0.000 secs). on DoveCot IMAP Server

cn flag

I'm hosting my webserver using postfix and dovecot. it works fine when i try to connect using my iphone and my macbook. I need to connect an external WebbApplication to get all E-Mails over IMAP Connection. The connection can be authenticated. I just can't get all mails. I get the following response:

The IMAP server replied to the 'FETCH' command with a 'BAD' response: Error in IMAP command FETCH: Invalid messageset (0.001 + 0.000 secs).

The WebApplication is working with other webservers like google and gmx. So it should be a problem with my webserver. I'm really lost and i can't know where to look in.

The Version of dovecot is:

2.2.33.2 (d6601f4ec)

Thanks for any help in advanced!

############## Edit ##############

following is the syslog file at the moment when i request the fetch:

    Nov 10 21:10:06 mail postfix/local[8772]: 5D71E24369A: to=<[email protected]>, orig_to=<opendkim>, relay=local, delay=0.02, delays=0.01/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Nov 10 21:10:06 mail postfix/qmgr[23043]: 5D71E24369A: removed
Nov 10 21:10:06 mail xrdp[1122]: (1122)(140578514478912)[INFO ] Socket 12: AF_INET6 connection received from ::ffff:198.27.104.24 port 53740
Nov 10 21:10:06 mail xrdp[1122]: (1122)(140578514478912)[DEBUG] Closed socket 12 (AF_INET6 ::ffff:10.20.11.1 port 3389)
Nov 10 21:10:06 mail xrdp[19460]: (19460)(140578514478912)[DEBUG] Closed socket 11 (AF_INET6 :: port 3389)
Nov 10 21:10:06 mail xrdp[19460]: (19460)(140578514478912)[INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
Nov 10 21:10:06 mail xrdp[19460]: (19460)(140578514478912)[INFO ] Using default X.509 key file: /etc/xrdp/key.pem
Nov 10 21:10:06 mail xrdp[19460]: (19460)(140578514478912)[DEBUG] TLSv1.2 enabled
Nov 10 21:10:06 mail xrdp[19460]: (19460)(140578514478912)[DEBUG] TLSv1.1 enabled
Nov 10 21:10:06 mail xrdp[19460]: (19460)(140578514478912)[DEBUG] TLSv1 enabled
Nov 10 21:10:06 mail xrdp[19460]: (19460)(140578514478912)[DEBUG] Security layer: requested 3, selected 1
Nov 10 21:10:07 mail xrdp[19460]: (19460)(140578514478912)[DEBUG] Closed socket 12 (AF_INET6 ::ffff:10.20.11.1port 3389)
Nov 10 21:10:13 mail dovecot: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=80.144.9.12, lip=10.20.11.1, mpid=19483, TLS, session=<VSxhXCPtgMJQkAkM>
Nov 10 21:10:15 mail dovecot: imap([email protected]): Connection closed (FETCH finished 0.217 secs ago) in=195 out=942
anx avatar
fr flag
anx
**logs** - you want to check what dovecot has put into syslog/journal at the time it returned the error to the clients.
El-Salatinie avatar
cn flag
@anx thanks for your comment. I've edited the post with the logs from syslogs file.
anx avatar
fr flag
anx
That is not a lot of dovecot logging. Consider setting up [rawlog_dir](https://doc.dovecot.org/settings/core/#core_setting-rawlog_dir) to get transcripts of what your application is trying to do (don't forget to disable that later, it produces substantial log volume that is not automatically cleared).
anx avatar
fr flag
anx
Use `doveadm mailbox status -u user@domain mailbox` to verify that dovecot does see messages in the folder your are trying to fetch messages from. You will *always* get an error when trying to `FETCH` from an empty folder.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.