On Wed, 26 Jan 2011 18:46:46 +0200 "Eugene V. Lyubimkin"
<jackyf.de...@gmail.com> wrote:
> Hi,
> 
> On 2011-01-26 15:54, Denis Barbier wrote:
> > Nicolas is right, AFAICT one can run
> >    $ podebconf-report-po --postpone=/tmp/msg.out
> >    $ formail -s /usr/sbin/sendmail -t < /tmp/msg.out
> > 
> > Does this fit your needs?
> 
> This probably works, but it's unconvenient, kind of hack, and hardly can
> be called '/usr/sbin/sendmail support'. I would still want it
> implemented in the code. Or least without temporary file so I can pipe
> the mail directly to sendmail.

I just stumbled upon this 10 years old wishlist item. Rather than just
bumping it I will add that the 'formail' line can be replaced with an
awk command like:

awk 'BEGIN {cmd = "/usr/sbin/sendmail -t"} /^From / {close(cmd);
getline}; {print $0 | cmd}' < /tmp/msg.out

thus installing procmail can be avoided. It is not really solid
('^From_' could be found in the message body), but probably good enough
for the specific purpose. It still remains a kludge, and I hope
podebconf-report-po will get a --sendmail[=/path/to/sendmail] option
someday.

Cheers,

Paride

Reply via email to