I'm trying to test php mail function in localhost using this method:
As it says on the site there are 3 steps to set up:
/etc/postfix/main.cf
/etc/postfix/smtp_sasl_passwords
and /etc/postfix/smtp_tls_sites
Run the following commands:
$ cd /etc/postfix
$ chmod go-rx smtp_sasl_passwords
$ postmap smtp_sasl_passwords
$ postmap smtp_tls_sites
When I run $ postmap smtp_sasl_passwords
, terminal returned postmap: fatal: open database smtp_sasl_passwords.db: Permission denied
. I also tried to add sudo
command: sudo postmap smtp_sasl_passwords
(as I learnt from this video [7:30]), but it also returned the same error. I'm not sure where I went wrong?
P.S. I did some searching on Stack Overflow but solutions I found did not seem to suit me.
I figured out the solution:
You have to create 2 sets of files
smtp_sasl_passwords
smtp_sasl_passwords.db
smtp_tls_sites
smtp_tls_sites.db
Since postmap smtp_sasl_passwords
detects the db
extension.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments