Sendmail Local Configuration

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Sendmail Local Configuration

Post by Charles256 »

Quick question that I can't find to save my life. I have a server hosting domain a.com. However, the MX records are pointed to a different server. When my scripts use sendmail to send an email from a.com it gets delivered locally which is a problem since the emails are out there on a different server. How do I tell sendmail to stop looking locally for where the emails are hosted? Thanks for your help. Feel free to give general instructions since I'm asking because my host doesn't believe it's possible and won't give me configuration details on the server.
davex
Forum Contributor
Posts: 101
Joined: Sat Feb 27, 2010 4:10 pm
Location: Namibia

Re: Sendmail Local Configuration

Post by davex »

Hi,

You need to remove a.com from the sendmail config - either as any type of local name or a virtual/masqueraded domain.

Exactly what you need to change depends on precisely how that domain is configured within sendmail.

That is if you have access to the sendmail config - I'm guessing from your message you might not.

Your best bet if you don't have access to sendmail itself is to use something other than the inbuilt mail() function for your script. There are a variety of mailers out there that will perform an SMTP delivery for you (I use phpMailer but many others do a fine job).

If it's just a single domain and you know where you want it to go then you can just get the mailer to deliver via SMTP to the correct mail host. If multiple domains need support then you could get a mailer that does an MX lookup or do it yourself for the domain and then use the mailer to deliver direct.

Sorry I can't be any more specific.

Cheers,

Dave.
Post Reply