Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8524019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:34:23+00:00 2026-06-11T07:34:23+00:00

I’ve been stuck on this problem for the whole afternoon and tonight but cannot

  • 0

I’ve been stuck on this problem for the whole afternoon and tonight but cannot find an answer. But I believe it’s some easy configuration issue on Mountain Lion.

I want to send out email using PHP, and I installed PEAR:Mail package; that all works fine.

But when I try to send email in PHP, it returns me no error; but email not received.

I further dig into the problem, found that I need to properly set up my local postfix mail program. I therefore following these articles to setup:
http://benjaminrojas.net/configuring-postfix-to-send-mail-from-mac-os-x-mountain-lion/#comment-259; when that didn’t work, I followed that one instead: http://slashusr.wordpress.com/2012/02/14/enabling-postfix-for-outbound-relay-via-gmail-on-os-x-lion-11/.
The basic steps in the blog post is to teach you how to send out using GMail by doing some settings in /etc/postfix/main.cf

But when I test it in terminal with command:

date | mail -s test <my_email_address>

Nothing happened, except that when I type “mail” again, it prompted me with a new message, telling me this error (part, only what I think to be useful):

: host smtp.gmail.com[209.85.225.108] said: 530-5.5.1
Authentication Required. Learn more at 530 5.5.1
http://support.google.com/mail/bin/answer.py?answer=14257
aa4sm11414435igc.15 (in reply to MAIL FROM command)

–1306515822A0.1347279593/songyy.local
Content-Description: Delivery report
Content-Type: message/delivery-status

I visited the link given in the error message, but it’s irrelevant.

I’ll very much appreciate if anyone can give me some advice on this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:34:25+00:00Added an answer on June 11, 2026 at 7:34 am

    I want to send out email using PHP, and I installed PEAR:Mail package; that all works fine.

    Very well. Then you must have a “mail relay server” address, to whom mails get sent. It is usually supplied by your Internet provider.

    You must configure that address into Postfix, as relayhost. No other setting is usually necessary.

    The recipe you followed is much more complicated because it entails Postfix connecting to GMail and authenticating as a user, all through TLS/SSL. To do this you must store the username and password to your GMail account (or another account created for that purpose) in the postfix passwd file.

    The fact that GMail complains of “Authentication Required” tells us that either you skipped this detail, or you stored the wrong password; so GMail can’t go through the email forwarding process.

    Note that if you only use plain SMTP, the outbound emails will be sent in the clear (as opposed to GMail use of SSL encryption).

    Check out the system logs if you need to see in detail what happened to your mails.

    Another thing to watch out, you say:

    I specified the file by setting: smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd

    This file expects to be in a specific format (documented in the file itself). After that, though, you have to convert the file into the hashfile, which is the same filename but .db extension. Some distributions do this automatically, otherwise you need to manually run the postfix utility postmap (or in a pinch, makemap). In your case:

    postmap -c /etc/postfix /etc/postfix/sasl_passwd
    

    This will take /etc/postfix/sasl_passwd and hash it into /etc/postfix/sasl_passwd.db, which is the actual file Postfix checks. It is possible that this particular detail was not covered in the tutorial you followed, and Postfix is still checking a .db file which was built from the previous (and empty!) sasl_passwd.

    You are quite right that by specifying user, host and pass in PEAR, you are effectively overriding Postfix configuration – I think the Mail package performs so-called direct-to-MX exchange, and thus does not even need Postfix at all.

    The log files should be specified in main.conf and are usually /var/log/messages or /var/log/mail(.something).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Seemingly simple, but I cannot find anything relevant on the web. What is the
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
This could be a duplicate question, but I have no idea what search terms
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.