Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to the Power Users community on Codidact!

Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.

Post History

71%
+3 −0
Q&A How do I check email without depending on a mail client?

This is a broad topic, and I can't address all the details fully in one post. Instead, I will post an overview with enough keywords in each area, and leave it to the reader (and other questions) to...

posted 12mo ago by matthewsnyder‭  ·  edited 12mo ago by matthewsnyder‭

Answer
#2: Post edited by user avatar matthewsnyder‭ · 2023-07-01T18:54:23Z (12 months ago)
  • This is a broad topic, and I can't address all the details fully in one post. Instead, I will post an overview with enough keywords in each area, and leave it to the reader (and other questions) to explore each one in more detail.
  • The solution here is to separate the mail synchronization (receiving and sending mail) from mail usage.
  • Many programs support the ancient [Maildir format](https://en.wikipedia.org/wiki/Maildir) which is a good meeting point for this. The first step is to find and set up a program that will synchronize mail from the mail server to your hard drive. This is the equivalent of clicking "Send & Receive Mail" in Outlook - in fact, many of these mail programs do use Maildir under the hood.
  • Maildir is not the only mail directory standard, but it is a good one. One program that can do the synchronization part is [OfflineIMAP](https://wiki.archlinux.org/title/OfflineIMAP). OfflineIMAP uses IMAP - so it will try to mirror the email between the server and your computer. The other major mail protocol, POP3, is better in many ways - but it is one way: With POP3, mail is "taken" from the server, so you will no longer see it in the mail provider's webmail interface, and it will be your problem to synchronize the emails between your multiple devices. So IMAP, while being buggier and slower, is less of a commitment because you can rely on the mail server to do a bit more.
  • This all assumes that you picked a provider that supports POP3 and/or IMAP. Providers that don't are a hopeless case of vendor lock in.
  • Once a program like OfflineIMAP synchronizes mail to your computer, the problem is reduced to dealing with a bunch of files. With Maildir, for example, there will be folders in your filesystem roughly corresponding to the folders on the server (with IMAP, their structure may be a bit odd to handle the intricacies of IMAP, but it should be pretty straightforward still). Each email will be a file in the [`.eml` format](https://en.wikipedia.org/wiki/.eml), which is text based and somewhat readable with a text editor (depending on whether the mail is using HTML or not).
  • Filtering can be done by simply using any scripting language to go through the files in a certain folder, checking their content (such as the `From:` field), and moving them to another folder. This way you have complete control over what language you use to define filters, where you keep those definitions, and how you version them. I like Python/Shell scripts in a git repo.
  • Once the mails are moved between folders, you can run the synchronizer again, and it will move the mails on the server as well (if using IMAP).
  • Viewing can be done with any offline mail program which supports the "local folder" option for creating accounts. Because the synchronization is no longer a concern, you at least have more options in choosing a mail client with suitable UX. Indeed, it is no longer a mail *client*, but only a mail *reader*. If desired, many mail programs are also able to use filters on local folders - this is an alternative to writing separate filter scripts.
  • Note that *sending* mail is separate from receiving in traditional emails. Many providers and clients hide this from the user. However, protocols like IMAP or POP are merely for receiving mail sent to you. A separate SMTP server is used to actually send mail out. This is why mail clients will ask for a separate IMAP/POP server and another SMTP server. A mail synchronizer like OfflineIMAP will not handle sending email - you'll need a separate SMTP client (which is also integrated into many big mail clients like Thunderbird). Notably, in SMTP mail is "fire and forget" - putting a copy of it in "Sent"/"Outbox" is merely a trick that mail clients commonly do for you. If you use a minimal SMTP client, you would probably want to make sure you manually or automatically save a copy in "sent" (or whatever folder you want) so that OfflineIMAP can synchronize it.
  • This is a broad topic, and I can't address all the details fully in one post. Instead, I will post an overview with enough keywords in each area, and leave it to the reader (and other questions) to explore each one in more detail.
  • The solution here is to separate the mail synchronization (receiving and sending mail) from mail usage.
  • Many programs support the ancient [Maildir format](https://en.wikipedia.org/wiki/Maildir) which is a good meeting point for this. The first step is to find and set up a program that will synchronize mail from the mail server to your hard drive. This is the equivalent of clicking "Send & Receive Mail" in Outlook - in fact, many of these mail programs do use Maildir under the hood.
  • Maildir is not the only mail directory standard, but it is a good one. One program that can do the synchronization part is [OfflineIMAP](https://wiki.archlinux.org/title/OfflineIMAP). OfflineIMAP uses IMAP - so it will try to mirror the email between the server and your computer. The other major mail protocol, POP3, is better in many ways - but it is one way: With POP3, mail is "taken" from the server, so you will no longer see it in the mail provider's webmail interface, and it will be your problem to synchronize the emails between your multiple devices (eg. using Dropbox or its open source/self hosted alternatives). So IMAP, while being buggier and slower, is less of a commitment because you can rely on the mail server to do a bit more.
  • This all assumes that you picked a provider that supports POP3 and/or IMAP. Providers that don't are a hopeless case of vendor lock in.
  • Once a program like OfflineIMAP synchronizes mail to your computer, the problem is reduced to dealing with a bunch of files. With Maildir, for example, there will be folders in your filesystem roughly corresponding to the folders on the server (with IMAP, their structure may be a bit odd to handle the intricacies of IMAP, but it should be pretty straightforward still). Each email will be a file in the [`.eml` format](https://en.wikipedia.org/wiki/.eml), which is text based and somewhat readable with a text editor (depending on whether the mail is using HTML or not).
  • Filtering can be done by simply using any scripting language to go through the files in a certain folder, checking their content (such as the `From:` field), and moving them to another folder. This way you have complete control over what language you use to define filters, where you keep those definitions, and how you version them. I like Python/Shell scripts in a git repo.
  • Once the mails are moved between folders, you can run the synchronizer again, and it will move the mails on the server as well (if using IMAP).
  • Viewing can be done with any offline mail program which supports the "local folder" option for creating accounts. Because the synchronization is no longer a concern, you at least have more options in choosing a mail client with suitable UX. Indeed, it is no longer a mail *client*, but only a mail *reader*. If desired, many mail programs are also able to use filters on local folders - this is an alternative to writing separate filter scripts.
  • Note that *sending* mail is separate from receiving in traditional emails. Many providers and clients hide this from the user. However, protocols like IMAP or POP are merely for receiving mail sent to you. A separate SMTP server is used to actually send mail out. This is why mail clients will ask for a separate IMAP/POP server and another SMTP server. A mail synchronizer like OfflineIMAP will not handle sending email - you'll need a separate SMTP client (which is also integrated into many big mail clients like Thunderbird). Notably, in SMTP mail is "fire and forget" - putting a copy of it in "Sent"/"Outbox" is merely a trick that mail clients commonly do for you. If you use a minimal SMTP client, you would probably want to make sure you manually or automatically save a copy in "sent" (or whatever folder you want) so that OfflineIMAP can synchronize it.
#1: Initial revision by user avatar matthewsnyder‭ · 2023-07-01T18:53:19Z (12 months ago)
This is a broad topic, and I can't address all the details fully in one post. Instead, I will post an overview with enough keywords in each area, and leave it to the reader (and other questions) to explore each one in more detail.

The solution here is to separate the mail synchronization (receiving and sending mail) from mail usage.

Many programs support the ancient [Maildir format](https://en.wikipedia.org/wiki/Maildir) which is a good meeting point for this. The first step is to find and set up a program that will synchronize mail from the mail server to your hard drive. This is the equivalent of clicking "Send & Receive Mail" in Outlook - in fact, many of these mail programs do use Maildir under the hood. 

Maildir is not the only mail directory standard, but it is a good one. One program that can do the synchronization part is [OfflineIMAP](https://wiki.archlinux.org/title/OfflineIMAP). OfflineIMAP uses IMAP - so it will try to mirror the email between the server and your computer. The other major mail protocol, POP3, is better in many ways - but it is one way: With POP3, mail is "taken" from the server, so you will no longer see it in the mail provider's webmail interface, and it will be your problem to synchronize the emails between your multiple devices. So IMAP, while being buggier and slower, is less of a commitment because you can rely on the mail server to do a bit more.

This all assumes that you picked a provider that supports POP3 and/or IMAP. Providers that don't are a hopeless case of vendor lock in.

Once a program like OfflineIMAP synchronizes mail to your computer, the problem is reduced to dealing with a bunch of files. With Maildir, for example, there will be folders in your filesystem roughly corresponding to the folders on the server (with IMAP, their structure may be a bit odd to handle the intricacies of IMAP, but it should be pretty straightforward still). Each email will be a file in the [`.eml` format](https://en.wikipedia.org/wiki/.eml), which is text based and somewhat readable with a text editor (depending on whether the mail is using HTML or not).

Filtering can be done by simply using any scripting language to go through the files in a certain folder, checking their content (such as the `From:` field), and moving them to another folder. This way you have complete control over what language you use to define filters, where you keep those definitions, and how you version them. I like Python/Shell scripts in a git repo.

Once the mails are moved between folders, you can run the synchronizer again, and it will move the mails on the server as well (if using IMAP).

Viewing can be done with any offline mail program which supports the "local folder" option for creating accounts. Because the synchronization is no longer a concern, you at least have more options in choosing a mail client with suitable UX. Indeed, it is no longer a mail *client*, but only a mail *reader*. If desired, many mail programs are also able to use filters on local folders - this is an alternative to writing separate filter scripts.

Note that *sending* mail is separate from receiving in traditional emails. Many providers and clients hide this from the user. However, protocols like IMAP or POP are merely for receiving mail sent to you. A separate SMTP server is used to actually send mail out. This is why mail clients will ask for a separate IMAP/POP server and another SMTP server. A mail synchronizer like OfflineIMAP will not handle sending email - you'll need a separate SMTP client (which is also integrated into many big mail clients like Thunderbird). Notably, in SMTP mail is "fire and forget" - putting a copy of it in "Sent"/"Outbox" is merely a trick that mail clients commonly do for you. If you use a minimal SMTP client, you would probably want to make sure you manually or automatically save a copy in "sent" (or whatever folder you want) so that OfflineIMAP can synchronize it.