LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-23-2006, 03:47 AM   #1
cylarz
Member
 
Registered: Aug 2005
Location: California
Distribution: CentOS 5
Posts: 54

Rep: Reputation: 15
quick question about Postfix mailer


Hey all,

Dumb question, but here goes.

My server runs Fedora Core 5 from RedHat. It also uses Postfix as its MTA.

The system is able to receive mail normally. It also sends it with no problems. HOWEVER, mail sent from the system appears to come from "root@localhost.localdomain" instead of from my domain name. How can I fix this?

I checked the settings in postfix's configuration file in /etc/postfix/main.cf and all appears as it should be.

Here's the sticky part. I was switching back and forth between using a router in front of the system for security reasons, and having the system provide its own security. (Long story). While it was using the router, I had to switch its networking settings to dynamically assigned IP instead of the usual static, with the router holding the domain name and forwarding incoming requests to the correct port (HTTP 80, SMTP 25, etc). To facilitate this, I modified /etc/hosts so that it reads as follows:

127.0.0.1 localhost.localdomain localhost

However, when I took the router out and plugged the system directly back into the network, I modified /etc/hosts to read:

127.0.0.1 localhost.localdomain localhost
207.xxx.xxx.xxx <mydomain>.com <mydomain>

I've deleted the IP and domain info for obvious reasons.

What is really odd is that the mail worked fine and messages appeared to come from root@<mydomain>.com, before I tried to install the router. Now I seem to have caused a problem I can't fix.

Ideas?

Thanks in advance...
 
Old 07-23-2006, 03:53 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
cylarz, I think it's the myorigin variable in main.cf

Let me know if this doesn't work, because there are other address rewriting options as well
 
Old 07-23-2006, 01:05 PM   #3
cylarz
Member
 
Registered: Aug 2005
Location: California
Distribution: CentOS 5
Posts: 54

Original Poster
Rep: Reputation: 15
re: quick question about postfix mailer

Dave,

I checked $myorigin in main.cf. It's set as follows:

myorigin = $myhostname

and

#myhostname = host.domain.tld
#myhostname = virtual.domain.tld
myhostname = <mydomain>.net

So it looks like that's already set properly. I can't imagine why it wouldn't be, since I did not touch main.cf while messing with the router.

I did, however, adjust the name of my host in a couple places in the network settings while running GNOME on my desktop. Obviously I was physically at the machine while trying to connect a router, but most of the time I administer this system remotely. I can go to where it is in order to correct this issue when necessary, but I'd need to know what to change when I got there.

I can't recall off the top of my head what I might have done, but I know it was under Network on the administration menu under Gnome. Does anyone know what setting would have "tripped" this problem?
 
Old 07-23-2006, 04:12 PM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
cylarz, who's Dave?

Got me a bit stumped. I take it that myorigin is set after myhostname (I know - but I'm clutching at straws here).

I suspect as a short (or even long) term fix, you could use a generic map to rewrite the headers - have a look at /etc/postfix/generic. I think this is the correct method - I get very confused with all the rewrites - canonical, virtual, etc., etc.

What distro are you using?

Last edited by billymayday; 07-23-2006 at 04:24 PM.
 
Old 07-23-2006, 05:21 PM   #5
cylarz
Member
 
Registered: Aug 2005
Location: California
Distribution: CentOS 5
Posts: 54

Original Poster
Rep: Reputation: 15
Sorry...did I call you Dave?

I figured out the issue with some help from elsewhere on this forum. It turns out that the hostname for the system itself was improperly set in /etc/sysconfig/network because of the meddling I had done. Thanks for trying to help.
 
  


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
quick question k1ll3r_x Linux - Networking 2 04-11-2005 07:24 PM
Quick Postfix relay query jhp Linux - Networking 2 08-05-2004 06:26 AM
Question Concerning ISO's and one quick question. evrae Linux - Software 2 06-21-2004 03:53 AM
samba smb.config question (quick question) TheDOGG Linux - Networking 1 03-02-2004 07:19 AM
just a quick question awesome_man Linux - Software 1 01-26-2004 01:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:14 PM.

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