Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
helo bbrame
mail from: ben@benbrame.com
rcpt to: ben@benbrame.com

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 smtp.newnorth.net 25
Trying 66.133.129.10...
Connected to relay.glb.frontiernet.net.
Escape character is '^]'.
220 relay03.roch.ny.frontiernet.net ESMTP Postfix
helo bbrame
250 relay03.roch.ny.frontiernet.net
mail from: made_up_email@frontiernet.net
501 5.1.7 Bad sender address syntax. See http://postmaster.frontiernet.net

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 [127.0.0.1]:56145
Dec  1 18:53:50 Benjamin-Brames-MacBook-Pro postfix/postscreen[21354]: WHITELISTED [127.0.0.1]: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?

Thanks!

share|improve this question
add comment

2 Answers 2

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
add comment

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

share|improve this answer
add comment

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.