how to use fetchmail with IMAPS ?

I want to get my corp IMAP mails using fetchmail to local machine and want to access all my mails using mail client(thunderbird) by local machine,
How can I make my local machine IMAP server and get all my corp mails from corp IMAP mail server using fetchmail.

Later I want to access all my mails from my laptop(using thuderbird).

I want a setup as follows.

corp mail IMAP server <=> local IMAP server(using fetchmail to get my mails <=> access mails from my laptop using thunderbird and give local IMAP server IP in thunderbird

how can I achieve this scenario ?
Who is Participating?
gheistConnect With a Mentor Commented:
POP3 has option to delete messages from server after month or so.
That relies on UIDL working correctly on server (Exchange is incorrect in regard)

fetchmail's --ssl option does imaps, stls and whatever crypto needed.
-S shows smtp host to send to ( would suffice with default installed exim/postfix/sendmail whatever)
--smttpname user@host -> whom to send mail

Its all in fetchmails manual page.

Let me recommend very lightweight dovecot pop3 for your local system.
Thunderbird can hold all the messages intact on client, just look around map options. No interim server needed.
Fetchmail basically injects mail into using /usr/bin/sendmail, your picture thus misses postfix/exim/sendmail - MTA

Actually try thunderbirds options first - result looks more straightforward.
beer9Author Commented:
what is thunderbird 'map' option ? i couldn't find it in account-settings.
Mistyped. I mean IMAP account options regarding offline storage on local machine.
beer9Author Commented:
actually why I need to above mentioned setup because my mail has space limit.

So  I want to fetch(do not leave copy of mail at corp mail server) all the mails and then using local mail server I will read my mails and will keep in sync.

Please let me know if there is other better way to achieve this.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.