I managed to configure a local postfix server, which works correctly when using the mail command (and I receive emails from the cron deamon),

however, if I try to connect using telnet localhost 25 the server will not respond to commands, and CTRL+D will not quit (it freezes) or using python:

import smtplib
server = smtplib.SMTP('localhost', 25)

the connection will freeze too

Someone knows where this might be coming from?

For information, postfix sends my mail through GMail, here is my configuration:

mydomain_fallback = localhost
message_size_limit = 10485760
biff = no
mynetworks =, [::1]/128
smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated permit
recipient_delimiter = +
smtpd_tls_ciphers = medium
inet_protocols = all
inet_interfaces = loopback-only

# Gmail

and here is the tail from mail.log when connecting using python:

May 13 16:06:33 potiron postfix/master[12808]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
May 13 16:06:33 potiron postfix/postscreen[21559]: CONNECT from []:59676
May 13 16:06:33 potiron postfix/postscreen[21559]: WHITELISTED []:59676
May 13 16:07:33 potiron postfix/smtpd[21562]: warning: database /etc/aliases.db is older than source file /etc/aliases
May 13 16:07:33 potiron postfix/smtpd[21562]: fatal: open /etc/postfix/submit.cred: No such file or directory
May 13 16:07:34 potiron postfix/master[12808]: warning: process /usr/libexec/postfix/smtpd pid 21562 exit status 1
May 13 16:07:34 potiron postfix/master[12808]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling

it seems that my connection is whitelisted, however, it seems that it connects from 59676, is this conflicting with mynetworks =, [::1]/128?


In the 3rd to last line of that log dump, it says "fatal: open /etc/postfix/submit.cred: No such file or directory". Somewhere in your config files, you reference /etc/postfix/submit.cred . It doesn't look like it's in your main postfix conf, but it could be in one of the ancillary configs, or it could also be in your sasl authentication config's somewhere (I believe. I'm not sure if SASL is totally bypassed by the whitelist or not).

As a side note, your /etc/aliases.db is outdated. You edited /etc/aliases, but did not refresh aliases.db.

  • I tried to sudo touch /etc/postfix/submit.cred, but to no avail, BTW how do you update aliases? I tried sudo postfix reload – oulipo May 13 '13 at 14:18
  • Wow... I did: sudo touch /etc/postfix/submit.cred and sudo chmod 0600 /etc/postfix/submit.cred and now it works (but the server waits a long time before connecting) – oulipo May 13 '13 at 14:21
  • I believe the easier to use wrapper around it is newaliases . I'm not sure what that delay would be, it may be something to do with submit.cred. I suspect that somewhere in your system, it expects /etc/postfix/submit.cred is some sort of authentication script, and it gets confused when it can't execute it. Check your SASL conf's, because I don't think SASL is set up correctly, which means no one will be able to send mail that isn't whitelisted, and you don't want a big whitelist. – Seth Curry May 13 '13 at 14:25
  • Since it is only on my laptop for scripting purpose, it is no big deal – oulipo May 13 '13 at 14:27
  • Ah, in that case you are correct, a whitelist is certainly fine for that, I thought it was a true mail server, and we all know there are more than enough of those that are misconfigured already haha – Seth Curry May 13 '13 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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