Results 1 to 8 of 8
hi,
recently i started using an exchange hosting company to host my email and i changed my MX records email to anything@mydomain.com to their server. everything is working fine except ...
- 11-30-2008 #1Just Joined!
- Join Date
- Nov 2008
- Posts
- 2
Sendmail problem
hi,
recently i started using an exchange hosting company to host my email and i changed my MX records email to anything@mydomain.com to their server. everything is working fine except for email sent from my web server (www.mydomain.com).
specifically... i have a contact page (www.mydomain.com/contact.html) on my website that uses a php script to send email to info@mydomain.com. it worked just fine before i started using the exchange host. actually the script still sends a message to the local 'info' account.
in sendmail i added 'info@mydomain.com' as an alias to the local 'info' user but this has not made any difference.
i think the problem is that somehow the web server has no idea that the exchange server exists -- even though the MX records point to it.
any ideas how to fix this? thanks in advance!
- 12-01-2008 #2
The problem is most likely to be that you have your web server machine still delivering mail to 'localhost'.
The simplest solution is probably to allow your web server to send all mail through your exchange machine - setting it up as a smart mail host. You'd need to enable relaying on the exchange machine to do this.
Alternatively, reconfigure your mail server on the web server machine to send mail normally (i.e. by doing dns lookups for MX and delivering using SMTP in the normal way) and make sure there is no entry in local DNS or in /etc/hosts pointing the domain for email purposes back to localhost.Linux user #126863 - see http://linuxcounter.net/
- 12-02-2008 #3
Hi Roxoff,
I understood the question but not exactly the answer, I do not have this issue but it sounds interesting, can throw some more light please.
regards
- 12-02-2008 #4
I'm sorry darkblue, but to be brutally frank, I cannot throw more light on this in a generic way. If you need to understand this issue, it might help if you research sendmail and dns. Both these packages are documented on the internet far better than I can do it in a few moments on here.
Linux user #126863 - see http://linuxcounter.net/
- 12-02-2008 #5
- 12-02-2008 #6Just Joined!
- Join Date
- Nov 2008
- Posts
- 8
We had this problem before.
What happen is that when your web server wanted to send a mail, it'll first try to resolve the domain by looking at it's localhost (/etc/hosts), then to whatever DNS you have it points to. Even if you change your MX record, your web server will look at your local host first, and that's why it never looked into the public MX record.
simple solution would be forward your email for your "info" account.
if you know the ip of your mail server, just add the .forward file in your info account home, with
info@[your ip here]
or
as you were doing, set up the alias but with the ip address
so in /etc/alias:
info: info@[ip here]
i hope this help
kevin
- 12-04-2008 #7Just Joined!
- Join Date
- Nov 2008
- Posts
- 2
Thank you -- that sounded very promising and I attempted it. However, since I use an exchange hosting company, the exchange server on that IP address hosts multiple domains - not just mine. I need to specify my domain name in the address.
isn't there a way to force sendmail to look to the MX records - or to let it know that it is not handling mail for the domain - just for the local users?
- 12-04-2008 #8Just Joined!
- Join Date
- Nov 2008
- Posts
- 8
I guess you are using those share hosting soultion for your exchange server.
try the following:
edit: /etc/mail/local-host-names
take out the domain name for your server here. This file defines what domain sendmail will receive mail for.
another thing you can try is messing with the /etc/mail/mailertable. this might be the correct way to do it.
Using 'mailertable' in Sendmail
good luck
kevin


Reply With Quote
