PDA

View Full Version : sendmail problem


globalpiece
1st December 2008, 02:47
hi,

recently i started using an exchange hosting company to host my email and i changed my MX records so that email to anything@mydomain.com goes 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!

topdog
1st December 2008, 14:04
Use the mailer table to direct the mail in /etc/mail/mailertable

.mydomain.com smtp:[their_server_name]

Then
cd /etc/mail; make restart

globalpiece
2nd December 2008, 20:45
thank you. i have done exactly as you suggested but it hasn't solved the problem. it just seems strange that sendmail isn't looking to the MX record for the domain - if it did it would know where to send it.

topdog
3rd December 2008, 09:34
The mailertable is designed to allow you to by pass the mx record i thought that is what you wanted ?

what is the output of sendmail -bv address@domain

globalpiece
4th December 2008, 07:08
Thanks for sticking with me on this. In fact I don't want to bypass the MX records. The MX records are correct.

It's just that sendmail is not bothering to check the MX records and thinks that info@mydomain.com should be sent to the local user 'info'.

Actually, I think what I want to do is to force sendmail to look to the MX records to find the mail server.

sendmail -bv info@mydomain.com RESULTS IN:
info@mydomain.com... deliverable: mailer local, user info

any suggestions?

globalpiece
4th December 2008, 07:12
just a thought...maybe the solution is to somehow tell sendmail that it is not supposed to handle mail addressed to users@mydomain.

i want it to handle local mail to local users without the @domain in the address so that programs can function properly.

not sure if this is making sense the way i'm describing it...

topdog
4th December 2008, 09:07
remove the domain name from /etc/mail/local-host-names

globalpiece
4th December 2008, 10:34
hmmm...there is nothing in that file except for the first commented line:

# local-host-names - include all aliases for your machine here.