summaryrefslogtreecommitdiff
path: root/~lukeshu
diff options
context:
space:
mode:
Diffstat (limited to '~lukeshu')
-rw-r--r--~lukeshu/esmtp/0001-Produce-more-useful-Invalid-peer-certificate-error-m.patch36
-rw-r--r--~lukeshu/esmtp/PKGBUILD49
2 files changed, 85 insertions, 0 deletions
diff --git a/~lukeshu/esmtp/0001-Produce-more-useful-Invalid-peer-certificate-error-m.patch b/~lukeshu/esmtp/0001-Produce-more-useful-Invalid-peer-certificate-error-m.patch
new file mode 100644
index 000000000..5ae2bd64a
--- /dev/null
+++ b/~lukeshu/esmtp/0001-Produce-more-useful-Invalid-peer-certificate-error-m.patch
@@ -0,0 +1,36 @@
+From 16a657b2626a66d15fc4c35041cd30f94ed4d17d Mon Sep 17 00:00:00 2001
+From: Luke Shumaker <lukeshu@lukeshu.com>
+Date: Tue, 21 Nov 2017 11:42:54 -0500
+Subject: [PATCH 1/1] Produce more useful "Invalid peer certificate" error
+ messages
+
+---
+ smtp.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/smtp.c b/smtp.c
+index 796578d..00cf066 100644
+--- a/smtp.c
++++ b/smtp.c
+@@ -18,6 +18,7 @@
+ #include <pwd.h>
+ #include <unistd.h>
+
++#include <openssl/ssl.h>
+ #include <auth-client.h>
+ #include <libesmtp.h>
+
+@@ -210,7 +211,9 @@ static void event_cb (smtp_session_t session, int event_no, void *arg, ...)
+ long result = va_arg (ap, long);
+ int *ok = va_arg (ap, int *);
+
+- fprintf(stderr, "Invalid peer certificate (error %ld)\n", result);
++ fprintf(stderr, "Invalid peer certificate (error %ld: %s)\n",
++ result,
++ X509_verify_cert_error_string(result));
+
+ *ok = 0;
+ break;
+--
+2.15.0
+
diff --git a/~lukeshu/esmtp/PKGBUILD b/~lukeshu/esmtp/PKGBUILD
new file mode 100644
index 000000000..e814a89fc
--- /dev/null
+++ b/~lukeshu/esmtp/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
+# Contributor: Loui Chang <louipc dot ist at gmail company>
+# Contributor: Jeff Mickey <j@codemac.net>
+# Contributor: Aaron Griffin <aaron@archlinux.org>
+
+_pkgname=esmtp
+pkgver=1.2
+pkgname=$_pkgname-lukeshu
+provides=($_pkgname=$pkgver)
+conflicts=($_pkgname)
+pkgrel=6
+pkgdesc="An easy SMTP forwarder."
+arch=('i686' 'x86_64')
+url='http://esmtp.sourceforge.net'
+url='https://git.lukeshu.com/esmtp/'
+license=('GPL')
+depends=('libesmtp-lukeshu' 'openssl')
+optdepends=('liblockfile: for esmtp-wrapper script'
+ 'procmail: for local mail delivery')
+provides=('smtp-forwarder')
+conflicts=('smtp-forwarder')
+source=("http://downloads.sourceforge.net/${_pkgname}/${_pkgname}-${pkgver}.tar.bz2"
+ "0001-Produce-more-useful-Invalid-peer-certificate-error-m.patch")
+md5sums=('79a9c1f9023d53f35bb82bf446150a72'
+ '799571f0b37f85f60928e32e03afdf51')
+
+prepare() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+
+ patch -Np1 -i ../0001-Produce-more-useful-Invalid-peer-certificate-error-m.patch
+}
+
+build() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+
+ ./configure --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin
+ make
+}
+
+package() {
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+
+ install -Dm0644 README "${pkgdir}/usr/share/doc/esmtp/README"
+ install -Dm0644 sample.esmtprc "${pkgdir}/usr/share/doc/esmtp/sample.esmtprc"
+ install -Dm0755 esmtp-wrapper "${pkgdir}/usr/share/esmtp/esmtp-wrapper"
+ install -Dm0755 ylwrap "${pkgdir}/usr/share/esmtp/ylwrap"
+}