PDA

View Full Version : mail rejected by some providers becaus of sender


cotthemh
23rd May 2007, 22:03
Hello,

some of my mail gets rejected because it comes from apache@localhos.localdomain

this happens if i send mail from for instance PHP the mail log is below.

the problem is this mail gets send from within an application (mediawiki) so its a little hard to control, i would like to change the system wide default behaviour so the mail would be sent from apache@gargamel.domain.tld
which is also the hostname

if you type hostname you get gargamel.domain.tld.

probably something simple but i don't know where to change it,

many thanks in advance,

Herwig

May 23 20:52:27 gargamel sendmail[22473]: l4NIqRkR022473: to="Ivo.xxx" <Ivo.xxx@skynet.be>, ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30700, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 3BA5C8209A2)
May 23 20:52:27 gargamel postfix/smtp[22474]: 3BA5C8209A2: to=<Ivo.xxx@skynet.be>, relay=in.mx.skynet.be[195.238.5.129]:25, delay=0.14, delays=0.08/0.01/0.04/0.01, dsn=5.0.0, status=bounced (host in.mx.skynet.be[195.238.5.129] said: 553 #5.1.8 Domain of sender address <apache@localhost.localdomain> does not exist (in reply to MAIL FROM command))

falko
24th May 2007, 19:21
What's the output of hostname -f? What's in /etc/hosts, and what the value of ServerName in the Apache vhost configuration of the web site from which the mails are sent?

jbatres
29th May 2007, 16:30
I have the same problem with my sites but the difference is that my sites are all IP based. I configured MASQUERADING in sendmail.mc to correct the return-path but it only works when I telnet. I just got the server and I know that Apache is not configured. Can you guys please give me an idea of what i need to modify in order to correct the return-path for emails generated by the scripts on my sites? here is my server configuration:

Ensim Pro X for Linux 20 Domains
Redhat Enterprise Linux - OS ES 4.0

* OpenSSH
* Apache (not configured)
* Perl
* Mod_perl
* Mod_ssl
I've been working on this issue for three weeks now and I still can't get it to work. Thanks for your help

cotthemh
29th May 2007, 22:07
hostname -f
gives me localdomain.localhost

hostname
gives me the correct hostname

the hostfile :
127.0.0.1 localhost.localdomain localhost gargamel.domain.tld

the servername variable
ServerName=gargamel.domain.tld

falko
30th May 2007, 17:46
hostname -f
gives me localdomain.localhost

hostname
gives me the correct hostname

the hostfile :
127.0.0.1 localhost.localdomain localhost gargamel.domain.tld

the servername variable
ServerName=gargamel.domain.tld
Ok, what's the server's IP address? Which distribution do you use?

cotthemh
30th May 2007, 18:22
i use fC6.

the ip adress is 192.168.50.10 on one card and 192.168.60.10 on the other card

the first adress is the adress of the DMZ zone of the router, the second adress is the local backend network (which is used to take backups of the server)

Both ports have internet access, but all incoming mail goes through the dmz zone.

best regards,

Herwig

falko
31st May 2007, 15:22
You can set the hostname to gargamel.domain.tld in /etc/sysconfig/network.

And in /etc/hosts, you should create a line of its own for gargamel.domain.tld (not in the 127.0.0.1 line).