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