From dd45892f6d7925672171c17d135363b3812c08d7 Mon Sep 17 00:00:00 2001 From: "Andrey V.Kosteltsev" Date: Mon, 18 Jul 2022 14:08:11 +0300 Subject: msmtp: use openssl instead gnutls; Auth method LOGIN --- .../recipes-support/msmtp/msmtp/msmtprc | 17 +++++++++ .../recipes-support/msmtp/msmtp_1.8.20.bb | 40 ++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 meta-ibs/meta-cp2-5422/recipes-support/msmtp/msmtp/msmtprc create mode 100644 meta-ibs/meta-cp2-5422/recipes-support/msmtp/msmtp_1.8.20.bb diff --git a/meta-ibs/meta-cp2-5422/recipes-support/msmtp/msmtp/msmtprc b/meta-ibs/meta-cp2-5422/recipes-support/msmtp/msmtp/msmtprc new file mode 100644 index 0000000000..8c77509642 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-support/msmtp/msmtp/msmtprc @@ -0,0 +1,17 @@ + +defaults +allow_from_override on +auth login +tls on +tls_trust_file /etc/ssl/certs/ca-certificates.crt +logfile /var/log/msmtp.log + +# Some Mail account: +account bmc +host smtp.sila.ru +port 587 +from bmc@cp2-5422.sila.ru +user bmc +password + +account default : bmc diff --git a/meta-ibs/meta-cp2-5422/recipes-support/msmtp/msmtp_1.8.20.bb b/meta-ibs/meta-cp2-5422/recipes-support/msmtp/msmtp_1.8.20.bb new file mode 100644 index 0000000000..2009ecaba0 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-support/msmtp/msmtp_1.8.20.bb @@ -0,0 +1,40 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +# +# Example: +# ------- +# echo -e "Subject:BMC cp2-5422\n\nMessage from BMC." | /usr/sbin/sendmail -a default support@example.com +# + +SUMMARY = "A mini smtp client" +HOMEPAGE = "https://marlam.de/msmtp" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "https://marlam.de/msmtp/releases/msmtp-1.8.20.tar.xz \ + file://msmtprc \ + " + +SRC_URI[md5sum] = "6fc0ce864d74992f6c6124c3611d15da" +SRC_URI[sha256sum] = "d93ae2aafc0f48af7dc9d0b394df1bb800588b8b4e8d096d8b3cf225344eb111" + +inherit autotools pkgconfig gettext update-alternatives + +EXTRA_OECONF += "--prefix=/usr --sysconfdir=/etc --bindir=/usr/sbin --with-tls=openssl --mandir=${mandir}" + +DEPENDS += " openssl" + +do_install:append () { + install -d ${D}${sysconfdir} + install -m 0600 ${WORKDIR}/msmtprc ${D}${sysconfdir}/msmtprc + ln -s msmtp ${D}${sbindir}/sendmail + ln -s msmtp ${D}${sbindir}/newaliases + ln -s msmtp ${D}${sbindir}/mailq +} + +ALTERNATIVE_PRIORITY:${PN} = "100" + +ALTERNATIVE:${PN} = "mailq newaliases sendmail" +ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail" +ALTERNATIVE_LINK_NAME[newaliases] = "${sbindir}/newaliases" +ALTERNATIVE_LINK_NAME[mailq] = "${sbindir}/mailq" -- cgit v1.2.3