
1st September 2009, 19:42
|
|
Junior Member
|
|
Join Date: Apr 2009
Posts: 28
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Sendmail Query - PHP script
Hi,
Scenario:
I have 2 servers, 1 webserver (incl. dns) and 1 mail server in the same network. In the webserver there is a PHP script that is sending e-mails (to an account on the mail server) but is sending them locally on the webserver and not to the mailbox on the mail server. The webserver is like, it does not know that it should NOT handle emails for that domain, but route it to the mail server (where the mailbox is).
If I set an external account (gmail etc..) that is not hosted on the webserver, it works fine. The problem is when I set the php script to send to an account from my mail server.
What can I set on the web server in order to route emails to the mail server please? Can this problem be solved please?
ANY HELP APPRECIATED!! Thanks in advanced
|

1st September 2009, 20:31
|
|
Senior Member
|
|
Join Date: Nov 2008
Posts: 233
Thanks: 2
Thanked 22 Times in 22 Posts
|
|
mx record, local domains, etc. will depend on what SMTP server you have on the webserver...
|

2nd September 2009, 07:09
|
|
Junior Member
|
|
Join Date: Apr 2009
Posts: 28
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Can you please elaborate what I need to do? I have mx records on the webserver that eventually they point to the mail server.
What do you mean by "depend on what SMTP server"? I have sendmail as an SMTP server.
Thanks for your reply
|

2nd September 2009, 14:16
|
|
Senior Member
|
|
Join Date: Nov 2008
Posts: 233
Thanks: 2
Thanked 22 Times in 22 Posts
|
|
There may be something in the sendmail config on the webserver that tells it to deliver mail for your domain to users on that host, as opposed to sending it out to your real mail server...
|

3rd September 2009, 08:37
|
|
Junior Member
|
|
Join Date: Apr 2009
Posts: 28
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Thanks very much for your reply.
I have tried to set it as you told me but than no emails can be sent! Do I need to setup something on the mail server to accept the webserver to use its smtp pls?
|

3rd September 2009, 15:50
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,595 Times in 2,446 Posts
|
|
|

4th September 2009, 06:59
|
|
Junior Member
|
|
Join Date: Apr 2009
Posts: 28
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Hi Falko,
Please find the command ls -la /etc/mail on the webserver:
> ls -la /etc/mail/
total 360
drwxr-xr-x 3 root root 4096 Sep 3 09:04 .
drwxr-xr-x 104 root root 12288 Sep 4 04:05 ..
-rw-r--r-- 1 root root 1048 Mar 15 2007 Makefile
-rw-r--r-- 1 root root 355 Mar 15 2007 access
-rw-r----- 1 root root 12288 Sep 2 07:11 access.db
-rw-r--r-- 1 root root 0 Mar 15 2007 domaintable
-rw-r----- 1 root root 12288 Sep 2 07:11 domaintable.db
-rw-r--r-- 1 root root 5521 Mar 15 2007 helpfile
-rw-r--r-- 1 root root 64 Mar 15 2007 local-host-names
-rw-r--r-- 1 root root 32 Sep 1 14:36 local-host-names.rpmsave
-rw-r--r-- 1 root root 0 Mar 15 2007 mailertable
-rw-r----- 1 root root 12288 Sep 2 07:11 mailertable.db
-rw-r--r-- 1 root root 50 Sep 1 18:52 mailertable.rpmsave
-rw-r--r-- 1 root root 415 Sep 1 13:24 relay-domains
-rw-r--r-- 1 root root 58292 Sep 3 09:04 sendmail.cf
-rw-r--r-- 1 root root 58194 Sep 2 08:40 sendmail.cf.orig
-rw-r--r-- 1 root root 58284 Sep 1 18:49 sendmail.cf.rpmsave
-rw-r--r-- 1 root root 7198 Sep 3 07:59 sendmail.mc
-rw-r--r-- 1 root root 7227 Sep 1 18:49 sendmail.mc.rpmsave
drwxr-xr-x 2 root root 4096 Jul 17 16:53 spamassassin
-r--r--r-- 1 root root 41275 Mar 15 2007 submit.cf
-rw-r--r-- 1 root root 940 Mar 15 2007 submit.mc
-rw-r--r-- 1 root root 127 Mar 15 2007 trusted-users
-rw-r--r-- 1 root root 0 Mar 15 2007 virtusertable
-rw-r----- 1 root root 12288 Sep 2 07:11 virtusertable.db
Do you need the result of this command on the mail server?
Regards,
Paul
|

4th September 2009, 17:42
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,595 Times in 2,446 Posts
|
|
Is the domain listed in /etc/mail/local-host-names? If so, remove it and restart Sendmail.
|

4th September 2009, 20:43
|
|
Junior Member
|
|
Join Date: Apr 2009
Posts: 28
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Hi Folko,
That file is empty so there are no domains in this file. I have read something that I need to do the sendmail on the webserver to relay through the sendmail on the mail server.
Have you ever done this please? Or do you have any other suggestions?
Thanks for your help
Paul
|

5th September 2009, 13:51
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,595 Times in 2,446 Posts
|
|
I've done this with Postfix, but not Sendmail...
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 08:39.
|
|
Recent comments
1 day 7 hours ago
1 day 12 hours ago
1 day 16 hours ago
1 day 18 hours ago
2 days 8 hours ago
2 days 8 hours ago
2 days 13 hours ago
2 days 20 hours ago
2 days 21 hours ago
2 days 22 hours ago