Unable to set a flag to an email - imap

I have a mail that I cannot mark as seen or deleted from my inbox. (I don't know how I managed to have it…) If it helps, the server is a Zimbra instance.
I tried to set the flags by hand, to be sure to catch any error message. So openssl s_client …, LOGIN command, and then:
. SELECT INBOX
* 11 EXISTS
* 0 RECENT
* OK [UNSEEN 8] mailbox contains unseen messages
* OK [UIDVALIDITY 1] UIDs are valid for this mailbox
* OK [UIDNEXT 220360] next expected UID is 220360
* FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $MDNSent Forwarded $Junk $NotJunk Junk JunkRecorded NonJunk NotJunk)
* OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $MDNSent Forwarded \*)] junk-related flags are not permanent
* OK [HIGHESTMODSEQ 425603] modseq tracked on this mailbox
. OK [READ-WRITE] SELECT completed
Very well. I'm in READ-WRITE mode. I check with another mail to be sure all is OK:
. FETCH 7 FLAGS
* 7 FETCH (FLAGS ())
. OK FETCH completed
. STORE 7 +FLAGS \Seen
* 7 FETCH (FLAGS (\Seen))
. OK STORE completed
Super! I marked this one as seen. But for the next one, with the same command, the \Seen flag is not set even if command succeeded:
. FETCH 8 FLAGS
* 8 FETCH (FLAGS ())
. OK FETCH completed
. STORE 8 +FLAGS \Seen
* 8 FETCH (FLAGS ())
. OK STORE completed
The same for the \Deleted flag. Is there a normal situation where, in READ-WRITE mode, I cannot put a flag on a mail? Or any test to check if something is wrong with my mailbox/mail?
EDIT, after arnt's suggestion:
I tried to copy this mail in another mailbox. The message is well copied, with another UID, is readable, and keeps the flags the former mail should have: for example, it has the \Deleted flag set when I select the mailbox (but it is not expunged, so I still can check that the copy succeeded).
. COPY 8 "TestMB"
. OK [COPYUID 411900 220324 220409] COPY completed
. SELECT "TextMB"
* 1 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 411900] UIDs are valid for this mailbox
* OK [UIDNEXT 220410] next expected UID is 220410
* FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $MDNSent Forwarded $Junk $NotJunk Junk JunkRecorded NonJunk NotJunk)
* OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $MDNSent Forwarded \*)] junk-related flags are not permanent
* OK [HIGHESTMODSEQ 425749] modseq tracked on this mailbox
. OK [READ-WRITE] SELECT completed
. FETCH 1:* (FLAGS UID BODY[HEADER.FIELDS (SUBJECT)])
* 1 FETCH (UID 220409 BODY[HEADER.FIELDS (SUBJECT)] {63}
Subject: Enligne_[...]
FLAGS (\Deleted \Seen))
. OK FETCH completed

Related

How to use two UEL in same problem in ABAQUS

I am solving a contact problem. A footing under compressive load placed over soil. I would like to use two different types of user-defined elements one for the soil and other for the footing. Please note: I would like to use two different UEL. Not UMAT. How to call two UEL in the same problem? I found on the internet that in order to call two different material models (UMAT1 and UMAT2), string names are compared in an IF statement and the corresponding UMAT routine is referred inside one main Fortran file. How to achieve this for UEL?
There is parameter JTYPE passed into UEL routine. JTYPE is equal to user element type (TYPE=U1001 <=> JTYPE=1001) i.e
*USER ELEMENT,NODES=2,TYPE=U1001,PROPERTIES=4,COORDINATES=3,VARIABLES=6
1,2,3
*USER ELEMENT,NODES=2,TYPE=U1002,PROPERTIES=4,COORDINATES=3,VARIABLES=6
1,2,3
*ELEMENT,TYPE=U1001, ELSET=U1
11, 2, 11, 112, 115
12, 3, 14, 98, 114
*ELEMENT,TYPE=U1002, ELSET=U2
13, 6, 15
14, 7, 18
Then depending on JTYPE value (as a switch) you can code for many types of user elements in the same UEL routine (sample information written into ABAQUS.msg file UNIT 7).
INCREMENT 1 STARTS. ATTEMPT NUMBER 1, TIME INCREMENT 0.100
* ---- Process User Element START JTYPE 1001
**** BZ USER SUBR inc = 1 1
**** BZ USER SUBR XII 100000.000000000
**** BZ USER SUBR DU 0.000000000000000E+000
* ---- Process User Element START JTYPE 1001
**** BZ USER SUBR inc = 1 1
**** BZ USER SUBR XII 100000.000000000
**** BZ USER SUBR DU 0.000000000000000E+000
* ---- Process User Element START JTYPE 1002
**** BZ USER SUBR inc = 1 1
**** BZ USER SUBR XII 100000.000000000
**** BZ USER SUBR DU 0.000000000000000E+000
* ---- Process User Element START JTYPE 1002
**** BZ USER SUBR inc = 1 1
**** BZ USER SUBR XII 100000.000000000
**** BZ USER SUBR DU 0.000000000000000E+000

How to comment Jenkins scheduled build scripts

I have Jenkins schedule scripts to trigger commands on certain days of the week.
H 6 * * 1 MY_CMD1
H 6 * * 2 MY_CMD2
H 6 * * 3 MY_CMD3
H 6 * * 4 MY_CMD4
this will trigger the respective command on a respective day at 6 AM.
I want to skip H 6 * * 3 MY_CMD3 for a few coming weeks. How can I comment this?
Prefix the line with "#".
As can be gleaned from the "Build periodically | Schedule" help (?) example:
Examples:
# every fifteen minutes (perhaps at :07, :22, :37, :52)
H/15 * * * *
# every ten minutes in the first half of every hour (three times, perhaps at :04, :14, :24)
H(0-29)/10 * * * *
The scheduler inherits the same comment syntax as crontab

Split health checks cannot set custom path

This was originally an internal message and may refer to some of our projects, but the background information will be useful so have left references to these in.
We are having an issue with Google App Engine preventing us from making new deployments.
The error message is:
ERROR: (gcloud.app.deploy) Error Response: [4] Your deployment has failed to become healthy in the allotted time and therefore was rolled back. If you believe this was an error, try adjusting the 'app_start_timeout_sec' setting in the 'readiness_check' section.
This is a surprising error, especially as we haven't had issues with this until recently. It appears our changes earlier this year to prepare for the new Google App Engine split health checks didn't actually work, so when the system was deprecated on September 15th (mentioned here https://cloud.google.com/appengine/docs/flexible/custom-runtimes/migrating-to-split-health-checks), no deployments worked from that point on. Health checks specification is listed here: https://cloud.google.com/appengine/docs/flexible/python/reference/app-yaml#liveness_path.
The error message references the app_start_timout_sec setting, more details about this is found here: https://cloud.google.com/endpoints/docs/openapi/troubleshoot-aeflex-deployment. I didn’t think it was a timeout issue, since our system boots fairly quickly (less than the 5 minutes it defaults to) so I investigated the logs of a version of the app (from now on I’m talking about codeWOF production system unless specified). The versions only listed the ‘working’ versions, but when I looked in the Logs Viewer, all the different versions were listed, including those that had failed.
With the following app.yaml the logs were showing this error:
liveness_check:
path: "/gae/liveness_check"
readiness_check:
path: "/gae/readiness_check"
Ready for new connections
Compiling message files
Starting gunicorn 19.9.0
Listening at: http://0.0.0.0:8080 (13)
Using worker: gevent
Booting worker with pid: 16
Booting worker with pid: 17
Booting worker with pid: 18
GET 301 0 B 2 ms GoogleHC/1.0 /readiness_check
GET 301 0 B 3 ms GoogleHC/1.0 /liveness_check
This confirmed that the system had booted successfully and the checks were getting through but returning the wrong code, a 301 redirect instead of a 200. But also that the checks were going to the wrong URL, no prefix was shown.
I believed the redirect was caused by either the APPEND_SLASH setting, or the HTTP to HTTPS redirect. I tried the following configuration and got the following:
liveness_check:
path: "/liveness_check/"
readiness_check:
path: "/readiness_check/"
GET 301 0 B 2 ms GoogleHC/1.0 /readiness_check
GET 301 0 B 3 ms GoogleHC/1.0 /liveness_check
Same error as above, so it appears that setting the custom path does not affect where the health check is sent. Searching for the custom path in all logging messages returns exactly one message (summary below):
2019-11-06 16:24:14.288 NZDT App Engine Create Version default:20191106t032141
livenessCheck: { path: "/liveness_check/" }
readinessCheck: { path: "/readiness_check/" }
Resources: { cpu: 1 memoryGb: 3.75 }
So this is the first thing to look into, is setting the custom path correctly, I couldn’t get this to change.
I read all StackOverflow posts talking about App Engine and split health checks (there were less than 10 entries) and tried all suggested fixes. These included:
Checking the split health check was set correctly using gcloud app describe --project codewof.
Setting the split health checks (again) with gcloud app update --split-health-checks --project codewof.
The last thing I had tried resulted in something quite interesting. I deleted all health check settings in the app.yaml files.
The documentation (https://cloud.google.com/appengine/docs/flexible/custom-runtimes/configuring-your-app-with-app-yaml#updated_health_checks) states the following:
By default, HTTP requests from health checks are not forwarded to your application container. If you want to extend health checks to your application, then specify a path for liveness checks or readiness checks. A customized health check to your application is considered successful if it returns a 200 OK response code.
This sounded like the overall VM was being checked, rather than the docker image running inside of it, and the deployment worked!
GET 200 0 B 2 ms GoogleHC/1.0 /readiness_check
GET 200 0 B 3 ms GoogleHC/1.0 /liveness_check
But if the docker container fails for some reason, Google App Engine wouldn’t know there is an issue. We need to look into this scenario and see what it actually means, I couldn’t find anything specifying it exactly. However this allows us to do urgent deployments.
I also tested the following to skip HTTPS redirects.
settings/production.py
SECURE_REDIRECT_EXEMPT = [
r'^/?cron/.*',
r'^/?liveness_check/?$',
r'^/?readiness_check/?$',
]
liveness_check:
path: "/liveness_check/"
readiness_check:
path: "/readiness_check/"
GET 301 0 B 2 ms GoogleHC/1.0 /readiness_check
GET 301 0 B 3 ms GoogleHC/1.0 /liveness_check
The last confusing thing I discovered was to do with the codewof-dev website’s behaviour conflicting with documentation I had read. I can’t find the documentation again but I’m pretty sure it said that the App Engine instance will either run the old legacy or new split health checks. But the codewof-dev website is running both!
GET 200 0 B 2 ms GoogleHC/1.0 /readiness_check
GET 200 2 B 2 ms GoogleHC/1.0 /_ah/health
GET 200 2 B 2 ms GoogleHC/1.0 /_ah/health
GET 200 2 B 2 ms GoogleHC/1.0 /_ah/health
GET 200 2 B 2 ms GoogleHC/1.0 /_ah/health
GET 200 2 B 2 ms GoogleHC/1.0 /_ah/health
GET 200 2 B 2 ms GoogleHC/1.0 /_ah/health
GET 200 0 B 2 ms GoogleHC/1.0 /readiness_check
GET 200 2 B 2 ms GoogleHC/1.0 /_ah/health
GET 200 0 B 2 ms GoogleHC/1.0 /readiness_check
GET 200 2 B 2 ms GoogleHC/1.0 /_ah/health
GET 200 0 B 2 ms GoogleHC/1.0 /readiness_check
GET 200 2 B 2 ms GoogleHC/1.0 /_ah/health
GET 200 0 B 2 ms GoogleHC/1.0 /readiness_check
GET 200 0 B 3 ms GoogleHC/1.0 /liveness_check
Last discovery: I tested this morning by deleting all the health check configurations in the app.yaml files (as I had done previously) but also deleted all the custom health check URLs in our config URL routing file. The system deployed successfully with the following health checks
GET 200 0 B 2 ms GoogleHC/1.0 /readiness_check
GET 200 0 B 3 ms GoogleHC/1.0 /liveness_check
This seems to show that the App Engine VM instance has its own check, and it's not entering our Docker container. This would be fine for most GAE flexible instances, but not the custom runtime option we are using.

NO [UNAVAILABLE] UID FETCH Server error while fetching messages

I'm using AfterLogic MailBee for downloading AOL messages via IMAP
I keep on getting error messages again and again, for years. I would like to solve this once and for all.
Here's a sample log. I can post a much longer one if necessary.
[13:04:57.83] [RECV] BODY[TEXT]<0> {71249}\r\n
[13:04:57.84] [RECV] --===============5885760849945711156==\r\nContent-Type: text/plain ... \r\n</body>\r\n</html>\r\n\r\n--===============5885760849945711156==--\r\n [Literal of length 71249.]
[13:04:57.86] [RECV] )\r\n [Total 79854 bytes received.]
[13:04:57.88] [RECV] MBN00000005 OK UID FETCH completed\r\n [Total 36 bytes received.]
[13:04:57.89] [INFO] Envelopes downloaded
[13:04:58.07] [INFO] Will download envelopes.
[13:04:58.08] [SEND] MBN00000006 UID FETCH 50971 (UID FLAGS INTERNALDATE RFC822.SIZE ENVELOPE BODYSTRUCTURE BODY.PEEK[HEADER] BODY.PEEK[TEXT]<0.2147483647>)\r\n
ERROR ON NEXT LINE:
[13:05:28.27] [RECV] MBN00000006 NO [UNAVAILABLE] UID FETCH Server error while fetching messages\r\n [Total 77 bytes received.]
[13:05:28.29] [INFO] Error: The server has responded with negative reply. The server responded: MBN00000006 NO [UNAVAILABLE] UID FETCH Server error while fetching messages.
[13:05:38.45] [INFO] Assembly version: 11.2.0 build 590 for .NET 4.5.
[13:05:38.45] [INFO] Will download list of sub-folders of "" folder matching "" condition.
[13:05:38.47] [SEND] MBN00000002 LIST "" "*"\r\n
I would like to point out that it's not consistent. It comes and goes. But it definitely happens a lot, just that in the end usually all emails come in.
Any help/ideas/pointers are most welcome
Thanks!
UPDATE - Log #2
Hi
Here's a fuller log. i truncate the huge uid list, for readability. also i replaced some private data such as emails etc with "AAAAA"
otherwise untouched
The error is at the end
Thanks again!
[12:50:06.74] [INFO] Assembly version: 11.2.0 build 590 for .NET 4.5.
[12:50:06.74] [INFO] Will download list of sub-folders of "" folder matching "" condition.
[12:50:06.77] [SEND] MBN00000002 LIST "" "*"\r\n
[12:50:07.31] [RECV] * LIST (\Archive \HasNoChildren) "/" "Archive"\r\n [Total 48 bytes received.]
[12:50:07.48] [RECV] * LIST (\Junk \HasNoChildren) "/" "Bulk Mail"\r\n [Total 47 bytes received.]
[12:50:07.49] [RECV] * LIST (\HasNoChildren) "/" "Deleted Items"\r\n [Total 45 bytes received.]
[12:50:07.49] [RECV] * LIST (\Drafts \HasNoChildren) "/" "Draft"\r\n [Total 45 bytes received.]
[12:50:07.49] [RECV] * LIST (\HasNoChildren) "/" "Inbox"\r\n [Total 37 bytes received.]
[12:50:07.50] [RECV] * LIST (\HasNoChildren) "/" "Junk E-mail"\r\n [Total 43 bytes received.]
[12:50:07.50] [RECV] * LIST (\HasChildren) "/" "Saved"\r\n [Total 35 bytes received.]
[12:50:07.51] [RECV] * LIST (\HasNoChildren) "/" "Saved/SavedIMs"\r\n [Total 46 bytes received.]
[12:50:07.51] [RECV] * LIST (\Sent \HasNoChildren) "/" "Sent"\r\n [Total 42 bytes received.]
[12:50:07.52] [RECV] * LIST (\HasNoChildren) "/" "Sent Items"\r\n [Total 42 bytes received.]
[12:50:07.52] [RECV] * LIST (\Trash \HasNoChildren) "/" "Trash"\r\n [Total 44 bytes received.]
[12:50:07.52] [RECV] MBN00000002 OK LIST completed\r\n [Total 31 bytes received.]
[12:50:07.53] [INFO] Folder list downloaded.
[12:50:09.03] [INFO] Select folder "Archive".
[12:50:09.04] [SEND] MBN00000003 EXAMINE "Archive"\r\n
[12:50:09.55] [RECV] * 0 EXISTS\r\n [Total 12 bytes received.]
[12:50:09.70] [RECV] * 0 RECENT\r\n [Total 12 bytes received.]
[12:50:09.71] [RECV] * OK [UIDVALIDITY 1516594547] UIDs valid\r\n [Total 42 bytes received.]
[12:50:09.73] [RECV] * OK [UIDNEXT 60001] Predicted next UID\r\n [Total 41 bytes received.]
[12:50:09.75] [RECV] * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $Junk $NotJunk)\r\n [Total 78 bytes received.]
[12:50:09.77] [RECV] * OK [PERMANENTFLAGS ()] No permanent flags permitted\r\n [Total 55 bytes received.]
[12:50:09.78] [RECV] * OK [HIGHESTMODSEQ 1]\r\n [Total 24 bytes received.]
[12:50:09.80] [RECV] MBN00000003 OK [READ-ONLY] EXAMINE completed; now in selected state\r\n [Total 69 bytes received.]
[12:50:10.30] [INFO] Will perform search in the folder.
[12:50:10.30] [SEND] MBN00000004 UID SEARCH UID 1:*\r\n
[12:50:10.84] [RECV] * SEARCH \r\n [Total 11 bytes received.]
[12:50:10.90] [RECV] MBN00000004 OK UID SEARCH completed\r\n [Total 37 bytes received.]
[12:50:10.91] [INFO] Search done.
[12:50:11.41] [INFO] Select folder "Draft".
[12:50:11.43] [SEND] MBN00000005 EXAMINE "Draft"\r\n
[12:50:11.96] [RECV] * 0 EXISTS\r\n [Total 12 bytes received.]
[12:50:12.00] [RECV] * 0 RECENT\r\n [Total 12 bytes received.]
[12:50:12.01] [RECV] * OK [UIDVALIDITY 1516594546] UIDs valid\r\n [Total 42 bytes received.]
[12:50:12.01] [RECV] * OK [UIDNEXT 60083] Predicted next UID\r\n [Total 41 bytes received.]
[12:50:12.02] [RECV] * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $Junk $NotJunk)\r\n [Total 78 bytes received.]
[12:50:12.02] [RECV] * OK [PERMANENTFLAGS ()] No permanent flags permitted\r\n [Total 55 bytes received.]
[12:50:12.02] [RECV] * OK [HIGHESTMODSEQ 165]\r\n [Total 26 bytes received.]
[12:50:12.03] [RECV] MBN00000005 OK [READ-ONLY] EXAMINE completed; now in selected state\r\n [Total 69 bytes received.]
[12:50:14.67] [INFO] Will perform search in the folder.
[12:50:14.68] [SEND] MBN00000006 UID SEARCH UID 1:*\r\n
[12:50:15.16] [RECV] * SEARCH \r\n [Total 11 bytes received.]
[12:50:15.21] [RECV] MBN00000006 OK UID SEARCH completed\r\n [Total 37 bytes received.]
[12:50:15.22] [INFO] Search done.
[12:50:18.40] [INFO] Select folder "Inbox".
[12:50:18.41] [SEND] MBN00000007 EXAMINE "Inbox"\r\n
[12:50:18.64] [RECV] * 29581 EXISTS\r\n [Total 16 bytes received.]
[12:50:18.78] [RECV] * 0 RECENT\r\n [Total 12 bytes received.]
[12:50:18.79] [RECV] * OK [UIDVALIDITY 1516594546] UIDs valid\r\n [Total 42 bytes received.]
[12:50:18.79] [RECV] * OK [UIDNEXT 102412] Predicted next UID\r\n [Total 42 bytes received.]
[12:50:18.80] [RECV] * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $Junk $NotJunk)\r\n [Total 78 bytes received.]
[12:50:18.80] [RECV] * OK [PERMANENTFLAGS ()] No permanent flags permitted\r\n [Total 55 bytes received.]
[12:50:18.81] [RECV] * OK [HIGHESTMODSEQ 116489]\r\n [Total 29 bytes received.]
[12:50:18.81] [RECV] MBN00000007 OK [READ-ONLY] EXAMINE completed; now in selected state\r\n [Total 69 bytes received.]
[12:50:20.28] [INFO] Will perform search in the folder.
[12:50:20.28] [SEND] MBN00000008 UID SEARCH UID 26614728:*\r\n
[12:50:20.53] [RECV] * SEARCH 102411 \r\n [Total 18 bytes received.]
[12:50:20.57] [RECV] MBN00000008 OK UID SEARCH completed\r\n [Total 37 bytes received.]
[12:50:20.58] [INFO] Search done.
[12:50:21.12] [INFO] Select folder "Saved".
[12:50:21.37] [SEND] MBN00000009 EXAMINE "Saved"\r\n
[12:50:21.76] [RECV] * 2 EXISTS\r\n [Total 12 bytes received.]
[12:50:21.80] [RECV] * 0 RECENT\r\n [Total 12 bytes received.]
[12:50:21.81] [RECV] * OK [UIDVALIDITY 1518399361] UIDs valid\r\n [Total 42 bytes received.]
[12:50:21.81] [RECV] * OK [UIDNEXT 60003] Predicted next UID\r\n [Total 41 bytes received.]
[12:50:21.82] [RECV] * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $Junk $NotJunk)\r\n [Total 78 bytes received.]
[12:50:21.82] [RECV] * OK [PERMANENTFLAGS ()] No permanent flags permitted\r\n [Total 55 bytes received.]
[12:50:21.83] [RECV] * OK [HIGHESTMODSEQ 6]\r\n [Total 24 bytes received.]
[12:50:21.83] [RECV] MBN00000009 OK [READ-ONLY] EXAMINE completed; now in selected state\r\n [Total 69 bytes received.]
[12:50:22.11] [INFO] Will perform search in the folder.
[12:50:22.12] [SEND] MBN00000010 UID SEARCH UID 26100440:*\r\n
[12:50:22.39] [RECV] * SEARCH 20002 \r\n [Total 17 bytes received.]
[12:50:22.44] [RECV] MBN00000010 OK UID SEARCH completed\r\n [Total 37 bytes received.]
[12:50:22.44] [INFO] Search done.
[12:50:22.62] [INFO] Select folder "Saved/SavedIMs".
[12:50:22.63] [SEND] MBN00000011 EXAMINE "Saved/SavedIMs"\r\n
[12:50:22.91] [RECV] * 0 EXISTS\r\n [Total 12 bytes received.]
[12:50:22.91] [RECV] * 0 RECENT\r\n [Total 12 bytes received.]
[12:50:22.92] [RECV] * OK [UIDVALIDITY 1518399361] UIDs valid\r\n [Total 42 bytes received.]
[12:50:22.92] [RECV] * OK [UIDNEXT 60001] Predicted next UID\r\n [Total 41 bytes received.]
[12:50:22.93] [RECV] * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $Junk $NotJunk)\r\n [Total 78 bytes received.]
[12:50:22.93] [RECV] * OK [PERMANENTFLAGS ()] No permanent flags permitted\r\n [Total 55 bytes received.]
[12:50:22.94] [RECV] * OK [HIGHESTMODSEQ 1]\r\n [Total 24 bytes received.]
[12:50:22.95] [RECV] MBN00000011 OK [READ-ONLY] EXAMINE completed; now in selected state\r\n [Total 69 bytes received.]
[12:50:23.20] [INFO] Will perform search in the folder.
[12:50:23.21] [SEND] MBN00000012 UID SEARCH UID 1:*\r\n
[12:50:23.56] [RECV] * SEARCH \r\n [Total 11 bytes received.]
[12:50:23.61] [RECV] MBN00000012 OK UID SEARCH completed\r\n [Total 37 bytes received.]
[12:50:23.62] [INFO] Search done.
[12:50:23.91] [INFO] Select folder "Sent".
[12:50:23.91] [SEND] MBN00000013 EXAMINE "Sent"\r\n
[12:50:24.22] [RECV] * 8299 EXISTS\r\n [Total 15 bytes received.]
[12:50:24.27] [RECV] * 0 RECENT\r\n [Total 12 bytes received.]
[12:50:24.27] [RECV] * OK [UIDVALIDITY 1516594546] UIDs valid\r\n [Total 42 bytes received.]
[12:50:24.28] [RECV] * OK [UIDNEXT 68846] Predicted next UID\r\n [Total 41 bytes received.]
[12:50:24.28] [RECV] * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $Junk $NotJunk)\r\n [Total 78 bytes received.]
[12:50:24.28] [RECV] * OK [PERMANENTFLAGS ()] No permanent flags permitted\r\n [Total 55 bytes received.]
[12:50:24.29] [RECV] * OK [HIGHESTMODSEQ 17501]\r\n [Total 28 bytes received.]
[12:50:24.29] [RECV] MBN00000013 OK [READ-ONLY] EXAMINE completed; now in selected state\r\n [Total 69 bytes received.]
[12:50:24.72] [INFO] Will perform search in the folder.
[12:50:24.91] [SEND] MBN00000014 UID SEARCH UID 26614726:*\r\n
[12:50:25.20] [RECV] * SEARCH 68845 \r\n [Total 17 bytes received.]
[12:50:25.41] [RECV] MBN00000014 OK UID SEARCH completed\r\n [Total 37 bytes received.]
[12:50:25.42] [INFO] Search done.
[12:50:25.72] [INFO] Select folder "Sent Items".
[12:50:25.73] [SEND] MBN00000015 EXAMINE "Sent Items"\r\n
[12:50:26.11] [RECV] * 0 EXISTS\r\n [Total 12 bytes received.]
[12:50:26.15] [RECV] * 0 RECENT\r\n [Total 12 bytes received.]
[12:50:26.16] [RECV] * OK [UIDVALIDITY 1518399361] UIDs valid\r\n [Total 42 bytes received.]
[12:50:26.16] [RECV] * OK [UIDNEXT 60001] Predicted next UID\r\n [Total 41 bytes received.]
[12:50:26.16] [RECV] * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $Junk $NotJunk)\r\n [Total 78 bytes received.]
[12:50:26.17] [RECV] * OK [PERMANENTFLAGS ()] No permanent flags permitted\r\n [Total 55 bytes received.]
[12:50:26.17] [RECV] * OK [HIGHESTMODSEQ 1]\r\n [Total 24 bytes received.]
[12:50:26.18] [RECV] MBN00000015 OK [READ-ONLY] EXAMINE completed; now in selected state\r\n [Total 69 bytes received.]
[12:50:26.87] [INFO] Will perform search in the folder.
[12:50:26.88] [SEND] MBN00000016 UID SEARCH UID 1:*\r\n
[12:50:27.13] [RECV] * SEARCH \r\n [Total 11 bytes received.]
[12:50:27.25] [RECV] MBN00000016 OK UID SEARCH completed\r\n [Total 37 bytes received.]
[12:50:27.25] [INFO] Search done.
[12:50:47.78] [INFO] Assembly version: 11.2.0 build 590 for .NET 4.5.
[12:50:47.78] [INFO] Will download list of sub-folders of "" folder matching "" condition.
[12:50:47.79] [SEND] MBN00000002 LIST "" "*"\r\n
[12:50:48.31] [RECV] * LIST (\Archive \HasNoChildren) "/" "Archive"\r\n [Total 48 bytes received.]
[12:50:48.31] [RECV] * LIST (\Junk \HasNoChildren) "/" "Bulk Mail"\r\n [Total 47 bytes received.]
[12:50:48.32] [RECV] * LIST (\HasNoChildren) "/" "Deleted Items"\r\n [Total 45 bytes received.]
[12:50:48.33] [RECV] * LIST (\Drafts \HasNoChildren) "/" "Draft"\r\n [Total 45 bytes received.]
[12:50:48.34] [RECV] * LIST (\HasNoChildren) "/" "Inbox"\r\n [Total 37 bytes received.]
[12:50:48.35] [RECV] * LIST (\HasNoChildren) "/" "Junk E-mail"\r\n [Total 43 bytes received.]
[12:50:48.35] [RECV] * LIST (\HasChildren) "/" "Saved"\r\n [Total 35 bytes received.]
[12:50:48.36] [RECV] * LIST (\HasNoChildren) "/" "Saved/SavedIMs"\r\n [Total 46 bytes received.]
[12:50:48.36] [RECV] * LIST (\Sent \HasNoChildren) "/" "Sent"\r\n [Total 42 bytes received.]
[12:50:48.37] [RECV] * LIST (\HasNoChildren) "/" "Sent Items"\r\n [Total 42 bytes received.]
[12:50:48.37] [RECV] * LIST (\Trash \HasNoChildren) "/" "Trash"\r\n [Total 44 bytes received.]
[12:50:48.38] [RECV] MBN00000002 OK LIST completed\r\n [Total 31 bytes received.]
[12:50:48.38] [INFO] Folder list downloaded.
[12:50:50.63] [INFO] Select folder "Inbox".
[12:50:50.64] [SEND] MBN00000003 EXAMINE "Inbox"\r\n
[12:50:51.17] [RECV] * 29581 EXISTS\r\n [Total 16 bytes received.]
[12:50:51.21] [RECV] * 0 RECENT\r\n [Total 12 bytes received.]
[12:50:51.22] [RECV] * OK [UIDVALIDITY 1516594546] UIDs valid\r\n [Total 42 bytes received.]
[12:50:51.23] [RECV] * OK [UIDNEXT 102412] Predicted next UID\r\n [Total 42 bytes received.]
[12:50:51.23] [RECV] * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $Junk $NotJunk)\r\n [Total 78 bytes received.]
[12:50:51.24] [RECV] * OK [PERMANENTFLAGS ()] No permanent flags permitted\r\n [Total 55 bytes received.]
[12:50:51.24] [RECV] * OK [HIGHESTMODSEQ 116489]\r\n [Total 29 bytes received.]
[12:50:51.25] [RECV] MBN00000003 OK [READ-ONLY] EXAMINE completed; now in selected state\r\n [Total 69 bytes received.]
[12:50:53.51] [INFO] Will perform search in the folder.
[12:50:53.51] [SEND] MBN00000004 UID SEARCH ALL\r\n
[12:50:56.29] [RECV] * SEARCH 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 23 24 25 28 29 30 31 32 33 35 37 39 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 88 89 90 91 94 95 96 97 98 99 101 102 103 104 105 106 ........ 50941 50942 50943 50944 50945 50946 50948 50950 50951 50952 50953 50954 50956 50957 50958 50959 50960 50961 50962 50963 50964 50965 50966 50967 50968 50969 50970 50971 50972 50973 50974 50975 50976 50977 50978 50979 50980 50981 50982 50983 50984 50985 50986 50987 50988 50989 50990 50991 50992 50993 50994 50995 50996 ....... 102373 102374 102375 102376 102377 102378 102379 102380 102381 102382 102383 102384 102385 102386 102387 102388 102389 102390 102391 102392 102393 102394 102395 102396 102397 102398 102399 102400 102401 102402 102403 102404 102405 102406 102407 102408 102409 102410 102411 \r\n [Total 168437 bytes received.]
[12:50:56.30] [RECV] MBN00000004 OK UID SEARCH completed\r\n [Total 37 bytes received.]
[12:50:56.32] [INFO] Search done.
[12:50:56.34] [INFO] Will download envelopes.
[12:50:56.34] [SEND] MBN00000005 UID FETCH 50946 (UID FLAGS INTERNALDATE RFC822.SIZE ENVELOPE BODYSTRUCTURE BODY.PEEK[HEADER] BODY.PEEK[TEXT]<0.2147483647>)\r\n
[12:50:57.45] [RECV] * 19977 FETCH (FLAGS (\Seen) UID 50946 INTERNALDATE "16-Oct-2018 17:00:37 +0000" RFC822.SIZE 79046 BODYSTRUCTURE (("text" "plain" ("charset" "utf-8") NIL NIL "quoted-printable" 11625 191 NIL NIL NIL NIL)("text" "html" ("charset" "utf-8") NIL NIL "quoted-printable" 59281 1080 NIL NIL NIL NIL) "alternative" ("boundary" "===============5885760849945711156==") NIL) ENVELOPE ("Tue, 16 Oct 2018 17:00:36 +0000 (UTC)" "$139.99 Dell i5 Quad Core PC" (("AAAAA" NIL "officesale" "AAAAA.com")) (("AAAAA" NIL "officesale" "AAAAA.com")) (("AAAAA" NIL "officesale" "AAAAA.com")) (("AAAAA" NIL "AAAAA" "aol.com")) NIL NIL NIL "<5IhE0ItQTeOlCUsfbIJlPA#ismtpd0049p1mdw1.AAAAA.net>") BODY[HEADER] {7820}\r\n
[12:50:57.45] [RECV] Return-Path: <bounces+6830976-236e-AAAAA=aol.com#send.ksd2.klav ... send.ksd2.AAAAA.com SPF : pass\r\nContent-Length: 69965\r\n\r\n [Literal of length 7820.]
[12:50:57.46] [RECV] BODY[TEXT]<0> {71249}\r\n
[12:50:57.46] [RECV] --===============5885760849945711156==\r\nContent-Type: text/plain ... \r\n</body>\r\n</html>\r\n\r\n--===============5885760849945711156==--\r\n [Literal of length 71249.]
[12:50:57.47] [RECV] )\r\n [Total 79854 bytes received.]
[12:50:57.58] [RECV] MBN00000005 OK UID FETCH completed\r\n [Total 36 bytes received.]
[12:50:57.59] [INFO] Envelopes downloaded
[12:50:58.03] [INFO] Will download envelopes.
[12:50:58.04] [SEND] MBN00000006 UID FETCH 50971 (UID FLAGS INTERNALDATE RFC822.SIZE ENVELOPE BODYSTRUCTURE BODY.PEEK[HEADER] BODY.PEEK[TEXT]<0.2147483647>)\r\n
[12:51:28.51] [RECV] MBN00000006 NO [UNAVAILABLE] UID FETCH Server error while fetching messages\r\n [Total 77 bytes received.]
[12:51:28.53] [INFO] Error: The server has responded with negative reply. The server responded: MBN00000006 NO [UNAVAILABLE] UID FETCH Server error while fetching messages.

IMAP getting UID List of selected folder

How can I retrieve the list of IMAP UIDs from the selected folder? I want to get the list of mail UIDs, so I am passing the 1150 UID FETCH FLAGS (\Seen \Flagged), but I am not able to retrieve the list: it gives me an error like BAD Command. So how I can retrieve the list of UID from the selected folder?
The easiest (and most compact) way to list all the UIDs in the currently-selected folder is via UID SEARCH ALL:
A001 UID SEARCH ALL
* SEARCH 288 291 292 293 295 323 324 325 326 327 385 387 472 474 641 720 748
A001 OK UID SEARCH completed
The errors in your UID FETCH request were leaving out the sequence-set and including a list of flags. If you rewrote it as
A002 UID FETCH 1:* (UID)
or
A002 UID FETCH 1:* (UID FLAGS)
it would work.

Resources