# .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/leo/.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=Leo Okawa Ericson
[email protected]
[email protected]
# 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;new;
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
# Cryptography related configuration
#
# The following *deprecated* option is currently supported:
#
# gpg_path
# binary name or full path to invoke gpg.
# NOTE: In a future build, this option will be ignored.
# Setting $PATH is a better approach.
#
[crypto]
gpg_path=gpg
Afew is my tagging script
# This is the default filter chain
[SpamFilter]
[KillThreadsFilter]
[FolderNameFilter.1]
folder_transforms = relevant-info/INBOX:main sekreterare/inbox:sekreterare
folder_blacklist = sekreterare/bak.alla_mail sekreterare/bak.skickat sekreterare/bak.papperskorgen sekreterare/bak.utkast sekreterare/bak relevant-info/Sent
[ListMailsFilter]
# [FolderNameFilter.2]
# folder_explicit_list = relevant-info
[Filter.0]
query = 'tag:relevant-info/Trash'
tags = +killed; -unread
message = "Move Trash to Trash"
[Filter.1]
query = 'from:[email protected]'
tags = +gitlab -inbox
message = "Gitlab skips the inbox"
# [Filter.2]
# query = to:[email protected] OR from:[email protected] OR to:[email protected]
# tags = +sekreterare
# message = "sekreterare"
[Filter.3]
query = to:[email protected]
tags = +relevant; +main
message = "relevant"
# [Filter.4]
# query = to:[email protected] OR to:[email protected] OR to: "Computer Architecture" OR from:uu.se
# tags = +school
# message = "school"
[Filter.5]
query = from:[email protected]
tags = +piazza
message = "piazza"
[Filter.8]
query = to:[email protected]
tags = -unread; +rss-unread
[Filter.6]
query = from:@www.dn.se
tags = +dn-rss; -inbox;
message = "Dagens nyheter"
[Filter.7]
query = from:[email protected]
tags = +dn-rss; +nyheter
message = "Dagens nyheter nyheter"
[Filter.9]
query = from:sportadmin.se
tags = +ubtk
message = "Uppsalabtk"
[Filter.10]
query = from:[email protected]
tags = -inbox
message = "Skip inbox"
[MailMover]
folders = relevant-info/INBOX relevant-info/INBOX.Rss
relevant-info/INBOX = 'tag:main':relevant-info/INBOX.MainInbox 'tag:relevant':relevant-info/INBOX.Relevant 'tag:school':relevant-info/INBOX.SchoolInbox
relevant-info/INBOX.Rss = 'tag:dn-rss AND tag:nyheter':relevant-info/INBOX.Rss.DN_Nyheter 'tag:dn-rss AND (NOT tag:nyheter)':relevant-info/INBOX.Rss.DN
I use isync for syncing to gmail.
I need to create some directories for this to work:
mkdir -p ~/.mail/gmail
IMAPAccount relevant-info
# Address to connect to
Host imap.mailbox.org
User [email protected]
PassCmd "secret-tool lookup account KPXC_SS"
#
# Use SSL
SSLType IMAPS
# The following line should work. If get certificate errors, uncomment the two following lines and read the "Troubleshooting" section.
CertificateFile /etc/ssl/certs/ca-certificates.crt
#CertificateFile ~/.cert/imap.gmail.com.pem
#CertificateFile ~/.cert/Equifax_Secure_CA.pem
IMAPStore relevant-info-remote
Account relevant-info
MaildirStore relevant-info-local
Subfolders Verbatim
# The trailing "/" is important
Path ~/.mail/relevant-info/
Inbox ~/.mail/relevant-info/Inbox/
Channel relevant-info
Master :relevant-info-remote:
Slave :relevant-info-local:
Patterns *
# Automatically create missing mailboxes, both locally and on the server
Create Both
# Save the synchronization state files in the relevant directory
SyncState *
####
Emacs portion of the config: Sending
#
# This file focusses on TLS and authentication. Features not used here include
# logging, timeouts, SOCKS proxies, TLS parameters, Delivery Status Notification
# (DSN) settings, and more.
# Set default values for all following accounts.
defaults
logfile ~/.msmtp.log
# Use the mail submission port 587 instead of the SMTP port 25.
port 587
# Always use TLS.
tls on
# Set a list of trusted CAs for TLS. The default is to use system settings, but
# you can select your own file.
#tls_trust_file /etc/ssl/certs/ca-certificates.crt
# If you select your own file, you should also use the tls_crl_file command to
# check for revoked certificates, but unfortunately getting revocation lists and
# keeping them up to date is not straightforward.
#tls_crl_file ~/.tls-crls
tls_trust_file /etc/ssl/certs/ca-certificates.crt
account mailbox
# Host name of the SMTP server
host smtp.mailbox.org
# As an alternative to tls_trust_file/tls_crl_file, you can use tls_fingerprint
# to pin a single certificate. You have to update the fingerprint when the
# server certificate changes, but an attacker cannot trick you into accepting
# a fraudulent certificate. Get the fingerprint with
# $ msmtp --serverinfo --tls --tls-certcheck=off --host=smtp.freemail.example
#tls_fingerprint 00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33
# Envelope-from address
# from [email protected]
# Authentication. The password is given using one of five methods, see below.
auth on
user [email protected]
# Password method 1: Add the password to the system keyring, and let msmtp get
# it automatically. To set the keyring password using Gnome's libsecret:
# $ secret-tool store --label=msmtp \
# host smtp.freemail.example \
# service smtp \
# user joe.smith
# Password method 2: Store the password in an encrypted file, and tell msmtp
# which command to use to decrypt it. This is usually used with GnuPG, as in
# this example. Usually gpg-agent will ask once for the decryption password.
passwordeval "secret-tool lookup account KPXC_SS"
# Password method 3: Store the password directly in this file. Usually it is not
# a good idea to store passwords in plain text files. If you do it anyway, at
# least make sure that this file can only be read by yourself.
#password secret123
# Password method 4: Store the password in ~/.netrc. This method is probably not
# relevant anymore.
# Password method 5: Do not specify a password. Msmtp will then prompt you for
# it. This means you need to be able to type into a terminal when msmtp runs.
# # A second mail address at the same freemail service
# account freemail2 : freemail
# from [email protected]
# # The SMTP server of your ISP
# account isp
# host mail.isp.example
# from [email protected]
# auth on
# user 12345
# # Set a default account
account default : mailbox