software:cli:mail:sync
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| software:cli:mail:sync [2021/12/29 21:09] – ↷ Page moved from mail:sync to software:cli:mail:sync warnaud | software:cli:mail:sync [2021/12/29 21:09] (current) – ↷ Links adapted because of a move operation warnaud | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Introduction ====== | ||
| + | Tired of having mails everywhere and use different software/ | ||
| + | First we need to retrieve emails, there are lots of software doing this. I choose isync as it works out of the box for Gmail accounts :) | ||
| + | ====== Pre-requisite ====== | ||
| + | You need to enable IMAP connection on your gmail account: Setttings(button)/ | ||
| + | ====== Install ====== | ||
| + | You need to install isync | ||
| + | ====== Configuration ====== | ||
| + | I use to store mails in the following folder hierarchy: | ||
| + | <code bash> | ||
| + | / | ||
| + | └── superaddress1@gmail.com | ||
| + | └── superaddress2@gmail.com | ||
| + | └── superaddress3@gmail.com | ||
| + | └── … | ||
| + | </ | ||
| + | This way all my mails from all my accounts will be synchronized in one place :) thus easily browsable/ | ||
| + | for configuration: | ||
| + | ===== .mbsyncrc ===== | ||
| + | The configuration file that will contains all nice email address to retrieve/ | ||
| + | <code bash> | ||
| + | IMAPAccount gmail | ||
| + | # Address to connect to | ||
| + | Host imap.gmail.com | ||
| + | User superaddress1@gmail.com | ||
| + | Pass YourSup3rP@ssw0rd | ||
| + | #To store the password in an encrypted file use PassCmd instead of Pass | ||
| + | # PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/ | ||
| + | # | ||
| + | # Use SSL | ||
| + | SSLType IMAPS | ||
| + | # The following line should work. If get certificate errors, uncomment the two following lines and read the " | ||
| + | CertificateFile / | ||
| + | # | ||
| + | # | ||
| + | |||
| + | IMAPStore gmail-remote | ||
| + | Account gmail | ||
| + | |||
| + | MaildirStore gmail-local | ||
| + | # The trailing "/" | ||
| + | Path ~/ | ||
| + | Inbox ~/ | ||
| + | |||
| + | Channel gmail | ||
| + | Master : | ||
| + | Slave : | ||
| + | # Exclude everything under the internal [Gmail] folder, except the interesting folders | ||
| + | Patterns * ![Gmail]* " | ||
| + | # Or include everything | ||
| + | #Patterns * | ||
| + | # Automatically create missing mailboxes, both locally and on the server | ||
| + | Create Both | ||
| + | # Save the synchronization state files in the relevant directory | ||
| + | SyncState * | ||
| + | </ | ||
| + | ====== Sync ====== | ||
| + | now we can test if it works: | ||
| + | <code bash> | ||
| + | mbsync gmail | ||
| + | </ | ||
| + | depending on the size of your mailbox you better go grab a coffee :) | ||
| + | you can also, and I would recommend it, filter you email prior to sync: | ||
| + | Once all this is done you can switch to [[software: | ||
| + | ====== Reference ====== | ||
| + | * https:// | ||
