1822522 Members
2503 Online
109642 Solutions
New Discussion юеВ

masquerade_domains = ?

 
SOLVED
Go to solution
'chris'
Super Advisor

masquerade_domains = ?

hi

can someone explain me, what does it mean
masquerade_domains =
in main.cf from postfix ?

If I put there a domain name, for example:
masquerade_domains = mydomain.net
then all outgoing mails will be
myaddress@mydomain.net ?

Or should I put there only the non existing internet domain ( internal domain )
to hide it ?

kind regards
chris







10 REPLIES 10
Steven E. Protter
Exalted Contributor

Re: masquerade_domains = ?

masquerade_domains =
tells sendmail to masquerade or petend it is a certain domain.

It effects all of the outbound mail on the server if sendmail is being used to send it.

It is okay to use if you only intend to host one domain on a server. If you want to host multiple domains this is more complex and you need a tutorial on the subject that I'd be happy to provide. Let me know.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Huc_1
Honored Contributor

Re: masquerade_domains = ?

I am not the author of this question, but after reading it and SEP, reply I for one dont know much on this subject and would be pleased to receive a tutorial, on the subject!

This is a bite of a hijack, as I can not assign points if you answer me here SEP, but I am sure Chris, would do this for me ?

Thanks, Chris

J-P
Smile I will feel the difference
Jerome Henry
Honored Contributor

Re: masquerade_domains = ?

Read this tip from sendmail.org :
http://www.sendmail.org/m4/masquerading.html

Basically (stop me Steven if it's not what you meant), if you have ony one doamin, then this option is quite an easy one, for all outgoing mails are seen as coming from 'mydomain.net' even if the sender mail address parameters are not correct.
Otherwise, if you have several domains, then you need several outdgoing domains, of course ! And thus to read the tut !

:]

J
You can lean only on what resists you...
Steven E. Protter
Exalted Contributor
Solution

Re: masquerade_domains = ?

To support multiple domains on the same server you need to configure each domain in a couple of files:

/etc/mail/virtusertable
@domainname.com username

Its tab delimited. This routes all the domain mail to one user name. If you want multiple users, these need to be set up explicitly as follows.

webmaster@domainname.com username
user1@domainname.com username2

The /etc/mail/genericstable

is the opposite
username @domainname.com


I usually add an entry to /etc/aliases just to be sure. I have not done a necessity test on this.

@domainname.com: username

Note the colon.

Note the mistake in my earlier post.

In my /etc/mail/sendmail.mc file masquerade_as is commented because it changes the whole system and is not compatible with multiple domains.

masquerade_domain is set on for each domain.

Ooops. Everybody gets tired.

I pull it all together with a script that builds the hash databases. This may not be needed on sendmail 8.12 it would seem those databases build themsleves, not sure about that.

Attaching the script. Note the script has a huge spam database it builds into /etc/access My database has cut my spam to 2 per week at present. Amazing.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Huc_1
Honored Contributor

Re: masquerade_domains = ?

Thanks, For your reply's I know very littel on the mail world "My only real exposure is $MC mrgate using VMS mail and ALL-IN-1 as an Internal System manager at Digital (DEC) for those old enough to remember" I have done just the basic set up to my Linux , mostly I use an ISP and mozilla browser for real work.

So this is like opening a new big chapiter.., will try my hand first on my internal LAN.

Like Alice (well perhap's not Alice) first step in "Wonder" sendmail-land (full rabbits, wonders, dangers, unknows, crytic compiles).

SEP, Tks for the quality and dedication.

J-P
Smile I will feel the difference
'chris'
Super Advisor

Re: masquerade_domains = ?

hi

sorry, I don't understand Huc's posting !

and I'm not using sendmail, only postfix.

kind regards
chris
Steven E. Protter
Exalted Contributor

Re: masquerade_domains = ?

Chris,

I think postfix is using the sendmail configuration.

Additional note to my tutorial.
sendmail.mc has Cwdomainname.com for each hosted domain.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Huc_1
Honored Contributor

Re: masquerade_domains = ?


Yes, Chris sorry for hijack, my previous reply is to answer SEP and Jerome sendmail.cf, mail pointer, tutorials and links on mail in general.

I drifted for your main concern/question "that is main.cf from postfix and masquerade_domains"

Also forgive my sometime's bad english speeling/mastering.

Your question prompt some reply's I was interest in ... I should have started a new question.

J-P

Smile I will feel the difference
Huc_1
Honored Contributor

Re: masquerade_domains = ?

Chris

To make amends I did some search for you on the internet and found the following link perhaps, this will be of some use to you ?

http://www.postfix.org/faq.html#masquerade

J-P
Smile I will feel the difference
'chris'
Super Advisor

Re: masquerade_domains = ?

thanks all