diff --git a/main.go b/main.go index 2a773d9..25335d6 100644 --- a/main.go +++ b/main.go @@ -154,12 +154,12 @@ func modifyPasswordFile(email, password string) bool { // find the entry with the given email // replace the password with the new password // write the file back - in, err := os.ReadFile("/root/docker/mail/config/postfix-accounts") + in, err := os.ReadFile("/root/docker/mail/config/postfix-accounts.cf") if err != nil { log.Println(err) return false } - out, err := os.Create("/root/docker/mail/config/postfix-accounts.tmp") + out, err := os.Create("/root/docker/mail/config/postfix-accounts.cf.tmp") if err != nil { log.Println(err) return false @@ -174,7 +174,7 @@ func modifyPasswordFile(email, password string) bool { out.WriteString("\n") } out.Close() - os.Rename("/root/docker/mail/config/postfix-accounts.tmp", "/root/docker/mail/config/postfix-accounts") + os.Rename("/root/docker/mail/config/postfix-accounts.cf.tmp", "/root/docker/mail/config/postfix-accounts.cf") return true }