X-Loop: help-debbugs@HIDDEN Subject: [bug#59705] [PATCH] gnu: Add postfix. Resent-From: EuAndreh <eu@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Wed, 30 Nov 2022 00:00:02 +0000 Resent-Message-ID: <handler.59705.B.166976639618748 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 59705 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59705 <at> debbugs.gnu.org Cc: EuAndreh <eu@HIDDEN> X-Debbugs-Original-To: guix-patches@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.166976639618748 (code B ref -1); Wed, 30 Nov 2022 00:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Nov 2022 23:59:56 +0000 Received: from localhost ([127.0.0.1]:57270 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1p0AW0-0004sK-Fm for submit <at> debbugs.gnu.org; Tue, 29 Nov 2022 18:59:55 -0500 Received: from lists.gnu.org ([209.51.188.17]:35170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eu@HIDDEN>) id 1p0AVv-0004sC-GQ for submit <at> debbugs.gnu.org; Tue, 29 Nov 2022 18:59:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eu@HIDDEN>) id 1p0AVu-00079B-1p for guix-patches@HIDDEN; Tue, 29 Nov 2022 18:59:46 -0500 Received: from euandre.org ([216.238.68.100]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eu@HIDDEN>) id 1p0AVj-0003sO-Ra for guix-patches@HIDDEN; Tue, 29 Nov 2022 18:59:45 -0500 Received: from euandre.org (localhost [127.0.0.1]) by euandre.org (Postfix) with ESMTP id D9B483794D5; Tue, 29 Nov 2022 20:59:32 -0300 (-03) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=euandre.org; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=dkimproxy; bh=8znTFtWve98jqKGbIU2A FnFv2Vg=; b=khByN+zfaPJQaT1SVtQj7zedk3bL4IBCvPE67VABKW1AmMkStHPW yefkwynxzCOyYoQH0XRd5yRnyo5RiMUWalZRH5nwv3j8HE4v4bAhuond6vIvhaKr ChCFRu8uHypjRjBZYrgGE0Zb1/kkqtD85Vzgy8dmMQetq1FA3YvdkfigkyJzzXu6 LClz867IjfCGSCE7DYPOiys3Cshi7ow4tQXkjF4pAdZfMiFabbeSRBOhjz2QKMsM /1sWc91XhW1QPC6RIZ8GHjZ9FW1ybxXpVu91GVOxWaoKZ7KGcOfXxq2D+Tj3RwMP 89LNR8b24s7bISFumq2QT7hR5fGG+YLEfQ== From: EuAndreh <eu@HIDDEN> Date: Tue, 29 Nov 2022 20:59:30 -0300 Message-Id: <20221129235930.2532-1-eu@HIDDEN> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=216.238.68.100; envelope-from=eu@HIDDEN; helo=euandre.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.4 (--) * gnu/packages/mail.scm (postfix): New variable. --- Notes: This package has a few too many assumptions about the system where it= s running. =20 Other than the usual call to hard-coded /bin/sh paths: =20 - is too conservative on the PATH that the "master" process is launch= ed into; - what is available to sbin(8) commands under their paths; - where the setuid programs live; - what should be the permissions of files under /etc/. =20 It also has a very opinionated way of being given $PREFIX paths, and = how the dynamic Makefiles are generated, how DESTDIR is handled, etc. =20 I had disabled the "postconf -e" ability to edit configuration option= s in-place, as the postfix-service-type that I'm working on generates those files and puts the in the store, which isn't writable. =20 All in all, this is a working package: this very email is sent from a local installation of Postfix in my Guix laptop, which forward the em= ail to the server running Postfix under Guix, who than sends it off to th= e internet! So if you're reading this, it is working :) gnu/packages/mail.scm | 125 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 754c9bc6de..c18ddced82 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -4876,3 +4876,128 @@ (define-public aerc ;; <https://lists.sr.ht/~rjarry/aerc-devel/%3Cb5cb213a7d0c699a886971= 658c2476 ;; 1073eb2391%40disroot.org%3E> (license license:gpl3+))) + +(define-public postfix + (package + (name "postfix") + (version "3.8-20221023") + (source (origin + (method url-fetch) + (uri (string-append + "http://cdn.postfix.johnriley.me/mirrors/postfix-rel= ease/experimental/postfix-" + version ".tar.gz")) + (sha256 + (base32 + "0aaylhn81n9z3kidx53kzf2jrilr3lgwfxsk1r4hn7nkrp62bcwm"))= )) + (build-system gnu-build-system) + (arguments + (list #:tests? #f + #:modules `((srfi srfi-26) + ,@%gnu-build-system-modules) + #:phases #~(modify-phases %standard-phases + (add-before 'configure 'patch-/bin/sh + (lambda _ + (substitute* (find-files "." "^Makefile") + (("/bin/sh") + (which "sh"))))) + (add-before 'configure 'patch-bdb-include + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "makedefs" + (("/usr/include") + (string-append (assoc-ref inputs "bdb") + "/include"))))) + (add-before 'configure 'dont-hardcode-PATH + (lambda _ + (substitute* '("postfix-install" + "conf/post-install") + (("^PATH=3D") + "# PATH=3D")))) + (add-before 'configure 'fix-strict-PATH + (lambda _ + (substitute* "src/util/sys_defs.h" + (("^#define (ROOT_PATH|_PATH_DEFPATH|_PATH= _STDPATH).*") + "#define ROOT_PATH \"/run/setuid-programs= :/run/current-system/profile/bin:/run/current-system/profile/sbin\"\n")))= ) + (add-before 'configure 'use-relative-symlink-to-= store + (lambda _ + (substitute* "postfix-install" + (("ln -sf") + "ln -rsf")))) + (add-before 'configure 'fix-absolute-path-to-set= uid-programs + (lambda _ + (substitute* "conf/postfix-script" + (("\\$command_directory/postqueue") + "/run/setuid-programs/postqueue") + (("\\$command_directory/postdrop") + "/run/setuid-programs/postdrop")))) + (add-before 'configure 'disable-warning-on-non-w= ritable-config-files + (lambda _ + (substitute* "conf/postfix-script" + (("find \\$todo \\\\\\( -perm -020 -o -per= m -002 \\\\\\) \\\\\n") + " # find $todo \\( -perm -020 -o -perm -0= 02 \\)")))) + (add-before 'configure 'disable-write-to-/etc/po= stfix + (lambda _ + (substitute* "src/postconf/postconf_edit.c" + (("pcf_set_config_dir.*") + "return;")))) + (add-before 'configure 'setup-environment + (lambda* (#:key outputs inputs #:allow-other-k= eys) + (setenv "CCARGS" + (string-append + "-DUSE_TLS -DUSE_SASL_AUTH -DUSE_CY= RUS_SASL -I" + (assoc-ref inputs "cyrus-sasl") + "/include/sasl")) + (setenv "AUXLIBS" "-lnsl -lcrypto -lssl -lsa= sl2") + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (sbin (string-append out "/sbin")) + (lib (string-append out "/lib/postfix= ")) + (libexec (string-append out + "/libexec/pos= tfix")) + (etc (string-append out "/etc/postfix= ")) + (man (string-append out "/share/man")= ) + (doc (string-append out + "/share/doc/postf= ix-" + #$version)) + (html (string-append doc "/html"))) + (setenv "install_root" "wip-prefix") + (setenv "newaliases_path" + (string-append bin "/newaliases")) + (setenv "mailq_path" + (string-append bin "/mailq")) + (setenv "sendmail_path" + (string-append sbin "/sendmail")) + (setenv "command_directory" sbin) + (setenv "shlib_directory" lib) + (setenv "daemon_directory" libexec) + (setenv "meta_directory" etc) + (setenv "sample_directory" etc) + (setenv "manpage_directory" man) + (setenv "readme_directory" doc) + (setenv "html_directory" html) + (setenv "sample_directory" + (string-append out "/share/postfix= "))))) + (replace 'configure + (lambda _ + (invoke "make" "makefiles" "pie=3Dyes" + "dynamicmaps=3Dyes"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (invoke "make" "non-interactive-package") + (delete-file-recursively "wip-prefix/var") + (copy-recursively "wip-prefix/etc" + (string-append out "/etc= ")) + (copy-recursively (string-append "wip-pref= ix" + out) out)= )))))) + (inputs (list bdb cyrus-sasl libnsl openssl perl)) + (native-inputs (list m4)) + (home-page "https://www.postfix.org") + (synopsis "sendmail compatible MTA") + (description + "Postfix is Wietse Venema's mail server that started life at IBM re= search +as an alternative to the widely-used Sendmail program. Now at Google, W= ietse +continues to support Postfix. + +Postfix attempts to be fast, easy to administer, and secure. The outsid= e has a +definite Sendmail-ish flavor, but the inside is completely different.") + (license (list license:ibmpl1.0 license:epl2.0)))) --=20 2.38.1
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: EuAndreh <eu@HIDDEN> Subject: bug#59705: Acknowledgement ([PATCH] gnu: Add postfix.) Message-ID: <handler.59705.B.166976639618748.ack <at> debbugs.gnu.org> References: <20221129235930.2532-1-eu@HIDDEN> X-Gnu-PR-Message: ack 59705 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 59705 <at> debbugs.gnu.org Date: Wed, 30 Nov 2022 00:00:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): guix-patches@HIDDEN If you wish to submit further information on this problem, please send it to 59705 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 59705: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D59705 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: [bug#59705] [PATCH] gnu: Add postfix. Resent-From: EuAndreh <eu@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: guix-patches@HIDDEN Resent-Date: Wed, 30 Nov 2022 23:33:01 +0000 Resent-Message-ID: <handler.59705.B59705.166985114520664 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 59705 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59705 <at> debbugs.gnu.org Cc: cwebber@HIDDEN, brantcgardner@HIDDEN, rekado@HIDDEN, janneke@HIDDEN Received: via spool by 59705-submit <at> debbugs.gnu.org id=B59705.166985114520664 (code B ref 59705); Wed, 30 Nov 2022 23:33:01 +0000 Received: (at 59705) by debbugs.gnu.org; 30 Nov 2022 23:32:25 +0000 Received: from localhost ([127.0.0.1]:35769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1p0WYy-0005NE-NI for submit <at> debbugs.gnu.org; Wed, 30 Nov 2022 18:32:25 -0500 Received: from euandre.org ([216.238.68.100]:43070) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eu@HIDDEN>) id 1p0WYs-0005N8-CS for 59705 <at> debbugs.gnu.org; Wed, 30 Nov 2022 18:32:22 -0500 Received: from euandre.org (localhost [127.0.0.1]) by euandre.org (Postfix) with ESMTP id BE2393A81A2; Wed, 30 Nov 2022 20:32:15 -0300 (-03) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=euandre.org; h= message-id:date:mime-version:to:references:from:cc:subject :in-reply-to:content-type:content-transfer-encoding; s= dkimproxy; bh=QMvHvOT9RI/n8m77NWqOA5MMa2Q=; b=pQzPH2NOJfyE2+bL7z iP8y//Uvw83mEb3bnToUrvBJv39a3nT5nj1EKYBK35oPZVA2fgMC/jPmwLF9vtlv 6s1EuTrK+iIXM0YnWxVXWw9t51Lye9810EM134ZQuDadlxYZvTBgUTQ5EG7oUv6R 6R0Kgk8wPM7RuNLKXpxNvTmDQSRisPmK3EswsSaf5hTJ0lFjPs1nrbQlNXrYFP7G 9YLkm3JCVVtA75txhg87s8aKkKXe4aoDyH5VvQG4wB6rkaeMrMMjfF1N3FssqGea riTNR7j6c+bAXLYJb2+wungv/eIXU33SV7h+j5+PWId8T9JFYT5OHjOS0B/nnns9 jCvg== Message-ID: <08c43e00-4b3b-1195-49a6-f6f08ae68ddb@HIDDEN> Date: Wed, 30 Nov 2022 23:32:11 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Content-Language: en-US, pt, fr, eo, en References: <20221129235930.2532-1-eu@HIDDEN> From: EuAndreh <eu@HIDDEN> In-Reply-To: <20221129235930.2532-1-eu@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) Talking about this with rekado on IRC, it reminded me that I found out about the "wip-postfix" branch after I started working on this package. This patch supersedes it, and I took inspiration from it during the final tweaks. I'm Cc'ing some people involved in previous discussions about Postfix on Guix, and wip-postfix, and invite you to review it too: :) I'm doing the final polishing touches on postfix-service-type, alongsige with cyrus-sasl-service-type and dkimproxyout-service-type to have a fully compliant woking mail server.
Received: (at control) by debbugs.gnu.org; 14 Dec 2022 11:36:14 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 14 06:36:14 2022 Received: from localhost ([127.0.0.1]:38520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1p5Q3a-0002o3-KR for submit <at> debbugs.gnu.org; Wed, 14 Dec 2022 06:36:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34234) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1p5Q3Z-0002nx-Ql for control <at> debbugs.gnu.org; Wed, 14 Dec 2022 06:36:14 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1p5Q3U-0000Mg-J7 for control <at> debbugs.gnu.org; Wed, 14 Dec 2022 06:36:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:Subject:From:To:Date:in-reply-to: references; bh=mKAz3ljVFkHNE2A+c3HZbhGlXWjl1zgq+eyOEVo8+ag=; b=EB1sBBaPvDrf0T pd7ksUe+N2PdSjGkSX4ChcIFMaTTXKClPu1Vk5ILBtj6MLzeHWgf5B6rAPYGM9G05IhWhhbzN00KT o5jXem7bXqOLH+QZqRTHlzY2XhYhJBARAmYTsYGUQyABcUr5K79R9vUpsqmok+TKc7/tG8kk7sD3I Hr9ia1Y5L6pMLwJSaQtO6AvGP97tn8c8+QdOv5CynTZqUGpeuy5IEuJ+15yFBBbhgFtt2Jj0OGnBo Jvs8Te/5Bilu1wP0L+MLC57xpmTPay97CtI86tqwXz0HHe1shbgTlwTLBw0dXt1kZceaMKI++0R4e B/VCguxdrVTyJA7WcrPA==; Received: from eduroam-111172.grenet.fr ([130.190.111.172] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1p5Q3U-0002kH-7D for control <at> debbugs.gnu.org; Wed, 14 Dec 2022 06:36:08 -0500 Date: Wed, 14 Dec 2022 12:36:06 +0100 Message-Id: <87y1rarzdl.fsf@HIDDEN> To: control <at> debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN> Subject: control message for bug #59705 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) tags 59705 + moreinfo quit
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.