[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rewriting headers with crossbar.cf



A few months ago Matti suggest a hack for crossbar that  allow virtual
domains be present in the Sender address.

	smtp|smtpx|local|bsmtp3*)
-		tmp="$(smtproute "$(user $from)")"
+		case "$(channel $from)" in
+		local)
+			# This looks weird, doesn't it ?
+			# the 'host' component contains FQDN form of
+			# address on 'local' channels, others have it
+			# also in the 'user' part.
+			tmp="$(smtproute "$(host $from)")"
+			;;
+		*)
+			tmp="$(smtproute "$(user $from)")"
+			;;
+		esac

Well, this code is present in the latest snapshot, but doesn't actually
works (it works with 2.99.49p9)

[alfre@facil3 alfre]$ /usr/lib/sendmail -v -falfre@ibd.es alfre@ibd.es
From: alfre@ibd.es
To: alfre@ibd.es
Subject: testing

testing
[alfre@facil3 alfre]$
l <19980601175934Z365215-19255+2@facil3.facilnet.es>
e alfre
e alfre@facilnet.es
s local alfre alfre@facilnet.es 500
r       local alfre@ibd.es alfre@facilnet.es 500
N ORCPT=rfc822;alfre@ibd.es
headers rewritten using 'internet' function:
Received: from alfre@localhost by facil3.facilnet.es id <365215-19255>; Mon,
1 Jun 1998 19:59:32 +0200
Sender: alfre@facilnet.es
From:   alfre@facilnet.es
To:     alfre@facilnet.es
Subject: testing
Message-Id: <19980601175934Z365215-19255+2@facil3.facilnet.es>
Date:   Mon, 1 Jun 1998 19:59:32 +0200

router done processing 365215-19255
[alfre@facil3 alfre]$ To run UID=0 GID=2 ARGV[] = 'procmail' '-f'
'alfre@facilnet.es' '-a' 'alfre@ibd.es' '-d' 'alfre@facilnet.es'
/usr/bin/procmail
        procmail -f alfre@facilnet.es -a alfre@ibd.es -d alfre@facilnet.es
Received: from alfre@localhost by facil3.facilnet.es id <365215-19255>; Mon,
1 Jun 1998 19:59:32 +0200
Sender: alfre@facilnet.es
From:   alfre@facilnet.es
To:     alfre@facilnet.es
Subject: testing
Message-Id: <19980601175934Z365215-19255+2@facil3.facilnet.es>
Date:   Mon, 1 Jun 1998 19:59:32 +0200
Return-Path: <alfre@facilnet.es>

Diagnostic:
scheduler done processing 365215-19255


Well, any ideas?

alfredo