Problem with php mail :/

Hi,

I have problem with php mail function.

First, i need to tell how it looks on my server.

full width
http://www.bankfotek.pl/image/64249.jpeg

We have got, public ip, attached to our security server, next port-s are attached to our servers.

For example, port 80 are redirected to (192.xxx.20) www server working on virtualmin.
or port 110 / 25 are redirected to (192.xxx.60) mail server.

We have domain, for example xxx.com

I have got problem with mail send by www server.
Many scripts use standard mail funcion, but we have problem, becous our REAL public MAIL SERVER, are not on this same machine like www server :confused:

Maybye its possible, to modificate linux, for something like this:

mail send by phpmail, is taken by linux, next linux open connection to 192.xxx.60 ( our mail sercer), authorize by SMTP, and send email, like authorized user using our public mail server.

Now when i’m sending mail by php, on the mail data i’m getting something like this:

Message-Id: <20080422082046.6F81043DE05@serwer.localdomain>

This is local mail server by www server :confused:

I need to put there our mail server.

Your web server needs to have a valid fully qualified domain name (host.localdomain is not a valid hostname for doing anything on the Internet).

And, there needs to be reverse resolution for the IP address it sends out on. Reverse resolution is usually handled by your ISP or hosting provider.

You don’t need to send through your mail server, if you configure the web server correctly for sending mail–DNS is your problem here.

So, where can i change this:
serwer.localdomain

?

In sendmail configuration ?

No. That’s the hostname of the system. You need to correctly set the hostname of your system (in /etc/hosts and using the hostname command). You need an entry for your default IP address (you probably only have a 127.0.0.1 entry in your /etc/hosts file).

You can also set both in the Network Configuration module in Webmin.

Ok,
Thank You