Skip to content

Commit

Permalink
Use readable file test for certificate files (#304)
Browse files Browse the repository at this point in the history
To make it easier to use Letsencrypt certificates with the tls plugin, I'd just like to propose to change the file test operators to `-r` as proposed in [this comment](https://community.letsencrypt.org/t/how-do-i-use-lets-encrypt-certs-in-qpsmtpd/142370/4).
  • Loading branch information
kjetilk authored Sep 1, 2022
1 parent dc7ac3c commit e424d2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/tls
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ sub init {
$key ||= "$dir/qpsmtpd-server.key";
$ca ||= "$dir/qpsmtpd-ca.crt";
$dhparam ||= "$dir/qpsmtpd-dhparam.pem";
unless (-f $cert && -f $key && -f $ca) {
unless (-r $cert && -r $key && -r $ca) {
$self->log(LOGERROR,
"Cannot locate cert/key! Run plugins/tls_cert to generate");
return;
Expand Down

0 comments on commit e424d2c

Please sign in to comment.