From owner-freebsd-questions@FreeBSD.ORG Sat Mar 15 20:38:05 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB82B106564A for ; Sat, 15 Mar 2008 20:38:05 +0000 (UTC) (envelope-from roberto.nunnari@supsi.ch) Received: from ti-edu.ch (posta.ti-edu.ch [195.176.176.171]) by mx1.freebsd.org (Postfix) with ESMTP id 3376C8FC18 for ; Sat, 15 Mar 2008 20:38:04 +0000 (UTC) (envelope-from roberto.nunnari@supsi.ch) X-Virus-Scanned: by cgpav Received: from [193.5.152.27] (HELO [127.0.0.1]) by ti-edu.ch (CommuniGate Pro SMTP 5.1.12) with ESMTP id 24874868; Sat, 15 Mar 2008 21:38:03 +0100 Message-ID: <47DC3362.9050607@supsi.ch> Date: Sat, 15 Mar 2008 21:36:50 +0100 From: Roberto Nunnari User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Matthew Seaman References: <47DB19D8.2010001@supsi.ch> <20080315085852.B28960@wojtek.tensor.gdynia.pl> <47DC005C.1050203@supsi.ch> <47DC0BB6.8000806@infracaninophile.co.uk> In-Reply-To: <47DC0BB6.8000806@infracaninophile.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Wojciech Puchar , freebsd-questions@freebsd.org Subject: Re: sendmail: from virtual address changed to maindomain X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Mar 2008 20:38:05 -0000 Hello Matthew. Thank you for your reply. please see my comments below. Matthew Seaman wrote: > Roberto Nunnari wrote: >> yes. here it is. >> >> Thank you. >> Robi. >> >> >> Wojciech Puchar wrote: >>>> >>>> entries in hostname.mc >>>> FEATURE(virtusertable, `hash -o /etc/mail/virtusertable') >>>> FEATURE(genericstable, `hash -o /etc/mail/genericstable') >>>> GENERICS_DOMAIN_FILE(`/etc/mail/generics-domains') >>>> >>>> MX hostnames are all A records. >>>> >>>> well, as long as the users receive/send emails from/to external domains >>>> everything works just fine, but when: >>>> >>>> john@mydomain1.com sends to jack@mydomain1.com or viceversa >>>> >>>> the message gets to the right user, but the from header is >>>> changed to john@maindomain.com, mailbox that doesn't exists! >>> >>> could you please show whole hostname.mc > > > I assume that you've commented out all of the MASQUERADE and GENERICS stuff > as part of your attempt to debug the problem and that you ultimately intend > to enable those capabilities. Not sure.. I had masquerading enabled long ago.. but then I took it out and it was working just fine, because the host is already in the right domain.. but now that I need to add virtualdomains I think I may need it.. right? > > Hmmm... not entirely certain, but I believe the part you are missing is: > > FEATURE(limited_masquerade)dnl Tried that, but doesn't help.. but.. one thing that looks odd to me is this: # sendmail -bt ADDRESS TEST MODE (ruleset 3 NOT automatically invoked) Enter
> /map generics a Map named "generics" not found > > /map virtuser a map_lookup: virtuser (a) no match (0) see? it says that it doesn't know about the generics map! Any more thoughts on this, please? Best regards. Robi > > This causes sendmail to only apply masquerading to the domains listed in > class {M} -- ie. what is listed in /etc/mail/generics-domains. Without > that sendmail will also masquerade for any host in class {w} which includes > any contents of /etc/mail/local-host-names, all the interfaces of your > server by IP and any names those interfaces resolve into as well. You > can see what the resulting lists are on your system by running > > sendmail -bt > > and then typing $=w or $=M at the prompt. > > Cheers, > > Matthew >