From a97cc198421e75404afe53533ead1278df1f96b1 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Sun, 22 Mar 2020 16:39:51 +1300 Subject: [PATCH] encapsulate preauthtunnel in script --- .gitignore.d/offlineimap | 1 + .offlineimap/preauthtunnel.sh | 3 +++ .offlineimaprc | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100755 .offlineimap/preauthtunnel.sh diff --git a/.gitignore.d/offlineimap b/.gitignore.d/offlineimap index 7acdc90..03dcd57 100644 --- a/.gitignore.d/offlineimap +++ b/.gitignore.d/offlineimap @@ -6,6 +6,7 @@ !/.offlineimap/.gitignore !/.offlineimap/helper.py !/.offlineimap/known_hosts +!/.offlineimap/preauthtunnel.sh !/.offlineimaprc !/.offlineimap/ssh_config !/.var/offlineimap/.gitignore diff --git a/.offlineimap/preauthtunnel.sh b/.offlineimap/preauthtunnel.sh new file mode 100755 index 0000000..0976974 --- /dev/null +++ b/.offlineimap/preauthtunnel.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +exec ssh -F ~/.offlineimap/ssh_config -i ~/.offlineimap/${1}.ssh-seckey ${1} diff --git a/.offlineimaprc b/.offlineimaprc index aa7267c..bcc8bbc 100644 --- a/.offlineimaprc +++ b/.offlineimaprc @@ -40,7 +40,7 @@ type = IMAP maxconnections = 5 holdconnectionopen = yes ssh_host = madduck-net.imap.madduck.net -preauthtunnel = ssh -F ~/.offlineimap/ssh_config -i ~/.offlineimap/%(ssh_host)s.ssh-seckey %(ssh_host)s +preauthtunnel = .offlineimap/preauthtunnel.sh %(ssh_host)s expunge = yes foldersort = py_foldersort_main nametrans = py_nametrans @@ -51,7 +51,7 @@ type = IMAP maxconnections = 1 holdconnectionopen = no ssh_host = madduck-net.imap.madduck.net -preauthtunnel = ssh -F ~/.offlineimap/ssh_config -i ~/.offlineimap/%(ssh_host)s.ssh-seckey %(ssh_host)s +preauthtunnel = .offlineimap/preauthtunnel.sh %(ssh_host)s expunge = yes folderfilter = py_folderfilter_bulk foldersort = py_foldersort_main -- 2.39.5