Routing emails externally?

Associate
Joined
19 Jun 2003
Posts
1,680
Location
West Yorks, UK
Hi folks,
I have an odd problem. I have a dedicated website server from www.fasthosts.co.uk running Fedora Core 3. One of the websites on the server calls for emails to be sent from a script (either using the default PHP mail() function, or SMTP functionality provided by the phpMailer class script).

The script sends the emails from the website - www.domainname.com - to an address - [email protected]. As the script is effectively sending email to its own domain, they are routed internally instead of heading out into the big wide world then back. Not a problem you'd think?

Well, I have an MX DNS record on www.domainname.com that sends any mail to a companies internal mail server via its external IP address. As the PHP script is routing emails internally, it doesn't see the MX record, so tells me the mailbox [email protected] doesn't exist and therefore the mail is undeliverable - of course, it doesn't, and has no need to as mail is sent directly to the mail server and routed from there.

How can I get round this?

Cheers,
Matt
 
I'm not sure, but would using a DNS name (mail.domain.com) instead of an IP make any difference? It seems that the server can't route that external IP back into the box.
 
Well, the email is actually sent to mail.domain.com which points to IP address, so in theory it is setup right.

I have found something in the config files for Courier mail server that send email to "maildrop". It appears this might be a good place to investigate, as maildrop appears to be an internal delivery system.

Any thoughts?

Matt
 
Back
Top Bottom