the messages it retrieved were not what I expected; the phone received around 58 messages, but from the 'inbox', the 'junk' box, and a couple from a 'project' box. I had expected to only retrieve the messages that were in the 'inbox'. How does Dovecot 'decide' what messages to give the phone client?
your phone decides.
In that case, the phone must have obtained, from Dovecot, the existence of 'junk' maildir, and 'project1' maildir, since messages were retrieved from those as well as from 'inbox'.
you should check if the software on the phone honors the server side subscription list or has a local one.
Thank you, darix, for this hint; I'll search around the SE sites for that sort of info. Though the phone retrieved *all* the messages from 'inbox', it only retrieved *today's* messages from 'junk' and 'project1' (which seems a sophisticatedly-calculating approach to deciding what to retrieve). The phone also has a (changeable) limit of 100 messages to retrieve, but only 58 were retrieved, so the message count was (presumably) not triggered. There don't seem to be any other settings, except for multiple usernames and passwords.
Is it possible to configure Dovecot to only serve specific boxes?
I guess not? We've got a second server. Its primary role is to back up the data stores. I wonder if we might run Fetchmail on that to set up an 'inbox'-only maildir store retrieved from Dovecot on the main mail server. So a copy of the inbox would always be on the SecondServer. Then, on the SecondServer, we might use Dovecot to 'serve' this 'inbox' with IMAP, and set the mobile phones to access Dovecot on the SecondServer instead of on the normal email server that we've used so far. Rather messy, though. The objective is, really, to keep track of incoming mail through the mobile and, maybe, type a quick acknowledgement before dealing substantively with anything later, back in the office.
regards, Ron