Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-30-2015, 07:54 PM
|
#1
|
Senior Member
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893
|
Converting from POP3 to IMAP
I am reading about the topic. My mind is swimming. My first challenge: What is a safe methodical way to proceed? Methodical meaning bite-size steps.
I have several email accounts, all POP3 using TLS. From what I have read, I can continue using the POP3 accounts. I need to install a mail retrieval agent and make everything available locally in IMAP format. Then reconfigure email clients to use IMAP rather than POP3.
Seems the recommended way is to use fetchmail or getmail and a local IMAP server such as dovecot.
Sounds simple but I use multiple computers, multiple distros, multiple user accounts, and multiple email addresses.
Currently I maintain all mail on a single computer using a single distro. I use maildir. Everything is done through kmail (trinity, not kde4). My existing emails are stored in ~/.local/share/local-mail.
Bite-size steps....
Thank you for any tips.
|
|
|
03-30-2015, 09:35 PM
|
#2
|
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,542
|
You do not need to run your own mailserver in order to implement IMAP. You can use fetchmail to get IMAP mail directly from your internet mail provider, if the provider supports IMAP. In other words, instead of grappling with setting up a mail server and then making it work with individual machines, you can just bring the mail in in IMAP format. The only change that would be required would be in the fetchmail configuration for getting the mail.
Here's a bit from my own .fetchmailrc:
Code:
poll pop.[something].net protocol pop3 user "[username]" password "[password]"
poll imap.gmail.com protocol imap port 993 user "[username]" password "[password}" options ssl
With the "baby steps" caution in mind, I would suggest that you get fetchmail working with IMAP, then, if you wish, proceed to implementing a mail server such as Dovecot. Note that many ISPs forbid public-facing servers unless you have a business account, though some enforce the prohibition more energetically than others (my ISP is one of the "energetic" ones).
I would suggest experimenting with IMAP on a computer other than the one that you are currently using for you POP3 mail, so as to avoid potential conflicts. I don't know whether that potential is real, but the idea of bringing mail in from the same mail provider to the same machine to the same mail spool file/directory in two different formats gives me the heebie-jeebies (that is, by the way, a technical term).
Last edited by frankbell; 03-30-2015 at 09:43 PM.
|
|
|
03-30-2015, 10:02 PM
|
#3
|
Senior Member
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893
Original Poster
|
Thanks for the reply.
I probably am misunderstanding you. None of my current email accounts use IMAP. All use POP3. I don't use popular email services like gmail or yahoo for these addresses.
While some of the email providers might support IMAP, which would allow upstream conversion, I know some of the providers don't. The local ISP does not have that kind of storage space, for example. Hence my desire to just leave everything upstream as POP3 and "convert" locally.
|
|
|
03-30-2015, 10:22 PM
|
#4
|
Senior Member
Registered: Mar 2012
Posts: 1,882
|
It might be better if you describe what you are hoping to achieve, rather than asking for help doing something that may be useless or unnecessary.
With POP3 the mail is downloaded to the local mail store.
With IMAP the mail remains on the server and is only viewed with a local client (with varying degrees of local caching).
This is probably worth a read.
http://www.tuxradar.com/content/get-...il-and-dovecot
Last edited by descendant_command; 03-30-2015 at 10:33 PM.
|
|
|
03-30-2015, 10:49 PM
|
#5
|
Senior Member
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893
Original Poster
|
Quote:
With POP3 the mail is downloaded to the local mail store.
With IMAP the mail remains on the server and is only viewed with a local client (with varying degrees of local caching).
|
Yes, I understand that.
I thought I was being clear. Perhaps not.
Presume I have the POP3 email address of upnort@localisp.com. I have a desktop computer that now accesses that mail and stores everything locally with respect to my desktop login account of upnort. All files are stored at /home/upnort/.local/share/local-mail. Those emails are accessible only thorugh the email client I use at the desktop computer.
Suppose I want to use my laptop in my living room rather than my desktop in my office. I want to check my email. I cannot do that right now without duplicating everything on my desktop computer or using VNC to access the desktop computer.
A local network IMAP server would allow me to access my emails from either my desktop computer or my laptop.
To use a local network IMAP server I first have to fetch my upnort@localisp.com mails and store them locally. Then I need to configure my email client at both the desktop computer and the laptop to access the local storage as IMAP rather than POP3, which then allows me to access the mails from the office desktop or mobile laptop.
Currently on the desktop computer I use kmail (trinity, not kde) in a single login user account in a single distro to receive/send email. I want those emails to be globally accessible by any login account I use in any distro on any computer or device in my local network, which means some kind of central storage, which is why I want to move to a local IMAP server. The local IMAP server will be a local NAS/server.
I would think the email clients I use in any distro or computer won't care where the IMAP server is located, including locally on my network.
I don't know where I will move /home/upnort/.local/share/local-mail, but the new location needs to be accessible by the other login accounts. I presume a local IMAP server will avoid typical 'nix file permissions.
I hope that is more detailed.
Thanks for the link. I think that might be what I am leaning toward. All of this is new to me and as expected, a bit confusing.
|
|
|
03-30-2015, 11:17 PM
|
#6
|
Senior Member
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385
|
After going through the thread and reading the title carefully what I can understand is that you want to run IMAP over POP3. Right?
Basically you want POP3 to fetch all emails at one location. Once done you want IMAP to connect to emails / databases which POP3 created / generated. Right?
If that is the case then the most confusing part here is that you have got multiple email addresses. So basically you are pulling emails using POP3 from multiple accounts. If you are pulling them via multiple accounts how IMAP can access it as a single account? The only possible way I can think of (I may be wrong in suggesting because it is still confusing to me as to what you are trying to achieve) is that you create an internal mail server, set POP3 rules for all accounts to perform transparent forward to internal mail server and then access internal mail server over IMAP. However, there is a catch, you can't reply emails from IMAP because you cannot specify multiple outgoing smtp servers.
So if my first two lines are correct about what you are trying to do then it will going to be way messy then you think.
|
|
|
03-30-2015, 11:19 PM
|
#7
|
Senior Member
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893
Original Poster
|
More details:
Suppose I have fetchmail running on my desktop computer. Suppose I have the following in fetchmailrc:
Code:
poll mail.localisp.com proto pop3 user myname with password whatever is upnort here
On my desktop computer I presume that fetchmail will router all mail for myname@localisp.com to my upnort login account. I presume the default storage location would be /var/mail/upnort.
Later I am using my laptop in my living room. I want to read and reply to those myname@localisp.com emails. But my login account on my laptop is spanky and the default laptop mail spool is that system's /var/mail/spanky.
The spanky login account cannot access the mails at the desktop computer's /var/mail/upnort account.
Separate email clients on separate computers cannot keep POP3 mails synchronized. The mails cannot be shared easily even if a person wanted to create some clunky method to sync the mails.
Thus I need a common IMAP server such that local computer login accounts and mail spools become irrelevant. I would need to configure any email client on any computer I use to find my local IMAP server. I would disable current email client configurations that now look for POP3 providers.
I think this article might also lean toward what I want. I am not yet seeing how to apply that information to multiple email addresses or how to configure the different apps to work together.
|
|
|
03-30-2015, 11:40 PM
|
#8
|
Senior Member
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893
Original Poster
|
Quote:
Basically you want POP3 to fetch all emails at one location.
Once done you want IMAP to connect to emails / databases which POP3 created / generated.
|
Please refer to my previous post (I posted after you did ). I want to access multiple email addresses from different computers. Centralized single point storage and synchronization regardless of which email client I use or which computer.
Seemed to me that a local IMAP server would solve that.
I do not understand how all of this works. I am sorry that my lack of understanding is leading me to explain so horribly.
I need a more efficient method of handling email from multiple computers or devices. Converting everything upstream to IMAP would be one way, but that is not possible with all of the email providers I use. I use three different providers and I have more than one email address with each provider.
Maintaining those multiple email addresses is straightforward as long as I keep everything localized to one email client on one computer. That is not flexible or mobile.
So much simpler 15 years ago when I had one email address and one computer.
|
|
|
03-31-2015, 03:24 PM
|
#9
|
Member
Registered: Jan 2012
Location: San Antonio. TX
Distribution: CentOS. Ubuntu
Posts: 48
Rep:
|
upnort
After reading all of the threads this far I believe I understand what you are trying to accomplish. I might go crazy trying to reiterate it but it seems to me you have three options.
1: I can't believe there are any ISPs still that don't provide IMAP in 2015. If all three of your corresponding email providers support IMAP then on each device you own set up all three IMAP accounts. Most mail clients let you differentiate between accounts.
2: Assuming that all three accounts are domain names that you own, set up your own mail server with IMAP support. Redirect all of the domains to point to your mail server and now you have all future email stored at the risk of your own server. But now you can again point all of your devices to 3 different IMAP accounts served on your own network.
3: Stay with what has been working and VNC into your desktop from your other devices around your house.
As far as the email that has already been downloaded and stored locally in your mail client there is no clean way to rehost that email except for maybe the following idea.
a: If you end up performing either idea 1 or 2 from above and you have IMAP accounts installed on your mail client you may then able to drag archived email that has been residing in your email client and move it to folders that now reside on the IMAP(s) servers.
Hope some of this is in the right direction.
Travis
Last edited by thegwer; 03-31-2015 at 03:26 PM.
Reason: typo
|
|
|
03-31-2015, 04:57 PM
|
#10
|
Senior Member
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893
Original Poster
|
Thanks for the response.
None of the email accounts I use are my own or my own domain.
One of the providers supports IMAP, but I do not know what is required to change. I am looking into the others.
I have been doing the VNC approach for a while. Kind of clunky --- and requires that specific system always be in GUI/desktop mode with the sole user account logged in with the email client running.
That is part of the inflexibility --- I can only exchange emails with that one user account and that one email client on that one computer. I could configure a different email client on one of my other computers and configure that second client not to delete mails from the providers' servers. Yet I still need to have the first computer running with the specific user account logged in with the sole email client running to permanently pull emails and delete them from the providers' servers. Just describing the process is a chore.
I am not fond of leaving my private mail sitting "forever" on somebody else's system. That is one reason I have stayed with POP3 --- to get the mail off of another person's servers as soon as practical. If I convert my upstream POP3 addresses to IMAP, can I:
* Configure my own IMAP server
* Fetch the upstream mail
* Store the mails onto my own IMAP server
* Delete the mail upstream like POP3
* Redirect my email clients to use my local IMAP server
I am not heavily concerned about the existing mail folders. They can go static. I believe I have to create new accounts in my email client in order to move from POP3 to IMAP, so starting fresh is part of the transition.
I anticipate one day installing my own VPN portal on one of my computers. This is another reason I want some kind of centralized access system.
|
|
|
03-31-2015, 10:21 PM
|
#11
|
Senior Member
Registered: Mar 2012
Posts: 1,882
|
Bite size chunks:
Set up and configure dovecot on your desktop machine.
Without changing your current mail setup, add a new IMAP account to your mail client(s) pointed at your local IMAP server.
Play and test to get your head around how it is going to work for you.
You could simply use it a a central mail store to which you manually move mail, from whichever client you download it on, so that it is available via IMAP to whichever device you want.
You could then add fetchmail into the mix to get the mail directly from your various accounts into dovecot, and disable the POP3 accounts on your clients once it is working.
If you want it available from outside your LAN as well, you would need to look at Port forwarding IMAP ports on your router as well as maybe a domain name or a no-ip.com dynamic address or such, depending on your connection.
You can send from any address you like as long as the details are set up in whatever email client you have on any device.
This would still be direct from the client to whatever smtp server each address uses so your outgoing mail would not go via your own server - running your own SMTP server (such as postfix) is a whole nother kettle of fish... but could be added later if you want.
Last edited by descendant_command; 03-31-2015 at 10:27 PM.
|
|
|
03-31-2015, 11:02 PM
|
#12
|
Senior Member
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893
Original Poster
|
As dovecot is both an IMAP and POP3 server, getting that working first make sense. I was leaning toward the opposite approach of first starting with fetchmail/getmail.
Regarding the VPN, I have a good rapport with the local WISP owner and I already have a static IP address. No data mining obfuscation because I no longer am NAT'ed behind his AP, but more flexible for my future plans.
Your SMTP comments have me thinking. If I send a mail directly to the upstream providers' servers, how would dovecot sync that? That is, a feature of IMAP is to support synchronization regardless of the computer or device used. Or do I install my own MTA and always go through that with my local MTA sending as needed?
This raises a question: If I am using my own local IMAP server and MTA, have I forsaken privacy because the mail headers point back to me? For some addresses I use a paid email provider to avoid that problem because the provider scrubs the originating IP address and uses the IP address of their own servers. Seems with those addresses I would want to continue sending emails directly to that provider's SMTP server?
|
|
|
04-01-2015, 12:21 AM
|
#13
|
Senior Member
Registered: Mar 2012
Posts: 1,882
|
I'd say it's probably to experiment without changing your existing processes first.
Re storing sent mail on your dovecot server:
It probably depends on the client as to where it can be configured to store them.
If you can store them in the sent folder of the IMAP account then no problem.
Running your own MTA introduces a number of non-trivial difficulties, if sending "direct" your IP 'reputation' make make delivering to a lot of servers problematic.
If relaying via one of your existing accounts smtp servers, which one?
Do they allow sending from "foreign" addresses?
It can all be done, but you need to be aware of a lot of factors and there could be some gotcha's that depend on what 3rd party providers allow.
Based on what you have posted, I'd start by manualy 'synching' your sent mail for a start if your clients can't be set that way.
|
|
|
04-01-2015, 01:20 PM
|
#14
|
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,542
|
Whoops. When I was the term "hotspot" in OP's OP, my mind immediately went to one of those internet cafe thingees I've read about.
|
|
|
All times are GMT -5. The time now is 01:46 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|