LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 12-21-2005, 05:27 PM   #1
reply2vinay
Member
 
Registered: Jul 2005
Posts: 42

Rep: Reputation: 15
Masquerade in Postfix


Hai all,
In RHEL4 i installed Postfix...When i send a mails to users
it will going user@host.domain.com...
i want rewrite the header like user@domain.com
Where can i set this option excatly pls tell me.......


Regards,
Vinay.G
 
Old 12-21-2005, 05:51 PM   #2
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
In main.cf, set
Code:
myorigin = $mydomain
and reload postfix.
 
Old 12-22-2005, 11:26 AM   #3
reply2vinay
Member
 
Registered: Jul 2005
Posts: 42

Original Poster
Rep: Reputation: 15
reply MASQUERADE

Hai Berhanie,

In Main.cf i put same entry (myorigin = $mydomain)also iam getting user@host.domain.com..
 
Old 12-22-2005, 11:43 AM   #4
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Is the mail being sent from (i.e. originating on) that machine, or merely relayed by it?
Is your mail client (MUA) inserting the undesired "From:" header?
 
Old 12-22-2005, 11:58 AM   #5
reply2vinay
Member
 
Registered: Jul 2005
Posts: 42

Original Poster
Rep: Reputation: 15
I didn't get u

Iam installed same system act as a DNS,dovecot and Postfix servers...
My FQDN is vinay.test.one
my mail id is root.test.one
when iam send a mails to user@test.one it is not working
then i send mails to user@vinay.test.one it is working...

Same problem i found in sendmail also...
At the time in sendmail.mc file i added this entry
MASQUARDE_AS ('test.one')
then it is going to user@test.one
 
Old 12-22-2005, 12:18 PM   #6
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
I misunderstood. I thought your problem was with the return address.

Quote:
when iam send a mails to user@test.one it is not working
then i send mails to user@vinay.test.one it is working...
So, is the problem that you want your machine to accept mail of the form user@test.one? If so, you can add $mydomain to mydestination, so it would look something like
Code:
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

Last edited by Berhanie; 12-22-2005 at 12:20 PM.
 
Old 12-22-2005, 01:12 PM   #7
reply2vinay
Member
 
Registered: Jul 2005
Posts: 42

Original Poster
Rep: Reputation: 15
reply Masquarde in Postfix

I tried but result is same...
i have a one doubt here masquarde option is not here why...
 
Old 12-22-2005, 01:22 PM   #8
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
I am still not sure what "the result" is (or, what your original question is, for that matter). Could you please describe the problem more precisely?
 
Old 12-22-2005, 01:32 PM   #9
reply2vinay
Member
 
Registered: Jul 2005
Posts: 42

Original Poster
Rep: Reputation: 15
when iam send a mails to user@test.one it is not working
then i send mails from to user@vinay.test.one it is working...
user to root@vinay.test.one it is working..

After Configure the Postfix...
my system ip:192.168.1.1 255.255.255.0

my changes in main.cf

mydomain = vinay.test.one
myorigin = $mydomain
inet_interfaces = all
#inet_interfaces = localhost (by default it is enabled)
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks_style = subnet
mynetworks = 192.168.1.0/28, 127.0.0.0/8



These are my changes
 
Old 12-22-2005, 01:59 PM   #10
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Your FQDN should probably be assigned to myhostname, rather than to mydomain, so:
Code:
myhostname = vinay.test.one
After making this change and reload postfix with "postfix reload" please send mail to user@test.one and user@vinay.test.one and post the relevant log file entries (look in places like /var/log/maillog).
 
Old 12-22-2005, 02:49 PM   #11
reply2vinay
Member
 
Registered: Jul 2005
Posts: 42

Original Poster
Rep: Reputation: 15
Dec 23 02:13:53 vinay sendmail[4707]: jBMKhrBO004707: from=root, size=37, class=0, nrcpts=1, msgid=<200512222043.jBMKhrBO004707@vinay.test.one>, relay=root@localhost
Dec 23 02:13:53 vinay sendmail[4707]: jBMKhrBO004707: to=dell@test.one, delay=00:00:00, mailer=esmtp, pri=30037, dsn=4.4.3, stat=queued
Dec 23 02:14:36 vinay sendmail[4737]: jBMKia79004737: from=dell, size=41, class=0, nrcpts=1, msgid=<200512222044.jBMKia79004737@vinay.test.one>, relay=dell@localhost
Dec 23 02:14:36 vinay sendmail[4737]: jBMKia79004737: to=root@test.one, delay=00:00:00, mailer=esmtp, pri=30041, dsn=4.4.3, stat=queued
Dec 23 02:15:06 vinay sendmail[4742]: jBMKj6Jr004742: from=root, size=38, class=0, nrcpts=1, msgid=<200512222045.jBMKj6Jr004742@vinay.test.one>, relay=root@localhost
Dec 23 02:15:06 vinay sendmail[4742]: jBMKj6Jr004742: to=dell@test.one, delay=00:00:00, mailer=esmtp, pri=30038, dsn=4.4.3, stat=queued




It is the log file after enter the hostname also same iam getting.........
 
Old 12-22-2005, 02:55 PM   #12
reply2vinay
Member
 
Registered: Jul 2005
Posts: 42

Original Poster
Rep: Reputation: 15
Sorry sendmail service is started...Now i stopped this is the log

Dec 23 02:22:37 vinay postfix/qmgr[4698]: 12E3A1D84F: from=<root@vinay.test.one>, size=506, nrcpt=1 (queue active)
Dec 23 02:22:37 vinay postfix/smtpd[5431]: disconnect from localhost.localdomain[127.0.0.1]
Dec 23 02:22:37 vinay postfix/local[5435]: 12E3A1D84F: to=<dell@vinay.test.one>, relay=local, delay=0, status=sent (delivered to mailbox)
Dec 23 02:22:37 vinay postfix/qmgr[4698]: 12E3A1D84F: removed
 
Old 12-22-2005, 04:02 PM   #13
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Please post the complete log of the transaction, not just starting with the qmgr entry. It would also be helpful to see the output of "postconf -n".
 
Old 12-22-2005, 04:08 PM   #14
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
By the way, according to RFC 1893, the sendmail error is:
Quote:
X.4.3 Directory server failure

The network system was unable to forward the message,
because a directory server was unavailable. This is useful
only as a persistent transient error.

The inability to connect to an Internet DNS server is one
example of the directory server failure error.
 
  


Reply



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
Masquerade nanoprobe Linux - Networking 7 06-12-2005 08:48 AM
Postfix - Don't masquerade Local only Outgoing mail... Help please... Vince0000 Linux - General 2 11-27-2003 09:08 AM
IP Masquerade qbik Slackware 3 09-11-2003 03:02 PM
IP Masquerade help armcfall Linux - Networking 6 06-24-2003 09:06 AM
About masquerade Nuts Linux - Networking 8 08-30-2002 09:56 AM

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

All times are GMT -5. The time now is 09:15 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