-   Linux - Networking (
-   -   Postfix: (

iantri 07-24-2004 10:26 AM


I am having a problem configuring Postfix under CentOS 3.1 (Red Hat Enterprise Linux 3 rebuild).

I have Postfix configured as such:

myhostname =
mydomain =
myorigin = $mydomain


relayhost =

... but when I try to send messages it sends them as "", which my ISP's server won't relay because "" is a non-existant host.

The comments in the postfix config file say this:

# The myorigin parameter specifies the domain that locally-posted
# mail appears to come from.

And myorigin is set to mydomain, so it should come out "", no? What am I doing wrong?

Pcghost 07-24-2004 12:35 PM

What MUA were you using to send the message? Is your machines host name the default linux.localhost.localdomain? It could be that the MUA bypassed postfix and sent the message directly to your ISP. Check the mail log in /var/log and get the details for the message.

iantri 07-24-2004 01:15 PM

No; it is being sent through Postfix. They bounce silently, but in my daily logwatch e-mails the Postfix logs indicated that my ISP's server rejected them because they were from a non-existant domain,

If I send an e-mail to another user on the same server, it comes as

I honestly have no idea why, when "myorigin" is configured to be


WMD 07-24-2004 02:49 PM

Just change your computer's name. Find something that works. ;)

iantri 07-24-2004 02:54 PM

The computer's hostname is "server".

It is not directly accessable by the outside world -- only by port forwarding through an IPCop box that does NAT.

I have set Postfix to send e-mail as "" (note: this is obviously not really my domain name. I don't want to generate unwanted traffic.) , but it sends it as "".

Clearly, the system's hostname is not involved in this in any way.

I'm sorry if I sound slightly agitated, but "Find something that works." isn't a very helpful response when you are asking for help from others who may know what DOES work.

predrag 07-24-2004 03:25 PM

Re: Postfix:
[QUOTE]Originally posted by iantri

I am having a problem configuring Postfix under CentOS 3.1 (Red Hat Enterprise Linux 3 rebuild).

I have Postfix configured as such:

myhostname =
mydomain =
myorigin = $mydomain

Change this to your real domain and host name. Also, make sure you set up properly hostname of your system.

relayhost =

Try using IP address of in []
e.g. relayhost = []

iantri 07-24-2004 07:25 PM

The actual values are not "".

I didn't want to direct unnecessary traffic towards the small-business server at that location. :)

Let's pretend the domain name is

Basically, even when I set myorigin explicitly to "", it still comes out as "".

This is what confuses me.

The hostname of the box is actually "server". It is not directly connected to the Internet, but rather is accessed via port forwarding behind a router doing NAT. "Server" doesn't end up at all anywhere, though, either.

bastard23 07-26-2004 01:21 AM

I suspect that the MUA (which one, you haven't mentioned) is adding the @localhost, and postfix is adding .domain.tld.

A quick fix is set masquerade_domains = $mydomain

$ postconf 'masquerade_domains = $mydomain'
should work.

# The masquerade_domains parameter specifies an optional list of
# domains that must have their subdomain structure stripped off.
# The list is processed left to right, and processing stops at the
# but strips to
# By default, address masquerading is disabled.
#masquerade_domains = $mydomain
masquerade_domains =

iantri 07-27-2004 12:21 PM

That did it. Thanks for your help.

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