From 03dc2b40d928eb360f59c4c489484e6af7f271ee Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Sat, 7 Dec 2019 22:39:35 +0100 Subject: [PATCH] add email support --- conf/app.src | 4 ++-- conf/config.ini | 8 ++++---- conf/systemd.service | 8 +++++++- manifest.json | 2 +- scripts/install | 2 ++ 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/conf/app.src b/conf/app.src index b2c93ff..845678e 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://framagit.org/kresusapp/kresus/-/archive/0.15.1/kresus-0.15.1.tar.bz2 -SOURCE_SUM=ab4c6461a3844114ec2c79feebaebd428dadfa527d7e4793f29eee961c7e30db +SOURCE_URL=https://framagit.org/kresusapp/kresus/-/archive/0.15.2/kresus-0.15.2.tar.bz2 +SOURCE_SUM=420ed94313e3343f47d84095bd9adade166cc1e5d83f211d39cb2dd254bb63a6 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.bz2 SOURCE_IN_SUBDIR=true diff --git a/conf/config.ini b/conf/config.ini index 5f7eb51..5766a2b 100644 --- a/conf/config.ini +++ b/conf/config.ini @@ -76,7 +76,7 @@ sources_list= ; ; Can be removed; defaults to "", which means no emails will be sent. ; Overridden by the KRESUS_EMAIL_TRANSPORT environment variable, if it's set. -transport= +transport=sendmail ; The path to the sendmail executable to use. ; Can be removed; defaults to "", which means defaults to "sendmail" @@ -90,18 +90,18 @@ sendmail_bin= ; needed to prevent email alerts from landing in the spam folder. ; Can be removed; defaults to "", which means no email will be sent. ; Overridden by the KRESUS_EMAIL_FROM environment variable, if it's set. -from= +from=__APP__@__DOMAIN__ ; The network address (ipv4, ipv6 or FQDN) of the SMTP server. ; Can be removed; defaults to "", which means no email will be sent. ; Overridden by the KRESUS_EMAIL_HOST environment variable, if it's set. -host= +host=127.0.0.1 ; The port to which the SMTP server listens. Default values tend to be ; 25 (server to server), or 587 (clients to server), or 465 (nonstandard). ; Can be removed; defaults to "", which means no email will be sent. ; Overridden by the KRESUS_EMAIL_PORT environment variable, if it's set. -port= +port=465 ; The username used during authentication to the SMTP server. ; Can be removed; defaults to "", which means an anonymous connection. diff --git a/conf/systemd.service b/conf/systemd.service index 7dd0053..124fbd1 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -20,7 +20,13 @@ ProtectHome=true ProtectSystem=strict ProtectControlGroups=yes ProtectKernelModules=yes -ReadWritePaths=__FINALPATH__/config.ini __FINALPATH__/data/ +# to allow this systemd service to use sendmail. +# references: +# https://bugs.archlinux.org/task/57721 +# https://linux.m2osw.com/snapwebsites-postfixpostdrop18189-warning-mailqueueenter-create-file-maildrop25937318189-permission +# Future wait for this ticket to be resolved: https://github.com/YunoHost/issues/issues/947 +SupplementaryGroups=postdrop +ReadWritePaths=__FINALPATH__/config.ini __FINALPATH__/data/ /var/spool/postfix/maildrop/ StandardOutput=syslog StandardError=syslog diff --git a/manifest.json b/manifest.json index 0e2990d..458a386 100644 --- a/manifest.json +++ b/manifest.json @@ -15,7 +15,7 @@ "requirements": { "yunohost": ">= 3.6.0" }, - "version": "0.15.1~ynh1", + "version": "0.15.2~ynh2", "multi_instance": true, "services": [ "nginx" diff --git a/scripts/install b/scripts/install index f2682c6..949065d 100644 --- a/scripts/install +++ b/scripts/install @@ -140,6 +140,8 @@ ynh_replace_string "__PORT__" "$port" "$final_path/config.ini" ynh_replace_string "__PATH__" "$path_url" "$final_path/config.ini" ynh_replace_string "__FINALPATH__" "$final_path" "$final_path/config.ini" ynh_replace_string "__SALT__" "$salt" "$final_path/config.ini" +ynh_replace_string "__APP__" "$app" "$final_path/config.ini" +ynh_replace_string "__DOMAIN__" "$domain" "$final_path/config.ini" # Calculate and store the config file checksum into the app settings