diff options
-rwxr-xr-x | install.scm | 45 | ||||
-rw-r--r-- | mail/dot-mbsyncrc.personal (renamed from mail/dot-mbsyncrc) | 1 | ||||
-rw-r--r-- | mail/dot-mbsyncrc.work | 28 |
3 files changed, 73 insertions, 1 deletions
diff --git a/install.scm b/install.scm index 46ee7a2..f56a591 100755 --- a/install.scm +++ b/install.scm @@ -156,6 +156,49 @@ (log-msg 'INFO " Symlink Tribe29 config") (config-links "git/tribe29" "~/git/.gitconfig" #f)) +(define (format-config-entry item) + (format #t "[~a]~%" (car item)) + (format #t "~:{~a=~@{~a~^;~}~%~}~%" (cdr item))) + +(define (mail-config) + (log-msg 'INFO "Configuring mail") + (log-msg 'INFO " Symlink mbsync") + (config-links (if (string=? (gethostname) "klappbier") + "mail/dot-mbsyncrc.work" + "mail/dot-mbsyncrc.personal") + "~/.mbsyncrc" #f) + (let* ((notmuch-config-file (expand-file "~/.notmuch-config")) + (emails + (list + "hi@oscarnajera.com" + "hello@oscarnajera.com" + "najera.oscar@gmail.com" + "oscar.najera-ocampo@u-psud.fr" + ;; Employer related + "oscar.najera@tribe29.com" + "on@mathias-kettner.de")) + (user-mail + (if (string=? (gethostname) "klappbier") + "oscar.najera@tribe29.com" + "hi@oscarnajera.com")) + ;; setting up notmuch config + (config + `((database (path ".mail")) + (user (name "Oscar Najera") + (primary_email ,user-mail) + ,(cons 'other_email (delete user-mail emails))) + (new (tags new) + (ignore .uidvalidity .mbsyncstate .directory)) + (search (exclude_tags deleted spam)) + (maildir (synchronize_flags true)) + (crypto (gpg_path gpg))))) + (clean-file notmuch-config-file #f) + (with-output-to-file notmuch-config-file + (lambda () + (display "# -*- mode: conf-unix -*-\n# managed by dotfiles install\n") + (for-each format-config-entry config))) + (chmod notmuch-config-file #o400))) + (define (main args) (setup-logging) (log-msg 'INFO "Symlink PIM") @@ -167,6 +210,6 @@ (config-links "gnupu/gpg-agent.conf" "~/.gnupg/gpg-agent" #f) (symlink-tree "bin" "~/.local/bin") (symlink-tree "config" "~/.config") - (symlink-tree "mail" "~/") + (mail-config) (shutdown-logging)) diff --git a/mail/dot-mbsyncrc b/mail/dot-mbsyncrc.personal index 3e3e7d6..6c3be07 100644 --- a/mail/dot-mbsyncrc +++ b/mail/dot-mbsyncrc.personal @@ -135,6 +135,7 @@ Patterns * Create Both SyncState * Expunge Both + # Local Variables: # mode: conf-unix # End: diff --git a/mail/dot-mbsyncrc.work b/mail/dot-mbsyncrc.work new file mode 100644 index 0000000..3dc9bf2 --- /dev/null +++ b/mail/dot-mbsyncrc.work @@ -0,0 +1,28 @@ +############################################################################### +# Work +IMAPAccount work +Host mx.tribe29.com +User on +PassCmd "pass show Correos/mx.tribe29.com" +AuthMechs LOGIN +SSLType IMAPS + +IMAPStore work-remote +Account work + +MaildirStore work-local +Path ~/.mail/work/ +Inbox ~/.mail/work/Inbox +SubFolders Verbatim + +Channel work +Master :work-remote: +Slave :work-local: +Patterns * +Create Both +SyncState * +Expunge Both + +# Local Variables: +# mode: conf-unix +# End: |