[CentOS] Email access via Android device

Les Mikesell lesmikesell at gmail.com
Mon Oct 7 21:52:42 UTC 2013


On Sat, Oct 5, 2013 at 11:43 AM, Frank Cox <theatre at melvilletheatre.com> wrote:
> I'm pretty sure that this is possible, but I don't currently know enough about
> email to know where to start.
>
> My main desktop computer runs Centos 6 and my preferred email client is
> Sylpheed, which supports both POP and IMAP email, and my "internal network" has
> a static IP address, so getting access to the computer from the big scary world
> via my phone isn't a problem.
>
> I have six different email accounts that live on various servers.  I have
> Sylpheed set up to poll each account once every ten minutes using POP3 and
> download all incoming mail.  Upon receipt, I have a whole lot of filters in
> Sylpheed to sort the mail into various subdirectories of my Mail directory.
> For example, one of my directory structures under Mail is inbox/1/2, and
> email may be sorted in Mail/inbox or Mail/inbox/1 or Mail/inbox/1/2, or other
> subdirectories outside of inbox like, for example, Mail/3.  In short, I
> have a dozen or so subdirectories that Sylpheed sorts mail into based on
> various criteria like From or Subject.
>
> What I would like to do is somehow make this whole thing available on my Android
> phone (Samsung Galaxy 3).  As it sits right now, if I am not sitting in front
> of my computer the only way I can check my email is to ssh into it and
> look at the files in each of those subdirectories using a text utility like
> less; this is really inconvenient and I can't reply to emails that way until I
> get back in front of my computer.
>
> I'm thinking that I need to run some kind of a mailserver on my computer that
> can be accessed by both Sylpheed locally and by ??? on my Android device.  I get
> the impression that if I wanted to hand all of my email over to gmail I could
> then have something like this working.  I don't particularly want to do
> that; I would rather have something running on my own machine to do it.

Hard to beat a free gmail account - if you are concerned about
privacy, you probably shouldn't be sending the stuff over the internet
in the first place.    But, the tools are available to run your own
imap server so you can see the same mailboxes from multiple devices.
  Alternatively your android device is perfectly capable of dealing
with 6 remote servers directly.

> I could use something else to poll for my email (fetchmail?).   Sylpheed does
> have a configuration setting that I'm not currently using that says "Enable
> strict checking of summary caches -- enable this if the contents of the folders
> may be changed by other applications" so based on that I think it can handle
> having messages magically changed by a program on my Android device.
>
> What is the best way to approach this?  My best idea so far is to set up
> fetchmail (or something) to do the pop downloads of incoming mail, and have
> some kind of a local imap server running though which I access the actual mail
> via any email client that can work with an imap account.  Then I can set up
> Sylpheed to access only one account, that being the one on my local computer,
> and run some imap-using mail client on the Android device for remote access.
>
> Having never actually used an imap email account in this way, that leads to a
> couple of other questions.  (The only thing I've ever done with imap is set
> up squirrelmail.)  What about filtering the email into those directories?
> Procmail? And what happens to sent email -- I assume that the SMTP part of the
> mail client wouldn't actually change -- I would still send outbound mail
> directly through the mailserver where my email account exists, right?  But does
> it (can it) also send a copy to the imap mail store so I can send email from
> Android and later on review what I sent with Sylpheed?

Start with dovecot configured to run imap or the ssl variation and
using maildir format.   I don't know anything about sylpheed, but most
mailers that know pop and imap can push to imap folders.   So, if you
want to continue using sylpheed and let it run all the time you might
be able to simply connect it to the new imap account, create a
matching folder structure there, drag all of your current mail to the
corresponding folders, and change the rules for new messages to send
them there.   Then the android connected to the same account will see
the same folders and contents.

If you don't want to leave sylpheed running all the time for the
polling and rule processing, you can replace it with fetchmail and
procmail.  If your other accounts support imap, there is also
something called imapsync that can copy or move messages between
accounts.   If your concern with gmail is only that you want your own
archive for reliability, you could let them do the processing work and
(probably) act as your normal mail host, but use imapsync to pull your
own archive copy.   I think gmail has some rate limit so you probably
don't want to wait till you've filled a 15 GB mailbox before you start
to sync, though...

-- 
   Les Mikesell
      lesmikesell at gmail.com



More information about the CentOS mailing list