Q0084

Nigel Metheringham edited this page Nov 29, 2012 · 2 revisions
Clone this wiki locally

Q0084

Question

I want to set up an alias that pipes a message to gpg and then pipes the result to mailx to resubmit the message, but when I use my tested command in an alias file, I get an error from gpg.

Answer

Probably you are using a shell command with two pipe symbols in it. An alias like this:

gpg-xxx: "|gpg <options> | mailx <options"

does not work, because Exim does not run pipes under a shell by default. You must call a shell explicitly if you want to make use of the shell's features for double-piping, either by piping to /bin/sh with a suitable -c option, or by piping to a shell script.