aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2024-08-16 12:14:20 +0000
committerWerner Koch <[email protected]>2024-08-16 12:14:20 +0000
commit1766efbe5e10029f84381ec77aa04e187d1e78ff (patch)
tree0e43f2a09b4f3ae415175af6194c3e318f931438 /doc
parenttools: Fix bashishm (diff)
downloadgnupg-1766efbe5e10029f84381ec77aa04e187d1e78ff.tar.gz
gnupg-1766efbe5e10029f84381ec77aa04e187d1e78ff.zip
doc: Add another example for gpg-mail-tube
--
Diffstat (limited to 'doc')
-rw-r--r--doc/tools.texi33
1 files changed, 33 insertions, 0 deletions
diff --git a/doc/tools.texi b/doc/tools.texi
index c38dfbf68..75765b5c3 100644
--- a/doc/tools.texi
+++ b/doc/tools.texi
@@ -2271,6 +2271,39 @@ transport_filter = /usr/local/bin/gpg-mail-tube --setenv HOME=$@{home@} \
@noindent
For a remote transport the use of @option{size_addition} and an
explicit setting of the user and its home directory might be required.
+To avoid permission problems it is often better to use a service like
+@command{userv} to run the command under a different user. This can
+be done by using this transport_filter:
+
+@example
+transport_filter = /usr/bin/userv -- foo gpg-mail-tube $pipe_addresses
+@end example
+
+With @var{foo} being the account name used by GnuPG. In that user's
+home directory you will install a file @file{~/.userv/rc} with this
+content:
+
+@example
+if ( glob service gpg-mail-tube
+ & glob calling-user Debian-exim
+ & glob service-user foo
+ )
+ reset
+ errors-to-syslog
+ no-suppress-args
+ execute /usr/local/bin/gpg-mail-tube \
+ -v --no-stderr \
+ --log-file /home/foo/logs/mail-tube.log \
+ --setenv HOME=/home/foo --
+ quit
+fi
+@end example
+
+Take care to have the trailing double dashes and adjust the log-file
+as needed. The errors-to-syslog statement makes sure that errors
+pertaining to the userv system (e.g. script errors) are directed to
+the syslog (facility is "user", level is "error"). If needed replace
+Debian-exim by the name of the user under which Exim is running.
@mansect see also