开发者

Prevent mail sent from a server to itself from being internally handled

I have a Google apps account attached to my web server's domain. I work like to be able to test my email application using my personal email address.

Web server is at thinktankdesign.ca email is going to robert@thinktankdesign.ca

mail.thinktankdesign.ca is pointing to google.

How can I stop the server from handling the message internally. I don't want the message send to /var/mail/*my_username*

I'm running Ubuntu 10.开发者_开发技巧04

Cheers!


If I'm reading right, it sounds like PHP's using the local mail delivery agent (sendmail?) to hand off mails, which then in turns sends things to Google.

You'd have to use something PHPMailer or SwiftMailer, which have simple methods of directly setting which SMTP server to hand the mail off to. PHP's internal mail() function is simplistic and does a local handoff only.

So instead of

your code -> local mail agent -> google

it'd go

your code -> google

and the local mail spool should never get touched.


You must change you mail DNS MX record. Just look at this page Configure email delivery

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜