Discussion:
Debugging A5 BAD Unexpected extra arguments to Search ?
Kristian Rink
2018-10-23 09:58:03 UTC
Permalink
Hi all;

we're running a Java (and Java Mail) based application interacting with
our cyrus imapd server. Trying to use complex search terms (searching
for multiple criterias, such as message-id and message date), we
regularly (all the time?) end up with messages such as

A5 BAD Unexpected extra arguments to Search or
A7 BAD Unexpected extra arguments to Search

Questions here: What's the difference between A5 and A7? Any way to
debug what exactly is wrong about our search terms here?

TIA and all the best,
Kristian
ellie timoney
2018-10-24 01:27:06 UTC
Permalink
Hi Kristian,

The "A5" and "A7" are just the "tags" associated with the client's search commands, they have no semantic value. The client prefixes each command with some tag, and then the server uses the same tag in the response (so that you can identify which response applies to which command). In these two cases, your client has chosen "A5" and "A7" as tags. Tags are described in detail here: https://tools.ietf.org/html/rfc3501#section-2.2.1

Your Java/Java Mail application hopefully has a feature to log the commands it's sending. If you turn this on, you'll be able to see which bad search commands were resulting in the error (by matching response tags and command tags), and then compare the command syntax to the expected syntax from the relevant RFCs.

Cheers,

ellie
Post by Kristian Rink
Hi all;
we're running a Java (and Java Mail) based application interacting with
our cyrus imapd server. Trying to use complex search terms (searching
for multiple criterias, such as message-id and message date), we
regularly (all the time?) end up with messages such as
A5 BAD Unexpected extra arguments to Search or
A7 BAD Unexpected extra arguments to Search
Questions here: What's the difference between A5 and A7? Any way to
debug what exactly is wrong about our search terms here?
TIA and all the best,
Kristian
Kristian Rink
2018-10-24 13:31:47 UTC
Permalink
Hi Ellie;

ok, thanks for explaining. So I'll dive into the Java application and
see whether debugging the search terms gets me any further.

Cheers,
Kristian
Post by ellie timoney
The "A5" and "A7" are just the "tags" associated with the client's
search commands, they have no semantic value. The client prefixes
each command with some tag, and then the server uses the same tag in
the response (so that you can identify which response applies to
which command). In these two cases, your client has chosen "A5" and
https://tools.ietf.org/html/rfc3501#section-2.2.1
Stephan
2018-10-24 19:38:53 UTC
Permalink
Post by Kristian Rink
Hi all;
we're running a Java (and Java Mail) based application interacting with
our cyrus imapd server. Trying to use complex search terms (searching
for multiple criterias, such as message-id and message date), we
regularly (all the time?) end up with messages such as
A5 BAD Unexpected extra arguments to Search    or
A7 BAD Unexpected extra arguments to Search
Questions here: What's the difference between A5 and A7? Any way to
debug what exactly is wrong about our search terms here?
TIA and all the best,
Kristian
----
Couldn't this be debugged by enabling telemetry logging ? Or is this
feature missing from the newer releases ?

https://www.cyrusimap.org/2.5/imap/faqs/o-telemetry.html
Kristian Rink
2018-10-25 06:31:50 UTC
Permalink
Post by Stephan
Couldn't this be debugged by enabling telemetry logging ? Or is this
feature missing from the newer releases ?
https://www.cyrusimap.org/2.5/imap/faqs/o-telemetry.html
I will have a look at this, thanks. :) I'm currently moving from cyrus
2.2 (old Ubuntu 10.04) to a "newer" (cyrus 2.4) version on Ubuntu 16.04.
Maybe telemetry still works in these versions... :)

Cheers,
Kristian

Loading...