From e424d2c0e2dc3ec7dd67a70c3946d498dbba1fca Mon Sep 17 00:00:00 2001 From: Kjetil Kjernsmo Date: Thu, 1 Sep 2022 03:06:20 +0200 Subject: [PATCH] Use readable file test for certificate files (#304) 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). --- plugins/tls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/tls b/plugins/tls index 4660184..4f6c574 100644 --- a/plugins/tls +++ b/plugins/tls @@ -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;