#1  
Old 1st December 2008, 01:47
globalpiece globalpiece is offline
Junior Member
 
Join Date: Dec 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default sendmail problem

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!
Reply With Quote
Sponsored Links
  #2  
Old 1st December 2008, 13:04
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

Use the mailer table to direct the mail in /etc/mail/mailertable

Code:
.mydomain.com		smtp:[their_server_name]
Then
Code:
cd /etc/mail; make restart
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
  #3  
Old 2nd December 2008, 19:45
globalpiece globalpiece is offline
Junior Member
 
Join Date: Dec 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
  #4  
Old 3rd December 2008, 08:34
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

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
Code:
 sendmail -bv address@domain
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
  #5  
Old 4th December 2008, 06:08
globalpiece globalpiece is offline
Junior Member
 
Join Date: Dec 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

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

Last edited by globalpiece; 4th December 2008 at 06:14.
Reply With Quote
  #6  
Old 4th December 2008, 06:12
globalpiece globalpiece is offline
Junior Member
 
Join Date: Dec 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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...
Reply With Quote
  #7  
Old 4th December 2008, 08:07
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

remove the domain name from /etc/mail/local-host-names
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
  #8  
Old 4th December 2008, 09:34
globalpiece globalpiece is offline
Junior Member
 
Join Date: Dec 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

hmmm...there is nothing in that file except for the first commented line:

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

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sending e-mail using mail() function linuxuser1 HOWTO-Related Questions 38 21st April 2009 12:20
Sendmail Problem hiren_patel Installation/Configuration 13 7th January 2009 08:58
Ispconfig And Sendmail Config problem fosiul Installation/Configuration 1 26th September 2008 08:59
Virtual users... Ubuntu 8.04 spaceuser HOWTO-Related Questions 12 19th June 2008 08:04
Sendmail / php spam problem Jorem Server Operation 3 20th June 2007 15:54


All times are GMT +2. The time now is 22:48.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.