Re: Problems after server migration (auth mechanisms, +mailbox@server delivery, and seen flags)

Nels Lindquist <[email protected]> Mon, 2 Jun 2025 17:11:31 -0600
Newsgroups gmane.mail.imap.cyrus
Message-ID <[email protected]>
Hi, Jay.

You might be able to make use of mbexamine (along with some additional 
filtering/scripting) to at least produce a list of UIDs and \seen states.

It does seem odd that imapsync wouldn't have transferred the state 
information, though--pretty sure it does so by default.

We migrated from an ancient pre-3.0 cyrus installation to 3.8 using 
imapsync a few months ago, and we've had no reports of similar issues.

--
Nels Lindquist



On 2025-06-02 2:53 PM, Jay Sekora wrote:
> I've solved the subscription issue (this was easy since those were
> plain text files).  I'm still working on the \seen flags; I'm basically
> doing it by writing a client script using imaplib in Python to enumerate
> the "Seen" messages in a folder and fetching their Message-Id's (which
> I'm doing in a really stupid way by parsing them out of the full
> message header; if there's an easier way I'd love to know).  So I'd still
> love hints for a good/reliable/quick way to get a list of all the UIDs
> or all the Message-Id's of the seen messages in a folder (what I'm currently
> working on is none of good/reliable/quick) and/or setting the \seen flag
> on a message by UID or message-id or the like.
> 
> Wanted to make sure nobody wasted any energy on the subscription issue.
> 
> Jay
> 
> 
> On Mon, Jun 02, 2025 at 10:38:00AM -0400, Jay Sekora wrote:
>> Hi!  I have just migrated to a new IMAP server.  For complicated reasons
>> I migrated everybody's mail with imapsync rather than replication (long
>> story addressed elsewhere on this list), and then moved the CNAME
>> from the old server to the new server (having warned the users that they
>> might need to clear cache).  This worked OK in my testing on Thunderbird,
>> Mutt, and OS X Mail, but a lot of my users are reporting various problems.
>> (I can't replicate these myself in mutt, Thunderbird, or OSX Mail,
>> mysteriously!)
>>
>> I think I know conceptually how to handle these, but it's going to require
>> messing with messages and folders on the command-line in ways I don't know
>> how to do off the top of my head, so I thought I'd ask here and see if
>> anybody has quick answers while I'm digging.
>>
>> TL;DR:  Can somebody suggest ways *on the server command-line*, to:
>> * list UIDs that are \seen
>> * set the \seen flag on a list of UIDs (I can do my own UID translation)
>> * list what folders a user is subscribed to
>> * subscribe a user to a folder
>>
>> More detail below:
>>
>> The big problem is that all messages are showing up as new (without the
>> \seen flag).  I didn't see this in my own mail in testing, and \seen seems
>> to (at least for some of us) have been synched as expected with messages;
>> one person had the experience that when he first logged in, *on several
>> different clients*, all the seen/unseen states seemed as expected, but
>> after about half an hour all the messages started getting marked as new.
>> This makes me think it might be a problem with some particular client
>> getting confused by its cache and both seeing all messages as new and
>> synching that state back to the server.  Does that seem plausible?
>> If that's the case, given that new mail has been delivered to the new
>> server since the migration I think my only option is to find some way
>> to manually copy \seen state for each message from the old server to the
>> new server.  I think I can figure that out for myself, and I have a cache
>> of UID correspondences between the old and new server which makes it much
>> easier, but if anybody has a pointer to a script or documentation about
>> how to list \seen UIDs and set a particular UID \seen on the command
>> line that could save me some time.
>>
>> Some of our users seem to have been unsubscribed from all their
>> folders.  (This *may* be all of them, given the variety of email
>> clients and configurations, although I did try with a test account
>> and it seemed to be subscribed to all folders after the sync.)  So I'd
>> like to be able to resubscribe users to (ideally) the folders they
>> were subscribed to on the old server (or if that's hard just to all
>> folders).
>>
>> Whee!
>>
>> Jay
>>

-- 
Nels Lindquist
[email protected]


------------------------------------------
Cyrus: Info
Permalink: https://cyrus.topicbox.com/groups/info/Tfd3f0c9eaf7c89e8-Md4e0592a3884cfb0f9fa0400
Delivery options: https://cyrus.topicbox.com/groups/info/subscription