Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm studying and learning about how mail is handled in linux systems, and one thing has become a source of confusion for me. On my iPhone, via IMAP, I can mark a message in my Gmail inbox as read, or I can move it to another folder ("label" in Gmail speak). Then when I later view my Gmail account via web interface, these changes have percolated to the Gmail server.

However, given my linux client, I have read that all fetchmail does is fetch mail (pun unintended), rather than deliver it. The delivery part would be the responsibility of procmail or postfix.

But if fetchmail just hands off the delivery part to procmail or postfix, it doesn't seem like it would have any way of knowing whether that email was later marked as read or saved to a specific IMAP folder. In fact, it seems like the idea of an "IMAP folder" wouldn't even seem to exist any longer at that point! Does fetchmail actually do some creation or marking of "IMAP folders"?

So is it possible to use fetchmail to get local copies of mail from the server, yet still keep the IMAP features of marking messages as read and moving them to specific folders? If so, how?

share|improve this question
3  
If you want to keep a local mail folder and your IMAP/Gmail account in sync, you might want to have a look at offlineimap instead –  Riccardo Murri May 16 '11 at 18:26

1 Answer 1

up vote 6 down vote accepted

No. When you read email via IMAP, the mail stays on the server. The client just downloads individual messages as needed to display them. When you mark it read or move it to a folder, the client just sends a message to the server asking it to do that.

When fetchmail downloads a local copy, what happens to that copy is not reflected on the server side.

If you want the things you do to your mail to be reflected on the server, then you don't want to use fetchmail. You want an IMAP-enabled mail client, of which there are many for Linux. It looks like the only Linux client officially supported by Google is Thunderbird, but other clients are likely to work also.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.