From: Sergey Matveev Date: Wed, 17 Feb 2021 08:27:11 +0000 (+0300) Subject: sendmail.sh example X-Git-Tag: v6.1.0^2~10 X-Git-Url: http://www.git.cypherpunks.ru/?a=commitdiff_plain;h=b2e5fe4499ea853ff112a94d9447a5ec90179e44;p=nncp.git sendmail.sh example --- diff --git a/doc/integration.texi b/doc/integration.texi index 098e877..84698cc 100644 --- a/doc/integration.texi +++ b/doc/integration.texi @@ -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 index 0000000..b826091 --- /dev/null +++ b/doc/sendmail.sh @@ -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