Applies to: Gmail on the web (personal Google accounts) and Google Workspace (Admin console data import tool), including Google’s POP and Gmailify changes; imapsync 2.229 (EPEL 9, tested on AlmaLinux 9.8)
To import old emails into a personal Gmail account, open Gmail on a computer and go to Settings > See all settings > Accounts and import > Import mail and contacts. It is a one-time copy over POP, so it brings in messages but not folders. For a business on Google Workspace, an administrator imports everyone’s mailbox at once with the data import tool in the Google Admin console. To keep your folder structure, or to move mail from a provider the importer does not handle, copy the folders over IMAP with a desktop mail client, or with imapsync from a Linux server.
What changed at Gmail in 2026
According to Google, Gmail is removing two features that continuously pulled mail from other providers: Check mail from other accounts (POP fetching) and Gmailify. After the first quarter of 2026 they no longer support new users, and existing users can keep them until January 2027. Mail that was already synced stays in Gmail. Google says the one-time import of mail and contacts on Gmail on the web is still available; it just does not keep syncing. For new mail after the import, set up forwarding at your old provider (in cPanel: forward emails to Gmail) or read the old mailbox in the Gmail app over IMAP (see Gmail for your domain email).
Option 1: Import into a personal Gmail account
Before you start, according to Google:
- The old account must allow POP access and secure connections. For a mailbox on cPanel hosting, the POP server name and port are on cPanel’s Email Accounts > Connect Devices page.
- Messages are imported, but not folders or labels. Mail in folders other than the inbox may be left behind (Google’s troubleshooting page tells you to check those folders), so use option 3 if your folders matter.
- You cannot add an Outlook account to Gmail on a computer, because Microsoft now requires modern sign-in methods for non-Microsoft email apps. Use option 3 for Outlook.com mail.
- Gmail cannot import a message of 150 MB or more, attachments included.
Steps (from Google’s help page):
- On your computer, open Gmail and sign in to the account you want to import into.
- At the top right, click Settings, then See all settings.
- Open the Accounts and import tab and click Import mail and contacts.
- Follow the on-screen steps: enter the old address, its password and, if asked, its POP server and port.
- Click Start import.
Large mailboxes take time. Google suggests looking for a problem if nothing has arrived after 2 hours (wrong password, POP switched off at the old provider, or a wrong server name or port; Google expects port 110 or 995). After the import, Gmail also forwards new messages sent to your old account for 30 days. To find imported mail, search Gmail with in:anywhere and your search terms.
Option 2: Google Workspace (for administrators)
Google Workspace has a data import tool (previously called the data migration service) that copies mail into your users’ mailboxes in the cloud. Sources include IMAP servers such as cPanel mail, Microsoft Exchange Online (Microsoft 365), another Workspace account and a single user’s Gmail account. A super administrator runs it. According to Google, for an IMAP source:
- Make sure IMAP is on for the old mailboxes and for the Workspace users.
- In the Admin console, go to Menu > Data > Data import & export > Data import, and for IMAP click Import.
- Enter the old IMAP server address (for cPanel hosting, the incoming server shown on Connect Devices) and click Test connection. You should see Connected.
- Map the users: for up to 20, type each user’s old address, old password and Workspace address. For more, upload a CSV file with the columns
Source ImapUser,Source ImapPasswordandTarget GUser. One import handles up to 100 IMAP users. - Optional: choose a Start date, include deleted or spam mail, or exclude folders.
- Click Start import. You get an email with statistics when it finishes.
- Later, run a delta import to copy mail that arrived in the old mailboxes after the first run.
A practical order for a business move: create the Workspace users, run the import, point your domain’s MX records to Google (Google Workspace MX records, or all Google Workspace records in cPanel), then run the delta import so nothing that arrived during the switch is lost. For Outlook data, Google also offers Google Workspace Migration for Microsoft Outlook (GWMMO), a Windows tool that imports mail, calendar and contacts from an Exchange account or a local PST file into a Workspace account. Ucartz sells Google Workspace plans (Business Starter, Standard and Plus).
Option 3: Copy folders with a desktop mail client (any provider)
This works for any mailbox you can open over IMAP, including Outlook.com and old mail stored in a desktop client, and it keeps your folders: they become labels in Gmail.
- Add your Gmail account to a desktop mail client such as Thunderbird. Use Sign in with Google: according to Google, Gmail no longer supports apps that ask for your Google password, and since January 2025 IMAP is always on for personal Gmail accounts. According to Mozilla, Thunderbird opens Google’s sign-in page for Gmail accounts.
- Add the old mailbox to the same client as an IMAP account (not POP), so all its folders appear.
- In the Gmail account, create a folder for the old mail, for example
Old mail. - Select the messages in an old folder and drag or copy them into the Gmail folder. Do one folder at a time and wait for the copy to finish.
Google allows up to 15 mail clients per account at a time; if your client struggles with a very large mailbox, Google suggests limiting IMAP folder sizes in Gmail’s Forwarding and POP/IMAP settings. The Gmail importer works with another email account, not with files, so this is also the way to bring in mail from an old .mbox archive: open it in the client first, then copy.
Option 4: imapsync from a Linux server
For many mailboxes, or a copy you want to repeat, imapsync copies all folders from one IMAP server to another. Our general guide is migrate emails over IMAP using imapsync. For Gmail as the destination:
- Install imapsync. In our checks it was not in the Debian 13, Ubuntu 26.04 or EPEL 10 repositories. On AlmaLinux or Rocky Linux 9 it comes from EPEL, which needs the CRB repository:
sudo dnf install epel-release sudo dnf config-manager --set-enabled crb sudo dnf install imapsync
That installed imapsync 2.229 in our AlmaLinux 9.8 lab. Other systems: see the imapsync guide linked above. - Create a Gmail app password. imapsync logs in with a password, and according to Google an app password only works on accounts with 2-Step Verification turned on. Google recommends "Sign in with Google" wherever an app offers it, so delete the app password when the copy is done.
- Put both passwords in files only you can read, so they do not end up in your shell history:
nano ~/old.pass # password of the old mailbox, first line nano ~/gmail.pass # the Gmail app password chmod 600 ~/old.pass ~/gmail.pass
- Test first. imapsync’s own help suggests starting with
--dry --justfolders, then removing--dryto create the folders, then removing--justfoldersto copy the messages:imapsync --host1 mail.example.com --user1 you@example.com --passfile1 ~/old.pass \ --gmail2 --user2 you@gmail.com --passfile2 ~/gmail.pass \ --sslargs2 SSL_verify_mode=1 --dry --justfolders
--gmail2 sets Gmail as the destination with suitable options; according to the help text it also syncs Gmail labels by default. In our lab, imapsync reported that it does not check server certificates unless told to (SSL_verify_mode=0 by default), which is why the example adds --sslargs2 SSL_verify_mode=1 for Gmail. To check that your server can reach both sides before you enter any password, use --justconnect; lab output (shortened, addresses replaced):
$ imapsync --justconnect --host1 imap.gmail.com --ssl1 --host2 imap.gmail.com --ssl2 ... Host2: connecting on host2 [imap.gmail.com] port [993] Host2 banner: * OK Gimap ready for requests from 203.0.113.10 ...
Replace the first imap.gmail.com with your old server to test that side too. Gmail’s capability line listed AUTH=XOAUTH2 (Google sign-in) and AUTH=PLAIN (password login, which is what imapsync uses with an app password). For several Google Workspace users, option 2 is usually simpler.
After the import
- Spot-check a few old folders and the oldest messages. Gmail groups replies into conversations, so a message may sit inside a thread rather than on its own.
- Search with
larger:10Mto check big messages arrived. - Keep the old mailbox until you have checked the copy and, for your own domain, until its MX records point to the new service.
Related articles: imapsync, POP3 vs IMAP, Gmail for your domain email and Google Workspace vs cPanel email hosting.
Official documentation: Google: add another email account and import old emails, Google: changes to Gmailify and POP, Google Workspace: import email from an IMAP account.