Skip to content

Instantly share code, notes, and snippets.

@vincentbernat
Created June 8, 2014 20:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vincentbernat/532ce51f278146a30e11 to your computer and use it in GitHub Desktop.
Save vincentbernat/532ce51f278146a30e11 to your computer and use it in GitHub Desktop.
mbsync configuration
# -*- conf -*-
FSync no
#
# Luffy
#
IMAPStore remote-luffy
Host imap.luffy.cx
User bernat@luffy.cx
PassCmd "echo ${PASSWORD:-$(gpg --no-tty -qd ~/.authinfo.gpg | sed -n 's,^machine imap.luffy.cx .*password \\([^ ]*\\).*,\\1,p')}"
UseIMAPS yes
CertificateFile /etc/ssl/certs/StartCom_Certification_Authority.pem
IMAPStore local-luffy
Tunnel "/usr/lib/dovecot/imap -o mail_location=maildir:~/.mbsync/mails/luffy"
Channel luffy
Master :remote-luffy:
Slave :local-luffy:
Patterns INBOX * !Assoces/Crans/2008 !Boulot/Orange*
Create Slave
Expunge Both
CopyArrivalDate yes
#
# exoscale
#
IMAPStore remote-exoscale
Tunnel "ssh gates.luffy.cx -W localhost:1143"
RequireSSL no
User vbe
PassCmd "echo ${PASSWORD:-$(gpg --no-tty -qd ~/.authinfo.gpg | sed -n 's,^machine webmail.veltigroup.com .*password \\([^ ]*\\).*,\\1,p')}"
IMAPStore local-exoscale
Tunnel "/usr/lib/dovecot/imap -o mail_location=maildir:~/.mbsync/mails/exoscale"
Channel exoscale
Master :remote-exoscale:
Slave :local-exoscale:
Patterns INBOX * !Sync*
Create Slave
Expunge Both
CopyArrivalDate yes
#
# Usage example:
# - fullsync: mbsync -a
# - fullsync of luffy: mbsync luffy
# - quicksync of luffy: mbsync -n -d luffy
# - only sync INBOX: mbsync luffy:INBOX
#
@To1ne
Copy link

To1ne commented Oct 23, 2015

How do you create the ~/.authinfo.gpg file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment