summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorD. Can Celasun2023-10-21 11:18:11 +0100
committerD. Can Celasun2023-10-21 11:18:11 +0100
commitdb702d2da0dd0ba438f8b7fd83db91177875e51b (patch)
tree96ba7714e210ae2699d8fc3993880e4f0f69703d /PKGBUILD
parentfee40289ade71028d6816b5dc80a3b418b110e04 (diff)
downloadaur-db702d2da0dd0ba438f8b7fd83db91177875e51b.tar.gz
[ssmtp] Add xoauth2 patch
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD42
1 files changed, 32 insertions, 10 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6f0993760f15..4c2c85810010 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,26 @@
+# Maintainer: D. Can Celasun <can[at]dcc[dot]im>
+
+# To use, put `AuthMethod=XOAUTH2` and `AuthPass=<your obtained OAuth2 access token>` in `/etc/ssmtp/ssmtp.conf`.
+#
+# Remember that your OAuth2 access token is often short-lived and will expire in small intervals. (for example, Gmail access tokens expire in 1 hour) You will need a script to refresh it using a long-term refresh token.
+#
+# For Gmail, oauth2l (https://github.com/google/oauth2l, https://aur.archlinux.org/packages/oauth2l) can be used to obtain and refresh the access token using your own registered client secret with Google. Example script:
+#
+# #!/bin/bash
+# ACCESS_TOKEN=$(oauth2l fetch --scope=https://mail.google.com/ \
+# --credentials=/etc/oauth2l.json --cache=/etc/ssmtp/oauth2l.cache --refresh)
+# sed -i "s/^AuthPass=.*$/AuthPass=$ACCESS_TOKEN/" /etc/ssmtp/ssmtp.conf
+#
+# To refresh the access token every time before sending an email from the command line:
+#
+# /etc/oauth2l.json is your client ID info
+# /etc/ssmtp/oauth2l.cache is the oauth2l cache location for storing the refresh token.
+
+
+
pkgname=ssmtp
pkgver=2.64
-pkgrel=17
+pkgrel=18
pkgdesc="Extremely simple MTA to get mail off the system to a mailhub (with Fedora patches)"
arch=('i686' 'x86_64' 'armv7' 'aarch64' 'armv6h' 'armv7h')
license=('GPL')
@@ -19,15 +39,17 @@ source=("http://ftp.debian.org/debian/pool/main/s/ssmtp/${pkgname}_${pkgver}.ori
'remote-addr.patch'
'validate-TLS-server-cert.patch'
'openssl_crypto.patch'
+ 'xoauth2.patch'
)
-md5sums=('65b4e0df4934a6cd08c506cabcbe584f'
- '15d3b21c64b83aba4ad2283318ac0680'
- 'd2b946bd299453eb2df7bcc1d6186592'
- '9de4e3a78799492a4fa8238e13e88d06'
- '69c2bd9a00189a4c110d420b23d69258'
- '3473db24c65bbe6fdeb51e99427e8ee2'
- '237a6fad4d367b566ada3a900d1f1bc0'
- 'aeb4ed09a26eefea9a5f6ac755c4dff0')
+sha256sums=('22c37dc90c871e8e052b2cab0ad219d010fa938608cd66b21c8f3c759046fa36'
+ 'b0203e2bed2a3c053b47fc7e36b48decf1157ec2fc3eae130b9a1bc46bd2d357'
+ 'eaa35ea5cee7ba471791555e5017c4565de4d527d15d9d3c86f36b985373f325'
+ '108d1a04dac1d99bb5bc67829f64cab5dc95c44611ebe4f535d0a5b5e8f3a49f'
+ 'd0c05b24ff27c781a3e0379769f4af3ad1f0244c8899344928805a95a6ded8b3'
+ '3f9f21f6363cee92c1e5763b9bd491e262258d39b401dccc8efc2b40c8e0dd0a'
+ '280ac74257ad89029f91dc47b78ce3c1f9f4a96696b31f82b66d64bb3b2bcc47'
+ '6cfcc8660968c97ff95e1df0b0725076838b4d35ffaa17c65afcf09ebca3170d'
+ 'fc8d166a97329755cff25a1f444b3892071ff5618ef698e27de5bfb004373937')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
@@ -40,6 +62,7 @@ prepare() {
patch -p1 -i "${srcdir}/garbage_writes.patch"
patch -p1 -i "${srcdir}/remote-addr.patch"
patch -p1 -i "${srcdir}/validate-TLS-server-cert.patch"
+ patch -p1 -i "${srcdir}/xoauth2.patch"
}
build() {
@@ -69,7 +92,6 @@ package() {
ln -s ssmtp "${pkgdir}/usr/sbin/sendmail"
ln -s ssmtp "${pkgdir}/usr/sbin/newaliases"
ln -s ssmtp "${pkgdir}/usr/sbin/mailq"
- # usrmove
cd "$pkgdir"
mv usr/sbin usr/bin