I'm configuring Postfix to use external smtp. For this, I used this tutorial
After following it, I found in the logs that
/etc/postfix/sasl_passwd.db
couldn't be read. The file didn't exist. I used postmap hash:/etc/postfix/sasl_passwd (http://postfix.state-of-mind.de/patrick.koetter/smtpauth/smtp_auth_mailservers.html) as root, but I get:Why do I get this?
Since you've changed main.cf, you should restart the daemon. The second command below updates the virtual mappings; you must run this 'postmap' command when you change your /etc/postfix/virtual file. The 'postmap' command actually creates the hash db file that postfix looks for. # postmap access.in && mv access.in.db access.db. This converts the input file 'access.in' into the output file 'access.in.db', and replaces the file 'access.db' only when the postmap(1) command was successful. Of course typing such commands becomes boring quickly, and this is why people use 'make' instead, as shown below.
Update:
chmod 777
gives the same error as above.James BendersJames Benders
3 Answers
You need to make sure that postfix user is able to read that file. You can post the output of
$ sudo ls -l /etc/postfix/sasl_passwd.db
to get more help.To create this file, you can use the command:
This will create the
.db
file.KhaledKhaled
This issue, at least on Ubuntu 12.04, is caused by the /etc/postfix folder not being owned by the postfix user. (as inferred above).
The error message is caused because you should not directly create the .db file yourself. If you did, delete it.
The simple fix to the original issue is:
After that, you can run this
Where it is assumed your clear text passwords are in the file sasl_passwd
Tom CarchraeTom Carchrae
SyntheticMeshworkSyntheticMeshwork
Not the answer you're looking for? Browse other questions tagged postfixgmail or ask your own question.
I am seeing such an error when starting the postfix server, and also lots fo failures when watching the maillog. How can I solve this issue?
Here is the result of postconf -n
PS Running
seems to have solved the issue...
giorgio79
giorgio79giorgio79
2 Answers
Assure the precursor file ( generic NOT generic.db ) exists
when your error happens typically this file does not exist ... so create it :
only then will this be of any use
now you will have a populated file /etc/postfix/generic.db
Scott StenslandScott Stensland
I found that in my case in my /var/log/mail.err i was seeing lots of this error:
postfix/trivial-rewrite[16343]: error: open database /etc/postfix/relay.db: No such file or directory
So I pretty much followed the lead from above:
- touch /etc/postfix/relay
- /usr/sbin/postmap /etc/postfix/relay
- /sbin/rcpostfix restart
and that did the trick.
marksmarks