Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Mar 2008 21:36:50 +0100
From:      Roberto Nunnari <roberto.nunnari@supsi.ch>
To:        Matthew Seaman <m.seaman@infracaninophile.co.uk>
Cc:        Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>, freebsd-questions@freebsd.org
Subject:   Re: sendmail: from virtual address changed to maindomain
Message-ID:  <47DC3362.9050607@supsi.ch>
In-Reply-To: <47DC0BB6.8000806@infracaninophile.co.uk>
References:  <47DB19D8.2010001@supsi.ch>	<20080315085852.B28960@wojtek.tensor.gdynia.pl> <47DC005C.1050203@supsi.ch> <47DC0BB6.8000806@infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <ruleset> <address>
 > /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
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47DC3362.9050607>