]> Cypherpunks.ru repositories - nncp.git/commitdiff
sendmail.sh example
authorSergey Matveev <stargrave@stargrave.org>
Wed, 17 Feb 2021 08:27:11 +0000 (11:27 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 17 Feb 2021 08:27:11 +0000 (11:27 +0300)
doc/integration.texi
doc/sendmail.sh [new file with mode: 0755]

index 098e87726fce61f6d2b5837c8259623cae785ff3..84698ccad61fbf1c40c4cc0478be64279a42d372 100644 (file)
@@ -71,7 +71,10 @@ information will be lost. Possibly you will also need somehow to
 preserve that header on the receiving side, because @command{sendmail}
 command will replace it. For example you can rename it before feeding to
 @command{sendmail} with
-@code{reformail -R Return-Path: X-Original-Return-Path: | sendmail}.
+@code{reformail -R Return-Path: X-Original-Return-Path: | sendmail}, or
+extract with:
+
+@verbatiminclude sendmail.sh
 
 @item Specify that mail for @emph{example.com}, should be delivered via
 NNCP, to a host named @emph{nncp-host}:
diff --git a/doc/sendmail.sh b/doc/sendmail.sh
new file mode 100755 (executable)
index 0000000..b826091
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh -e
+
+tmp=`mktemp`
+trap "rm -f $tmp" HUP PIPE INT QUIT TERM EXIT
+cat > $tmp
+sendmail -f "`reformail -x Return-Path: < $tmp`" $@ < $tmp