[RndTbl] Month name to number, and sendmail

John Lange john.lange at bighostbox.com
Wed Feb 11 09:58:35 CST 2004


I'm not certain how much the sendmail differs from postfix but when I
tried the below suggested in postfix it did not alter the Return-Path in
the message header. -t allows you to extract recipients from the message
headers but the Return-Path remained set to whichever user invoked the
command.

In postfix you need the -f option as follows:

sendmail -t -f testing at taxpayer.com <<MAIL
From: "Angry Taxpayer" <testing at taxpayer.com>
To: "Dave" <bob at taxisbad.com>
Reply-To: "Paul Martin" <paulm at canadianrulingparty.gc.ca>
Subject: Tax cuts

Dear Sir,

I pay too much in tax

Tx

MAIL

Regards,

John Lange


On Wed, 2004-02-11 at 08:23, Sean A. Walberg wrote:
> Last night a couple of questions came up (both from Steve, I think).  The 
> first is for a filter that converts a month name to a month number from 
> within an ls listing.  Locale is probably the most correct approach, but 
> BFI works great too:
> 
> ls -l | perl -p -e '@m=qw/Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov 
> Dec/; for ($i=0; $i<@m; $i++){ s/\b$m[$i]\b/$i+1/e}'
> 
> And, how to generate an email from the command line with custom 
> from/reply-to headers, use sendmail -t and write down the headers 
> yourself:
> 
> /usr/lib/sendmail -t <<MAIL
> From: "Angry Taxpayer" <testing at taxpayer.com>
> To: "Sean" <sean at ertw.com>
> Reply-To: "Paul Martin" <paulm at canadianrulingparty.gc.ca>
> Subject: Tax cuts
> 
> Dear Sir,
> 
> I pay too much in tax
> 
> Tx
> 
> MAIL
-- 
John Lange
BigHostBox.com
(204) 885 0872




More information about the Roundtable mailing list