LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-09-2004, 01:20 AM   #1
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
sendmail: masquerading question


I have a few computers using private IP addresses behind a router. One of the computers acts as a mail server (sendmail), and relays mail for the other computers -- I did this by adding the first part of the IP address followed by RELAY to /etc/mail/access. The small problem that I have is that MASQUERADE_AS only works on mail originating from the server, and not mail that is relayed by it. I would like it to masquerade the addesses of all my computers. How can I do this? MASQUERADE_DOMAIN doesn't work with IP addresses, as far as I know.
 
Old 09-09-2004, 01:51 AM   #2
sashhoney
Member
 
Registered: Jul 2003
Distribution: Red Hat, Fedora, Debian
Posts: 85

Rep: Reputation: 15
well i have a solution that will only work if u r using a specific domain name for all computers.
lets say u have a domain foo.com and all comps are having *.foo.com
now use following three lines

############
MASQUERADE_AS(`abc.com')
MASQUERADE_DOMAIN(`foo.com')
masquerade_entire_domain
############
this will masquerade all the mails coming from the domain foo.com


--sidd
 
Old 09-09-2004, 01:56 AM   #3
sashhoney
Member
 
Registered: Jul 2003
Distribution: Red Hat, Fedora, Debian
Posts: 85

Rep: Reputation: 15
i m sorry for the incomplete soln
masquerade_entire_domain should be written inside feature()

--sidd
 
Old 09-11-2004, 01:40 AM   #4
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Original Poster
Rep: Reputation: 165Reputation: 165
Hello, sashhoney, and thanks for your reply. l have been trying to implement your idea. I've started from scratch. Here's what I did:

1. All my computers now have domain name "example.org"
2. On the mail server's /etc/hosts, I made an entry for each of the other computers with a typical line looking something like
Code:
 172.16.0.5   name.example.org   name
3. I also created the file /etc/mail/service.switch on the server with the line
Code:
hosts   files  dns
5. I have RELAY_DOMAIN(`example.org')

All this allows me to send mail from all of my computers. Now, to get masquerading:

6. I have MASQUERADE_AS(`mydomain.no-ip.org'), MASQUERADE_DOMAIN(`example.org'), and FEATURE(`masquerade_entire_domain'). I also added "mydomain.no-ip.org" to /etc/mail/local-host-names to be able to receive mail addressed to that domain.

This masquerades mail originating on the server, but still the mail from the other computers has a "From:" line of the form user@name.example.org

What am I missing?

edit:
On second thought, it works! Thank you.

Last edited by Berhanie; 09-12-2004 at 02:17 AM.
 
Old 02-11-2010, 06:47 PM   #5
mohitvad
Member
 
Registered: Feb 2010
Posts: 34

Rep: Reputation: 0
Masquerading in Sendmail

Hello, l have been trying to implement your idea. I've started from scratch. Here's what I did:

1.My Mail Server name is "ids.com" and local hostname is "server"
2. When I send the mail from my user to other user. The mail goes with user@localhostname



All this allows me to send mail from all of my computers. Now, to get masquerading:

3. I have MASQUERADE_AS(`ids.com'), MASQUERADE_DOMAIN(`ids.com'), and FEATURE(`masquerade_entire_domain'). I also added "ids.com" to /etc/mail/local-host-names to be able to receive mail addressed to that domain.

This masquerades mail originating on the server, but still the mail from the other computers has a "From:" line of the form user@hostname

What am I missing?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail not Masquerading Domains mpgram Linux - Networking 0 06-06-2005 09:20 PM
sendmail masquerading not working with mail/mutt Hcman Linux - Software 0 11-10-2004 07:57 AM
IP masquerading question OneManArmy Linux - Networking 1 09-23-2004 12:17 PM
Masquerading question..Need Help tanydegher Linux - Networking 0 10-10-2002 12:56 PM
Sendmail question. Stingreen Linux - General 6 06-07-2001 03:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration