Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am building a web application on my MacBook Pro which needs to send email. When the application attempts to send, the connection times out. I am running postfix and I I followed the directions found here.

To troubleshoot the server, I used telnet to manually connect to localhost on port 25. I was able to connect to it successfully, but I received no response as I typed commands. Here is a transcript.

Benjamin-Brames-MacBook-Pro:LaunchDaemons bbrame$ telnet localhost 25
Connected to localhost.
Escape character is '^]'.
helo bbrame
mail from:
rcpt to:

I connected to working mail server and typed the same commands. The mail server gave a response to each command I typed as expected.

Benjamin-Brames-MacBook-Pro:~ bbrame$ telnet 25
Connected to
Escape character is '^]'.
220 ESMTP Postfix
helo bbrame
mail from:
501 5.1.7 Bad sender address syntax. See

The mail log on my MacBook shows that it recognizes when I connect, but doesn't register any subsequent commands.

Dec  1 18:53:50 Benjamin-Brames-MacBook-Pro postfix/postscreen[21354]: CONNECT from []:56145
Dec  1 18:53:50 Benjamin-Brames-MacBook-Pro postfix/postscreen[21354]: WHITELISTED []:56145
Dec  1 18:54:08 Benjamin-Brames-MacBook-Pro postfix/smtpd[21359]: fatal: open /etc/postfix/submit.cred: No such file or directory
Dec  1 18:54:09 Benjamin-Brames-MacBook-Pro postfix/master[21176]: warning: process /usr/libexec/postfix/smtpd pid 21359 exit status 1
Dec  1 18:54:09 Benjamin-Brames-MacBook-Pro postfix/master[21176]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling

Any guesses why the connection is timing out?


share|improve this question

The last three log messages turned out to be the culprit. Googling for them turned up this page;

In order to fix the problem your console is displaying, you should:

  • Create a submit.cred file in /etc/postfix directory (sudo touch /etc/postfix/submit.cred will do).
  • Create a header for that file: sudo echo "submitcred version 1" >> /etc/postfix/submit.cred
  • Add as many lines as the number of users you want to enable to submit mail, in the form hostname|user|passwd: sudo echo''hostname|username|password" >> /etc/postfix/submit.cred
  • Give the file the appropriate permissions: sudo chmod 600 /etc/postfix/submit.cred

Once you've done this you could restart postfix and everything sould run smoothly.

I created the file /etc/postfix/submit.cred and set the permissions to 0600. Everything started working after that.

share|improve this answer

Just comment out the imap_submit_cred_file = /etc/postfix/submit.cred in the /etc/postfix/ file. Then you don't have to configure any usernames and passwords. And Postfix listens to localhost only by default.

share|improve this answer

Your Answer


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.