Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to get my server to be able to send email from PHP. Currently it is using send mail, but whenever I try to send mail to a gmail address I get this sort of response:

--o54Mqd5s008981.1275691959/ServerName
Content-Type: message/delivery-status

Reporting-MTA: dns; ServerName
Received-From-MTA: DNS; localhost
Arrival-Date: Fri, 4 Jun 2010 22:52:38 GMT

Final-Recipient: RFC822; someone@gmail.com
Action: failed
Status: 5.7.1
Remote-MTA: DNS; gmail-smtp-in.l.google.com
Diagnostic-Code: SMTP; 550-5.7.1 [xxx.xxx.xxx.xxx] The IP you're using to send mail is not authorized
Last-Attempt-Date: Fri, 4 Jun 2010 22:52:39 GMT

How can I set this up to relay through a google account that I own? Is sendmail the best thing to use, or should I switch to Postfix or something? This is on an Ubuntu Server 9.10

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Your server address may be listed as a dynamic address, which should never be sending email into the Internet directly. The standards provide of a layer of trust and require static addresses with correct rDNS configuration. Almost all the spam I get comes from dynamic addresses.

You should setup your server to send outgoing emails via your ISPs SMTP server. You can use Gmail as your relay, but you will need to enable SMTP services on your Gmail account. Then you will need to configure Postfix to authenticate when connection to Gmail.

share|improve this answer

If I remember correctly, you can't relay through gmail, even using your own credentials.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.