From owner-freebsd-questions Fri Sep 10 7:45:42 1999 Delivered-To: freebsd-questions@freebsd.org Received: from storm.FreeBSD.org.uk (storm.freebsd.org.uk [194.242.128.198]) by hub.freebsd.org (Postfix) with ESMTP id 775CC14E7E for ; Fri, 10 Sep 1999 07:45:38 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from keep.lan.Awfulhak.org (root@localhost [127.0.0.1]) by storm.FreeBSD.org.uk (8.9.3/8.9.3) with ESMTP id PAA90046; Fri, 10 Sep 1999 15:45:14 +0100 (BST) (envelope-from brian@Awfulhak.org) Received: from keep.lan.Awfulhak.org (brian@localhost.lan.Awfulhak.org [127.0.0.1]) by keep.lan.Awfulhak.org (8.9.3/8.9.3) with ESMTP id PAA44677; Fri, 10 Sep 1999 15:49:53 +0100 (BST) (envelope-from brian@keep.lan.Awfulhak.org) Message-Id: <199909101449.PAA44677@keep.lan.Awfulhak.org> X-Mailer: exmh version 2.0.2 2/24/98 To: Cliff Addy Cc: questions@FreeBSD.ORG Subject: Re: Sendmail generics mapping problem In-reply-to: Your message of "Fri, 10 Sep 1999 08:48:09 EDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 10 Sep 1999 15:49:53 +0100 From: Brian Somers Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The genericstable doesn't alter the From line, it changes the way it's written. You've find that ``mail'' (the program) works, but mailers that add a From line don't. The only way I could get this to work is: LOCAL_RULE_1 Rlocaluser<@local.domain.> $: fakeuser<@fake.domain.> Rotherlocaluser<@local.domain.> $: otherfakeuser<@otherfake.domain.> You need the genericstable stuff too. If anyone can tell me how to *change* the From line properly, I'd be much obliged ! > We've had sendmail set up for years to do virtual stuff by hacking > sendmail.cf directly. However, on our new servers, I'm trying to do > things "the sendmail way" by using the m4 macros, etc. We're using > 3.2-Release. > > The incoming virtualization is working fine. However, I can't get the > outgoing remapping to work at all, e.g. if user@machine.domain sends email > it appears that way instead of being rewritten as name@otherdomain. > > In my m4 .mc file, I have: > > FEATURE(`genericstable', `btree /etc/genericstable')dnl > GENERICS_DOMAIN_FILE(`/etc/sendmail.cG')dnl > > which generates this in the sendmail.cf > > Kgenerics btree /etc/genericstable > > and > > FG/etc/sendmail.cG > > My /etc/genericstable file contains > > testcase office@testcase.com > > and the /etc/sendmail.cG has > > testcase.com > > I issue the commands: > > makemap -d btree genericstable.db < genericstable > > Now, according to the docs at sendmail.org, any email sent by the user > testcase should have the From header rewritten as office@testcase.com. > However, it remains as testcase@f2.addy.com > > BTW, I've tried changing the genericstable file from btree to hash with no > effect. > > Does anyone know what I've missed here? > > Cliff -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message