From b2e5fe4499ea853ff112a94d9447a5ec90179e44 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Wed, 17 Feb 2021 11:27:11 +0300 Subject: [PATCH] sendmail.sh example --- doc/integration.texi | 5 ++++- doc/sendmail.sh | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 doc/sendmail.sh 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 -- 2.44.0