Subject: Re: Weird 'From' line

From: Roman Czyborra <[email-masked]>
Date: Thu, 7 Apr 1994 00:47:27 +0200

> I've been using Procmail for a while now, and it's going great, with
> the exception of one weird thing: ...  The 'From:' line is still
> intact, so it does list the correct sender using elm, it's just that
> my LOG is unusable this way, it lists my own address as sender on
> all mails...  I use procmail to forward my mail to the right machine
> before it goes through my actual .procmailrc

You forward the mail to yourself first, so the mail on gaia comes from
yourself, that's why you show up as the SMTP sender.

You can force formail to regenerate the envelope from the From: line
if you first remove it.

	:0wfh
	| formail -I 'From '

	:0wfh
	| formail -t

> ---------------------.forward (one line), 'gaia' is my mail-server --------
> "| IFS=' '; if test .`/bin/uname -n` != .gaia;
> then exec /<mydir>/bin/procmail .procmailrc-other;
> else exec /<mydir>/bin/procmail .procmailrc-gaia; fi #levien"

That is unnecessarily complicated since we have the HOST variable
for right that purpose.  You only need

.forward:
	"| IFS=' '; exec /home/l/levien/bin/procmail .procmailrc .sendtogaia"

.sendtogaia:
	:0
	! [email-masked]

.procmailrc:
	PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin
	MAILDIR=Mail
	DEFAULT=/var/spool/mail/levien	# didn't procmail find the
					# right path?
	HOST=gaia
	LOCKFILE=$HOME/.lockmail
	LOGFILE=$HOME/PROCMAIL.LOG

	:0wfh
	| formail -I 'From '
	:0wfh
	| formail -t

	<various recipes>

---

From: Roman Czyborra <[email-masked]>
Date: Thu, 7 Apr 1994 00:52:00 +0200

I forgot to add the w flag to be on the safe side:

.sendtogaia:
 	:0 w