sendmail: from virtual address changed to maindomain

Matthew Seaman m.seaman at infracaninophile.co.uk
Sat Mar 15 17:47:47 UTC 2008


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 at mydomain1.com sends to jack at mydomain1.com or viceversa
>>>
>>> the message gets to the right user, but the from header is
>>> changed to john at 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.

Hmmm... not entirely certain, but I believe the part you are missing is:

FEATURE(limited_masquerade)dnl

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

-- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
                                                  Kent, CT11 9PW

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20080315/0463ed18/signature.pgp


More information about the freebsd-questions mailing list