summaryrefslogtreecommitdiff
path: root/fetchmail
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-07-11 09:32:39 +0200
committerErich Eckner <git@eckner.net>2019-07-11 09:33:49 +0200
commit704b7f71c703ecfe5b19d48dea6a74d3a9ba08fa (patch)
treed9a5542b5bb25a39d80f064ccbaf82425faa9d2b /fetchmail
parent0287978f1277e3ed7e69dc799deebbf90ea39e4c (diff)
downloadarchlinuxewe-704b7f71c703ecfe5b19d48dea6a74d3a9ba08fa.tar.xz
fetchmail new
Diffstat (limited to 'fetchmail')
-rw-r--r--fetchmail/PKGBUILD42
-rw-r--r--fetchmail/disable-sslv3.patch20
-rw-r--r--fetchmail/fetchmail.service11
-rw-r--r--fetchmail/fetchmail.sysusers2
-rw-r--r--fetchmail/fetchmail.tmpfiles1
5 files changed, 76 insertions, 0 deletions
diff --git a/fetchmail/PKGBUILD b/fetchmail/PKGBUILD
new file mode 100644
index 000000000..2cd86c201
--- /dev/null
+++ b/fetchmail/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Erich Eckner <arch at eckner dot net>
+
+pkgname=fetchmail
+pkgver=6.3.26
+pkgrel=7
+pkgdesc="A remote-mail retrieval utility"
+arch=('x86_64')
+url="http://www.fetchmail.info"
+license=('GPL')
+depends=('openssl')
+makedepends=('python2')
+optdepends=('tk: for using fetchmailconf'
+ 'python2: for using fetchmailconf')
+options=('!makeflags')
+source=("https://sourceforge.net/projects/fetchmail/files/branch_6.3/${pkgname}-${pkgver}.tar.xz"
+ 'disable-sslv3.patch' 'fetchmail.tmpfiles' 'fetchmail.sysusers' 'fetchmail.service')
+sha1sums=('de8dbe62a8edfa232ee4278257a1fe67aa1c797a'
+ 'dab3bf46b033e8ee7cadc020c1fb4ce325f46693'
+ '199ba749c829f22286c34aabcf8b7dd5bbd7c0e6'
+ 'b113cb61a866eff53cd8f113d084a99f01bf5d77'
+ '0fc1870a33d1e0efb70169ddf1b6adc9d253e076')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i ../disable-sslv3.patch
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ sed -i 's|/usr/bin/env python|/usr/bin/env python2|' fetchmailconf.py
+ PYTHON=python2 ./configure --prefix=/usr --with-ssl=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -d -o 90 -g nobody "${pkgdir}/var/lib/fetchmail"
+ install -D -m644 ${srcdir}/fetchmail.tmpfiles ${pkgdir}/usr/lib/tmpfiles.d/fetchmail.conf
+ install -D -m644 ${srcdir}/fetchmail.sysusers ${pkgdir}/usr/lib/sysusers.d/fetchmail.conf
+ install -D -m644 ${srcdir}/fetchmail.service ${pkgdir}/usr/lib/systemd/system/fetchmail.service
+}
diff --git a/fetchmail/disable-sslv3.patch b/fetchmail/disable-sslv3.patch
new file mode 100644
index 000000000..2edc41e2b
--- /dev/null
+++ b/fetchmail/disable-sslv3.patch
@@ -0,0 +1,20 @@
+diff -u -r fetchmail-6.3.26/socket.c fetchmail-6.3.26-nossl3/socket.c
+--- fetchmail-6.3.26/socket.c 2013-04-23 22:00:45.000000000 +0200
++++ fetchmail-6.3.26-nossl3/socket.c 2016-03-03 18:18:46.688881618 +0100
+@@ -907,14 +907,11 @@
+ _ssl_context[sock] = NULL;
+ if(myproto) {
+ if(!strcasecmp("ssl2",myproto)) {
+-#if HAVE_DECL_SSLV2_CLIENT_METHOD + 0 > 0
+- _ctx[sock] = SSL_CTX_new(SSLv2_client_method());
+-#else
+ report(stderr, GT_("Your operating system does not support SSLv2.\n"));
+ return -1;
+-#endif
+ } else if(!strcasecmp("ssl3",myproto)) {
+- _ctx[sock] = SSL_CTX_new(SSLv3_client_method());
++ report(stderr, GT_("Your operating system does not support SSLv3.\n"));
++ return -1;
+ } else if(!strcasecmp("tls1",myproto)) {
+ _ctx[sock] = SSL_CTX_new(TLSv1_client_method());
+ } else if (!strcasecmp("ssl23",myproto)) {
diff --git a/fetchmail/fetchmail.service b/fetchmail/fetchmail.service
new file mode 100644
index 000000000..64c118270
--- /dev/null
+++ b/fetchmail/fetchmail.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Fetchmail
+After=network.target
+
+[Service]
+User=fetchmail
+ExecStart=/usr/bin/fetchmail -d 900 -f /etc/fetchmailrc
+RestartSec=1
+
+[Install]
+WantedBy=multi-user.target
diff --git a/fetchmail/fetchmail.sysusers b/fetchmail/fetchmail.sysusers
new file mode 100644
index 000000000..57f99eec7
--- /dev/null
+++ b/fetchmail/fetchmail.sysusers
@@ -0,0 +1,2 @@
+u fetchmail 90 "Fetchmail daemon" /var/lib/fetchmail
+m fetchmail nobody
diff --git a/fetchmail/fetchmail.tmpfiles b/fetchmail/fetchmail.tmpfiles
new file mode 100644
index 000000000..07945f876
--- /dev/null
+++ b/fetchmail/fetchmail.tmpfiles
@@ -0,0 +1 @@
+d /run/fetchmail 700 fetchmail nobody