1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup legacysupport 1.0 |
---|
5 | PortGroup github 1.0 |
---|
6 | |
---|
7 | github.setup OpenSMTPD OpenSMTPD 7.3.0p0-rc2 |
---|
8 | |
---|
9 | revision 0 |
---|
10 | categories mail |
---|
11 | platforms darwin |
---|
12 | license ISC |
---|
13 | maintainers {@ryanakca debian.org:rak} |
---|
14 | description secure, reliable, lean, and easy-to configure SMTP server |
---|
15 | long_description The OpenSMTPD server seeks to be \ |
---|
16 | \n* as secure as possible, and uses privilege separation to mitigate \ |
---|
17 | \n possible security bugs \ |
---|
18 | \n* as reliable as possible: any accepted email must not be lost \ |
---|
19 | \n* lean: it covers typical usage cases instead of every obscure one \ |
---|
20 | \n* easy to configure, with a configuration syntax reminiscent of the OpenBSD \ |
---|
21 | \n Packet Filter's (PF) \ |
---|
22 | \n* fast and efficient: it can handle large queues with reasonable performance |
---|
23 | homepage https://www.opensmtpd.org |
---|
24 | |
---|
25 | master_sites https://github.com/OpenSMTPD/OpenSMTPD/releases/download/$version |
---|
26 | github.tarball_from archive |
---|
27 | |
---|
28 | checksums rmd160 94559f04b0fb8204d1134216e972f0a817746b5d \ |
---|
29 | sha256 aabcbcc3fb9db435b816f600dacfaa099e1d6a428e2d2d4440ac5314f09a58c9 \ |
---|
30 | size 845767 |
---|
31 | |
---|
32 | depends_build port:bison |
---|
33 | |
---|
34 | depends_lib port:libevent \ |
---|
35 | path:lib/libssl.dylib:openssl |
---|
36 | |
---|
37 | startupitem.create yes |
---|
38 | startupitem.executable ${prefix}/sbin/smtpd -F |
---|
39 | |
---|
40 | add_users _smtpd group=_smtpd realname=OpenSMTP\ Daemon \ |
---|
41 | _smtpq group=_smtpq realname=OpenSMTP\ Queue |
---|
42 | |
---|
43 | set sysconfdir ${prefix}/etc/${name} |
---|
44 | |
---|
45 | post-patch { |
---|
46 | reinplace "s|file:/etc/mail/aliases|file:${sysconfdir}/aliases|g" ${worksrcpath}/usr.sbin/smtpd/smtpd.conf |
---|
47 | } |
---|
48 | |
---|
49 | |
---|
50 | |
---|
51 | depends_build-append \ |
---|
52 | port:autoconf \ |
---|
53 | port:automake \ |
---|
54 | port:libtool |
---|
55 | |
---|
56 | configure.args --sysconfdir=${sysconfdir} \ |
---|
57 | --with-auth-pam \ |
---|
58 | --with-libevent=${prefix} \ |
---|
59 | --with-mantype=doc \ |
---|
60 | --with-path-queue=${prefix}/var/spool/smtpd \ |
---|
61 | --with-table-db |
---|
62 | |
---|
63 | # The spool directory *must* be installed with uid/gid 0. |
---|
64 | # OpenSMTPD checks these permissions at startup (queue_backend.c, using ckdir |
---|
65 | # from util.c), and aborts if they are not correctly set. Consequently, |
---|
66 | # opensmtpd must be installed as root |
---|
67 | destroot.asroot yes |
---|
68 | destroot.keepdirs ${destroot}${prefix}/var/spool/smtpd |
---|
69 | |
---|
70 | post-destroot { |
---|
71 | xinstall -o root -g wheel -m 711 -d ${destroot}${prefix}/var/spool/smtpd |
---|
72 | file rename ${destroot}${sysconfdir}/smtpd.conf ${destroot}${sysconfdir}/smtpd.conf.dist |
---|
73 | |
---|
74 | file link -symbolic ${destroot}${prefix}/sbin/sendmail smtpctl |
---|
75 | file link -symbolic ${destroot}${prefix}/sbin/mailq smtpctl |
---|
76 | file link -symbolic ${destroot}${prefix}/sbin/makemap smtpctl |
---|
77 | file link -symbolic ${destroot}${prefix}/sbin/newaliases smtpctl |
---|
78 | } |
---|
79 | |
---|
80 | post-activate { |
---|
81 | if {![file exists ${sysconfdir}/smtpd.conf]} { |
---|
82 | file copy ${sysconfdir}/smtpd.conf.dist ${sysconfdir}/smtpd.conf |
---|
83 | } |
---|
84 | if {![file exists ${sysconfdir}/aliases] && [file exists /etc/postfix/aliases]} { |
---|
85 | file copy /etc/postfix/aliases ${sysconfdir}/aliases |
---|
86 | } |
---|
87 | } |
---|
88 | |
---|
89 | notes " |
---|
90 | Both OpenSMTPD and the built-in Postfix daemon listen on port 25 by\ |
---|
91 | default. The easiest way to avoid this conflict is to change the\ |
---|
92 | inet_interfaces setting in /etc/postfix/main.cf to keep Postfix from\ |
---|
93 | listening to the same interfaces as OpenSMTPD, and then restarting Postfix.\ |
---|
94 | To keep Postfix from listening on any interfaces, it is sufficient to set: |
---|
95 | |
---|
96 | inet_interfaces = |
---|
97 | |
---|
98 | Please see postconf(5) for more details. |
---|
99 | " |
---|
100 | |
---|
101 | livecheck.url https://opensmtpd.org/archives/ |
---|
102 | livecheck.type regex |
---|
103 | livecheck.regex opensmtpd-(\[0-9p.\]+)\\.tar\\.gz |
---|