Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
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.
|
 |
Yesterday, 09:05 PM
|
#1
|
Member
Registered: Oct 2022
Posts: 79
Rep:
|
Which command-line tool can back up an entire IMAP mail account?
[ Log in to get rid of this advertisement]
I want to create an automated backup script. Which command-line tool can download/export an entire IMAP email account (including all folders and outbox)?
Requirements:
- eml or some other non-proprietary format.
- Preserve attachments. Normally, they are contained inside the eml file.
- It needs to be a non-interactive command-line tool so it can be accessed from scripts. Non-interactive means it shouldn't stop and ask questions. This would break scripts.
Optional extras:
- Ideally, reproduce the directory structure of the email inbox locally. This means create a local folder for every email account folder. But I can also do that manually.
- Ideally, do not mark emails as read when downloading like Thunderbird does. I only want stuff mark as read when I actually, you know, read it.
Why not POP3? Because it only gets the main inbox folder, no other folders and no outbox.
Last edited by exerceo; Yesterday at 09:07 PM.
|
|
|
Today, 12:16 AM
|
#2
|
Senior Member
Registered: Jul 2020
Posts: 1,456
|
I think just about any mail client can do it. Thunderbird definitely can, and it uses maildir format lately. So does offlineIMAP, if your are looking for command line tools.
|
|
|
Today, 07:49 AM
|
#3
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,548
|
Quote:
Originally Posted by exerceo
I want to create an automated backup script. Which command-line tool can download/export an entire IMAP email account (including all folders and outbox)?
Requirements:
- eml or some other non-proprietary format.
- Preserve attachments. Normally, they are contained inside the eml file.
- It needs to be a non-interactive command-line tool so it can be accessed from scripts. Non-interactive means it shouldn't stop and ask questions. This would break scripts.
Optional extras:
- Ideally, reproduce the directory structure of the email inbox locally. This means create a local folder for every email account folder. But I can also do that manually.
- Ideally, do not mark emails as read when downloading like Thunderbird does. I only want stuff mark as read when I actually, you know, read it.
Why not POP3? Because it only gets the main inbox folder, no other folders and no outbox.
|
Did you do any research on this??? Several tools exist, and as lvm_ said, any email client can do this as well. There is imapsync and imap-backup, both of which are on github and are fairly current.
|
|
|
Today, 02:27 PM
|
#4
|
Member
Registered: Oct 2022
Posts: 79
Original Poster
Rep:
|
Quote:
Originally Posted by TB0ne
Several tools exist, and as lvm_ said, any email client can do this as well.
|
I know that many tools exist, but I want a non-proprietary non-vendor-locked format like eml. Thunderbird stores it in some difficult-to-access database format and does not seem to automatically store attachments. And its eml export feature automatically marks emails as read, which is unwanted.
I want eml files with the attachments included. But thanks, I will try out these tools.
Last edited by exerceo; Today at 02:33 PM.
Reason: why Thunderbird isn't satisfactory
|
|
|
All times are GMT -5. The time now is 02:33 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
|
|