7
mail
thomas edited this page 2020-05-06 00:54:58 +02:00
IMAP Synchronisation
Offlineimap
Config
[general]
# List of accounts to be synced, separated by a comma.
accounts = rub-ex
[Account rub-ex]
# Identifier for the local repository; e.g. the maildir to be synced via IMAP.
localrepository = rub-local
# Identifier for the remote repository; i.e. the actual IMAP, usually non-local.
remoterepository = rub-remote
# Status cache. Default is plain, which eventually becomes huge and slow.
#status_backend = sqlite
[Repository rub-local]
# Currently, offlineimap only supports maildir and IMAP for local repositories.
type = Maildir
# Where should the mail be placed?
localfolders = /home/thomas/mail/offlineimap
[Repository rub-remote]
# Remote repos can be IMAP or Gmail, the latter being a preconfigured IMAP.
type = IMAP
remotehost = mail.exchange.ruhr-uni-bochum.de
remoteuser = schnetqh
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
Benchmark
Initial:
$ time offlineimap -c offlineimaprc
Account sync rub-ex:
*** Finished account 'rub-ex' in 113:27
ERROR: Exceptions occurred during the run!
ERROR: IMAP server 'rub-remote' does not have a message with UID '7'
Traceback:
File "/usr/lib/python2.7/site-packages/offlineimap/folder/Base.py", line 839, in copymessageto
message = self.getmessage(uid)
File "/usr/lib/python2.7/site-packages/offlineimap/folder/IMAP.py", line 324, in getmessage
data = self._fetch_from_imap(str(uid), self.retrycount)
File "/usr/lib/python2.7/site-packages/offlineimap/folder/IMAP.py", line 830, in _fetch_from_imap
raise OfflineImapError(reason, severity)
ERROR: IMAP server 'rub-remote' does not have a message with UID '1'
Traceback:
File "/usr/lib/python2.7/site-packages/offlineimap/folder/Base.py", line 839, in copymessageto
message = self.getmessage(uid)
File "/usr/lib/python2.7/site-packages/offlineimap/folder/IMAP.py", line 324, in getmessage
data = self._fetch_from_imap(str(uid), self.retrycount)
File "/usr/lib/python2.7/site-packages/offlineimap/folder/IMAP.py", line 830, in _fetch_from_imap
raise OfflineImapError(reason, severity)
ERROR: IMAP server 'rub-remote' does not have a message with UID '2'
Traceback:
File "/usr/lib/python2.7/site-packages/offlineimap/folder/Base.py", line 839, in copymessageto
message = self.getmessage(uid)
File "/usr/lib/python2.7/site-packages/offlineimap/folder/IMAP.py", line 324, in getmessage
data = self._fetch_from_imap(str(uid), self.retrycount)
File "/usr/lib/python2.7/site-packages/offlineimap/folder/IMAP.py", line 830, in _fetch_from_imap
raise OfflineImapError(reason, severity)
offlineimap -c offlineimaprc 457.36s user 311.00s system 11% cpu 1:53:27.82 total
Kumulativ:
$ time offlineimap -c ~/.offlineimaprc
*** Finished account 'rub-ex' in 0:15
ERROR: Exceptions occurred during the run!
ERROR: IMAP server 'rub-remote' does not have a message with UID '1'
Traceback:
File "/usr/lib/python2.7/site-packages/offlineimap/folder/Base.py", line 839, in copymessageto
message = self.getmessage(uid)
File "/usr/lib/python2.7/site-packages/offlineimap/folder/IMAP.py", line 324, in getmessage
data = self._fetch_from_imap(str(uid), self.retrycount)
File "/usr/lib/python2.7/site-packages/offlineimap/folder/IMAP.py", line 830, in _fetch_from_imap
raise OfflineImapError(reason, severity)
offlineimap -c offlineimaprc 1.71s user 0.57s system 14% cpu 15.401 total
Vollständigkeit/Sauberkeit
Mbsync/isync
Config
IMAPAccount rubdav
Host mail.exchange.ruhr-uni-bochum.de
User schnetqh
#PassCmd "/usr/bin/pass mail/rub/mbsync"
Pass passwort
Port 993
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt
# Exchange stupidity fix (parallel fetching)
PipelineDepth 1
IMAPStore rubdav-remote
Account rubdav
MaildirStore rubdav-local
SubFolders Verbatim
Path /home/thomas/mail/mbsync/
Inbox /home/thomas/mail/mbsync/Inbox/
# Subfolders foo/bar/fuck/you
Channel rubdav
Master :rubdav-remote:
Slave :rubdav-local:
# 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 *
Benchmark
Initial:
$ time mbsync -a -c ~/.mbsyncrc mbsync -a -c mbsyncrc 12.24s user 35.29s system 0% cpu 1:32:34.04 total
Kumulativ:
$ time mbsync -a -c ~/.mbsyncrc mbsync -a -c mbsyncrc 0.08s user 0.10s system 2% cpu 6.924 total
Vollständigkeit/Sauberkeit
Indexing
notmuch
Config
# .notmuch-config - Configuration file for the notmuch mail system
#
# For more information about notmuch, see https://notmuchmail.org
# Database configuration
#
# The only value supported here is 'path' which should be the top-level
# directory where your mail currently exists and to where mail will be
# delivered in the future. Files should be individual email messages.
# Notmuch will store its database within a sub-directory of the path
# configured here named ".notmuch".
#
[database]
path=/home/thomas/mail
# User configuration
#
# Here is where you can let notmuch know how you would like to be
# addressed. Valid settings are
#
# name Your full name.
# primary_email Your primary email address.
# other_email A list (separated by ';') of other email addresses
# at which you receive email.
#
# Notmuch will use the various email addresses configured here when
# formatting replies. It will avoid including your own addresses in the
# recipient list of replies, and will set the From address based on the
# address to which the original email was addressed.
#
[user]
name=Thomas Schneider
primary_email=thomas.schneider@ruhr-uni-bochum.de
other_email=thomas.schneider-q2p@ruhr-uni-bochum.de;
# Configuration for "notmuch new"
#
# The following options are supported here:
#
# tags A list (separated by ';') of the tags that will be
# added to all messages incorporated by "notmuch new".
#
# ignore A list (separated by ';') of file and directory names
# that will not be searched for messages by "notmuch new".
#
# NOTE: *Every* file/directory that goes by one of those
# names will be ignored, independent of its depth/location
# in the mail store.
#
[new]
tags=unread;inbox;
ignore=
# Search configuration
#
# The following option is supported here:
#
# exclude_tags
# A ;-separated list of tags that will be excluded from
# search results by default. Using an excluded tag in a
# query will override that exclusion.
#
[search]
exclude_tags=deleted;spam;
# Maildir compatibility configuration
#
# The following option is supported here:
#
# synchronize_flags Valid values are true and false.
#
# If true, then the following maildir flags (in message filenames)
# will be synchronized with the corresponding notmuch tags:
#
# Flag Tag
# ---- -------
# D draft
# F flagged
# P passed
# R replied
# S unread (added when 'S' flag is not present)
#
# The "notmuch new" command will notice flag changes in filenames
# and update tags, while the "notmuch tag" and "notmuch restore"
# commands will notice tag changes and update flags in filenames
#
[maildir]
synchronize_flags=true
Benchmark
offlineimap:
$ time notmuch --config=notmuch.oimap new
Found 23717 total files (that's not much mail).
Processed 23717 total files in 1m 37s (244 files/sec.).
Added 23213 new messages to the database.
notmuch --config=notmuch.oimap new 75.53s user 2.86s system 71% cpu 1:49.22 total
mbsync:
$ time notmuch --config=notmuch.mbsync new
Found 23514 total files (that's not much mail).
Processed 23514 total files in 1m 37s (241 files/sec.).
Added 22912 new messages to the database.
notmuch --config=notmuch.mbsync new 75.42s user 2.95s system 69% cpu 1:52.78 total
Note that exchange adds shit like ~/mail/Calendar with not readable "mails" that are your "events"
mu2e
TODO (habe mich schon für notmuch entschieden, aber muss mir nochmal angucken was an mu2e schlecht war)
Lesen/Senden (mua)
TODO