What is wrong with this IMAP ESEARCH command syntax? - search

I am looking for a way to search across all IMAP folders on my mail server. I recently discovered the IMAP ESEARCH command, which extends the usual SEARCH command to search across folders. I cannot, however, seem to make it work.
I have checked that the mail server supports ESEARCH. After telnet-ing in, I executed the following:
* OK JAMES IMAP4rev1 Server Server server-address is ready.
A1 LOGIN test test
A1 OK LOGIN completed.
A2 CAPABILITY
* CAPABILITY SASL-IR IDLE LITERAL+ AUTH=PLAIN CONDSTORE ESEARCH CHILDREN UIDPLUS UNSELECT WITHIN ENABLE I18NLEVEL=1 SEARCHRES IMAP4rev1 NAMESPACE QRESYNC
A2 OK CAPABILITY completed.
A3 LIST "" "*"
* LIST (\HasNoChildren) "." "INBOX"
* LIST (\HasNoChildren) "." "Drafts"
* LIST (\HasNoChildren) "." "Sent"
* LIST (\HasNoChildren) "." "Trash"
A3 OK LIST completed.
Note the presence of ESEARCH. I then tried the following ESEARCH, which fails.
A4 ESEARCH IN (mailboxes "INBOX") unseen
A4 BAD failed. Unknown command.
An ordinary search works fine:
A5 SELECT INBOX
* FLAGS (\Answered \Deleted \Draft \Flagged \Seen)
...
A5 OK [READ-WRITE] SELECT completed.
A6 SEARCH UNSEEN
* SEARCH 3
A6 OK SEARCH completed.
From what I can read of the spec and the formal syntax this should work. Any help or pointers would be much appreciated.

The ESEARCH capability indicates that the server supports RFC 4731 and RFC4466 which defined the ESEARCH reponse and an extended format of the SEARCH command.
The MULTISEARCH capability (RFC 6237) builds upon the ESEARCH capability to make it possible to search in another mailbox than the currently selected one. The command syntax you're using requires MULTISEARCH.

That document indicates ESEARCH is described by capability MULTISEARCH.
Capability ESEARCH might be something else?

Related

How to view generic event details with wpa?

I record ETW events for CLR provider:
xperf -start clr -on e13c0d23-ccbc-4e12-931b-d9cc2eee27e4 -f clr.etl
...
xperf -stop clr
then open clr.etl in wpa.exe and see plenty of 'generic event'. But seems wpa do not display some data, which described in MSDN
All I can see is similar to this:
Process Unknown
Id 1
Opcode Name
Task Name
Provider Name e13c0d23-ccbc-4e12-931b-d9cc2eee27e4
Time 0,071731589s
Selection Duration 0,416407863s
Start Time 0,002151869s
End Time 0,418559732s
Data Points 1
Table Data Point Selection
Cpu 0
ThreadId 50 440
Sum of Count 1 23
Time (s) 0,071846769
Loo like this is GCStart_V1 event, but I cant find for example field Reason
Is it possible see generic events data in wpa?
WPA version - 10.0.10586.212
It occurs on "normal" machines quite frequently that the CLR ETW provider registrations get messed up due to .NET Hotfixes and such. In that case you need to re/register it with (64 bit)
wevtutil um %windir%\Microsoft.NET\Framework64\v4.0.30319\CLR-ETW.man
wevtutil im %windir%\Microsoft.NET\Framework64\v4.0.30319\CLR-ETW.man
If your problem was that your view was not configured to view Field1 .. N of custom events then the answer from lowleveldesign is the right one.
A side note: I usually record the trace with at least those two kernel flags:
xperf -on PROC_THREAD+LOADER -start clr -on e13c0d23-ccbc-4e12-931b-d9cc2eee27e4
xperf -stop -stop clr -d clr.etl
Otherwise the process names might not be resolved in WPA.
Coming back to your question, it's a bit strange how custom fields are rendered in WPA, but after you overcome the initial pain, you will find its editor pretty useful. The field you mentioned is one of the custom fields specific to the given event. By default those fields are not displayed and you need to add them in the Advanced view window:
I dragged the Field1 before the Thread Name column. Then you need to select an event (not its parent but the row with the event), and you will notice that the column names for fields are changed accordingly:
Also, the Message field usually contains all the fields (their names and values), for example in this case: Reason=1; Count=2; ClrInstanceID=36

Zebra RFD8500 : How to use read in ZETI

I have a Zebra RFD8500 here and I connected to it via the terminal. I am trying to use the ZETI command read to access epc's, but it does not read anything.
But if I use the ZETI command inventory it finds all the tags around.
Anyone knows how to use the read command properly? Also is there some kind of filter per default on?
I am using the developer example on page 174 Link to PDF
Not sure if you solved this problem, but I couldn't find anything else via Google. I had the same problem with using read in ZETI (Zebra RFD8500). The Zebra tech support told me that to use access operations like read and write, you have to turn off dynamic power (which I think is on by default).
Unfortunately, I am not using the iOS API/SDK (writing a custom one for another device), but here's the gist of what you'd be doing:
Turn off dynamic power
Do an inventory
Read some memory bank, like the EPC bank. Optionally, you can also specify access criteria to single out a tag.
To test how this worked in ZETI, I screened into the RFD8500 (on my Mac, doing ls /dev/tty.RFD* lists several ttys, I chose the one ending in "-R"):
screen /dev/tty.RFD8500{long number}-R
Then I issued these commands:
dp .disable
in
rd
Commands:
dp = setdynamicpower
in = inventory
rd = read
After issuing "rd", you should be able to see the user memory banks (the default bank for the "rd" command).

Search formula not working on Linux machine

I have a strange behavior: an agent called via an AJAX request should search documents to display in a calendar. For that reason I compute a search formula and then run the search method of my database in Lotusscript. This is the formula:
form="mholiday" | form="mserviceevent" | (form="mereignis" & co_status!="9") & #texttotime(#text(startdatetime)) >= [29.09.2014] & #texttotime(#text(enddatetime)) =< [10.11.2014]
Everything's fine on Domino on Windows but fails with "formula error" on a Linux machine. Am I missing something?
If I omit the term with the dates everything is fine, so this is the part that causes the error.
Try it with #ToTime() and #Date() instead. That might help to get away from local settings' influence on server:
... & #ToTime(startdatetime) >= #Date(2014; 9; 29) & ...
#ToTime() doesn't convert the field if it's a date time value already.
#Date doesn't depend on local settings whereas [29.09.2014] probably does.
I don't think it's a Linux problem, I think it's a data problem. It sounds like either a date format problem or a problem with the UNK table, used by full text search.
If the first document created on that server that had a field called "startdatetime" had a text value, then any search expects "startdatetime" to be a text value, even if there is another field in the database called startdatetime that is a date or the startdatetime field is subsequently changed to be a date. To confirm this, you can use the search bar and select the field. The operators it offers will confirm if it's expecting a date or a text value. See this answer for details on how to resolve "Query is not understandable" - Full text searching where field types have changed.
Alternatively, it may be a problem with the date format, as Knut says. In which case a test for 9/9/2014 would work but 29/9/2014 wouldn't.

OfflineIMAP and Mutt with Gmail's All Mail folder

OfflimeIMAP
I am trying to sync my Gmail - All Mail folder with idlefolders through offlineimap. My .offlineimaprc config has this -
idlefolders = ['INBOX', '[Gmail].All Mail']
My name of my All Mail folder in .mail (where my mailboxes are) looks like
drwx------ 5 ry ry 4096 Oct 12 18:13 [Gmail].All Mail
I think the name is wrong in idlefolders. I see a lot of people online using [Gmail]/All Mail.
My INBOX folder sync fine but All Mail does not.
MUTT
Also trying to set a macro shortcut to All Mail in .muttrc I have -
macro index ga "<change-folder> =[Gmail].All Mail<enter>"
This does not work, but my macro for INBOX does work
macro index gi "<change-folder> =INBOX<enter>"
What's wrong? How should I call my All Mail folder?
for my Mutt 1.5.21, percent encoding works:
macro index ga "<change-folder>=[Gmail]/All%20Mail<enter>"
I think the problem here is the whitespace in the folder. Possible solutions:
Update: As winchendonsprings pointed out, there is a way to escape the whitespace in the folder name. Now we can use a macro to change to All Mail:
bind editor <space> noop
macro index ga "<change-folder>=[Gmail].All Mail<enter>" "Go to all mail"
You use a name transalation to create mailboxes without a
whitespace as described in the
documentation.
For example the translation could look like this:
nametrans = lambda x: re.sub('\[|\]|\s', '_', x)
You should make sure, as the documentation states, that no folder
ends up with the same translated name. You can check this by running
offlineimap with --info.
Another possible solution could be, to register your mailboxes and
simply use a macro to toggle between the index and your list of configured
mailboxes, eg. in your .muttrc:
mailboxes =[Gmail].All\ Mail =[Gmail].Important =[Gmail].Starred
macro index <left> ':mailboxes <enter>c?<toggle-mailboxes>
That provides the benefit that mutt monitors your local mailbox and
tells you if you've got new mail. You can even automate this if you want. Examples can be found here.
Another terrible solution is to just use <complete> to avoid typing a literal space:
macro index ga "<change-folder>=[Gmail]/All<complete><enter>"

How to list out a GDG base properties through REXX

How to know GDG base properties through REXX code; Of course we can view the GDG limit thru File-aid 3.2 option But need to list the properties on the fly and may be used in consecutive program/module. Hope made you clear and waiting for response!
(Do let me know if any other information is required?)
From REXX, you can target TSO then use the listcat command:
ADDRESS TSO
"LISTCAT ENTRY('XXX') ALL"
where XXX is the GDG base.
For capturing TSO output, look into OUTTRAP which can capture the output from most TSO commands - I haven't specifically tested listcat since I don't have a z900 under my desk at home :-) I'll give it a shot at work tomorrow.
Call OutTrap "xyzzy."
should give you the output into the xyzzy stem variable and you can stop the capture with:
Call OutTrap "off"
Something like this should do it.
/* REXX */
arg entry .
call outtrap "listc."
"LISTCAT ENT("entry") GDG ALL"
if rc > 0 then exit 12
do i = 1 to listc.0
if pos("LIMIT", listc.i) > 0 then do
limit = word(translate(listc.i,' ','-'),2)
say 'GDG limit is' limit
leave
end
end
One caveate to the above suggestion... If you only want GDG entries you may need to consider removing the keyword ALL on the LISTCAT ENTRY('XXX') ALL line. I believe the ALL word will list GDG & Non-GDG datasets that happen to match the catalog entry name.

Resources