PortSystem 1.0 name postfix version 3.9.0 categories mail license {IBMPL-1 EPL-2} maintainers {jmr @jmroot} openmaintainer description Fast and robust mail transfer agent long_description Postfix attempts to be fast, easy to administer, and \ secure, while at the same time being \ sendmail-compatible enough to not upset existing \ users. It also offers QMQP and VERP support to let \ Postfix act as delivery daemon for ezmlm-idx. homepage http://www.postfix.org/ checksums rmd160 3e9219eafb9c02acae04fae356981b14f0a262df \ sha256 56f5e420e7c25455a4e96c19b672f80f9a0a35fb5becc9247c9e3d5dcc617f34 master_sites https://archive.mgm51.com/mirrors/postfix-source/official/ \ http://de.postfix.org/ftpmirror/official/ \ ftp://ftp.its.cz/MIRRORS/ftp.porcupine.org/mirrors/postfix-release/official/ \ ftp://ftp.cuhk.edu.hk/pub/packages/mail-server/postfix/official/ \ http://mirror.postfix.jp/postfix-release/official/ \ http://postfix.bbnx.net/source/official/ \ http://cdn.postfix.johnriley.me/mirrors/postfix-release/official/ patchfiles patch-sys_defs.h patch-mail_params.h patch-postfix-install \ patch-makedefs patch-postfix-script post-patch { reinplace -q "s|/etc/|${prefix}/etc/|g" \ {*}[glob ${worksrcpath}/man/man1/*] \ {*}[glob ${worksrcpath}/man/man5/*] \ {*}[glob ${worksrcpath}/man/man8/*] reinplace "s|__PREFIX|${prefix}|g" ${worksrcpath}/src/util/sys_defs.h \ ${worksrcpath}/src/global/mail_params.h # Set main.cf default values reinplace "s|#default_privs|default_privs|g" \ ${worksrcpath}/conf/main.cf reinplace "s|/etc/postfix/network_table|${prefix}/etc/postfix/network_table|g" \ ${worksrcpath}/conf/main.cf reinplace "s|/etc/postfix/relay_recipients|${prefix}/etc/postfix_relay_recipients|g" \ ${worksrcpath}/conf/main.cf reinplace "s|/etc/postfix/header_checks|${prefix}/etc/postfix/header_checks|g" \ ${worksrcpath}/conf/main.cf reinplace "s|PATH=/bin:/usr/bin|PATH=${prefix}/bin:/bin:/usr/bin|g" \ ${worksrcpath}/conf/main.cf # Work around missing m4 binary if {[vercmp $xcodecltversion >= 15.3.0] && [vercmp $xcodecltversion < 15.3.1]} { reinplace "s/m4/gm4/" ${worksrcpath}/src/postconf/extract_cfg.sh } } variant universal {} set CCARGS [list -DNO_EAI -DNO_PCRE {*}[get_canonical_archflags cc]] set AUXLIBS [list -L${prefix}/lib {*}[get_canonical_archflags ld]] set pf_mail_owner _postfix set pf_setgid_group _postdrop set config_files [list main.cf master.cf access aliases canonical generic \ header_checks relocated transport virtual] # Beginning with Mac OS X 10.5, the user 'postfix' changed to '_postfix' platform darwin 8 { set pf_mail_owner postfix set pf_setgid_group postdrop } configure { set config_cmd "${build.cmd} makefiles CC='${configure.cc}' \ OPT='${configure.optflags}' CCARGS='${CCARGS}' AUXLIBS='${AUXLIBS}'" foreach aux [array names ::named_auxlibs] { append config_cmd " ${aux}='$::named_auxlibs($aux)'" } system -W ${worksrcpath} ${config_cmd} } build.target startupitem.create yes startupitem.start "${prefix}/sbin/${name} start" startupitem.stop "${prefix}/sbin/${name} stop" startupitem.pidfile auto ${prefix}/var/spool/postfix/pid/master.pid destroot { destroot.keepdirs ${destroot}${prefix}/var/spool/postfix/public \ ${destroot}${prefix}/var/spool/postfix/maildrop \ ${destroot}${prefix}/var/lib/postfix system -W ${worksrcpath} "/bin/sh postfix-install -non-interactive \ install_root=${destroot} \ config_directory=${prefix}/etc/postfix \ queue_directory=${prefix}/var/spool/postfix \ command_directory=${prefix}/sbin \ daemon_directory=${prefix}/libexec/postfix \ data_directory=${prefix}/var/lib/postfix \ sendmail_path=${prefix}/sbin/sendmail \ newaliases_path=${prefix}/bin/newaliases \ mailq_path=${prefix}/bin/mailq \ etc_directory=${prefix}/etc/postfix \ share_directory=${prefix}/share/postfix \ manpage_directory=${prefix}/share/man \ sample_directory=${prefix}/share/postfix/sample \ readme_directory=${prefix}/share/postfix/readme \ mail_owner=${pf_mail_owner} \ setgid_group=${pf_setgid_group}" # add in future when shared libraries are enabled #shlib_directory=${prefix}/lib/postfix # This makes sure we don't overwrite user cf files. foreach f $config_files { move ${destroot}${prefix}/etc/postfix/${f} \ ${destroot}${prefix}/etc/postfix/${f}.sample } # Prevent 'postfix set-permissions' from messing with # permissions on files managed by MacPorts. system -W ${destroot}${prefix}/etc/postfix \ "patch -p0 < [shellescape ${filespath}/postfix-files.patch]" if {[geteuid] == 0} { system "chown -R ${pf_mail_owner} \ '${destroot}${prefix}/var/spool/postfix/public' \ '${destroot}${prefix}/var/lib/postfix'" } } pre-install { if {[geteuid] != 0} { ui_msg "Insufficient privileges to chown files; you'll need to do this manually:" ui_msg "sudo chown -R ${pf_mail_owner} ${prefix}/var/spool/postfix/public ${prefix}/var/lib/postfix" } } post-activate { foreach f $config_files { if {![file exists ${prefix}/etc/postfix/${f}]} { copy ${prefix}/etc/postfix/${f}.sample \ ${prefix}/etc/postfix/${f} } } } # Tell the user about editing the sample configuration files. notes "To get postfix working, you need to edit the configuration files\ (${prefix}/etc/postfix/*)." variant dovecot_sasl description "add Dovecot SASL support" { lappend CCARGS -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE="dovecot" } variant ldap description "add ldap support via openldap" { depends_lib-append path:lib/libldap.dylib:openldap lappend CCARGS -DHAS_LDAP set ::named_auxlibs(AUXLIBS_LDAP) "-L${prefix}/lib -lldap -llber" } variant pcre conflicts pcre2 description "add pcre support (deprecated)" { set CCARGS [ldelete ${CCARGS} -DNO_PCRE] lappend CCARGS -DHAS_PCRE=1 -I${prefix}/include set ::named_auxlibs(AUXLIBS_PCRE) "-L${prefix}/lib -lpcre" depends_lib-append port:pcre notes-append "The pcre variant is deprecated and will be removed in a\ future update. Consider using pcre2 instead." } variant pcre2 conflicts pcre description "add pcre2 support" { set CCARGS [ldelete ${CCARGS} -DNO_PCRE] lappend CCARGS -DHAS_PCRE=2 -I${prefix}/include set ::named_auxlibs(AUXLIBS_PCRE) "-L${prefix}/lib -lpcre2-8" depends_lib-append port:pcre2 } variant sasl description "add sasl support via cyrus-sasl2" { depends_lib-append port:cyrus-sasl2 lappend CCARGS -DUSE_CYRUS_SASL -DUSE_SASL_AUTH -I${prefix}/include/sasl lappend AUXLIBS -lsasl2 } variant smtputf8 description "add support for UTF-8 email addresses and headers (EAI) via icu" { depends_lib-append path:lib/pkgconfig/icu-uc.pc:icu set CCARGS [ldelete ${CCARGS} -DNO_EAI] lappend CCARGS -I${prefix}/include } variant tls description "add tls support via openssl" { depends_lib-append path:lib/libssl.dylib:openssl lappend CCARGS -DUSE_TLS -DHAS_SSL -I${prefix}/include lappend AUXLIBS -lssl -lcrypto } variant mysql57 conflicts mysql8 mariadb10.3 mariadb10.4 mariadb10.5 mariadb10.6 mariadb10.7 mariadb10.11 percona description "add MySQL support via mysql57" { depends_lib-append port:mysql57 lappend CCARGS -DHAS_MYSQL -I${prefix}/include/mysql57/mysql set ::named_auxlibs(AUXLIBS_MYSQL) "-L${prefix}/lib/mysql57/mysql -lmysqlclient -lz -lm" } variant mysql8 conflicts mysql57 mariadb10.3 mariadb10.4 mariadb10.5 mariadb10.6 mariadb10.7 mariadb10.11 percona description "add MySQL support via mysql8" { depends_lib-append port:mysql8 lappend CCARGS -DHAS_MYSQL -I${prefix}/include/mysql8/mysql set ::named_auxlibs(AUXLIBS_MYSQL) "-L${prefix}/lib/mysql8/mysql -lmysqlclient -lz -lm" } variant mariadb10.3 conflicts mysql57 mysql8 mariadb10.4 mariadb10.5 mariadb10.6 mariadb10.7 mariadb10.11 percona description "add MySQL support via mariadb-10.3" { depends_lib-append port:mariadb-10.3 lappend CCARGS -DHAS_MYSQL -I${prefix}/include/mariadb-10.3/mysql set ::named_auxlibs(AUXLIBS_MYSQL) "-L${prefix}/lib/mariadb-10.3/mysql -lmysqlclient -lz -lm" } variant mariadb10.4 conflicts mysql57 mysql8 mariadb10.3 mariadb10.5 mariadb10.6 mariadb10.7 mariadb10.11 percona description "add MySQL support via mariadb-10.4" { depends_lib-append port:mariadb-10.4 lappend CCARGS -DHAS_MYSQL -I${prefix}/include/mariadb-10.4/mysql set ::named_auxlibs(AUXLIBS_MYSQL) "-L${prefix}/lib/mariadb-10.4/mysql -lmysqlclient -lz -lm" } variant mariadb10.5 conflicts mysql57 mysql8 mariadb10.3 mariadb10.4 mariadb10.6 mariadb10.7 mariadb10.11 percona description "add MySQL support via mariadb-10.5" { depends_lib-append port:mariadb-10.5 lappend CCARGS -DHAS_MYSQL -I${prefix}/include/mariadb-10.5/mysql set ::named_auxlibs(AUXLIBS_MYSQL) "-L${prefix}/lib/mariadb-10.5/mysql -lmysqlclient -lz -lm" } variant mariadb10.6 conflicts mysql57 mysql8 mariadb10.3 mariadb10.4 mariadb10.5 mariadb10.7 mariadb10.11 percona description "add MySQL support via mariadb-10.6" { depends_lib-append port:mariadb-10.6 lappend CCARGS -DHAS_MYSQL -I${prefix}/include/mariadb-10.6/mysql set ::named_auxlibs(AUXLIBS_MYSQL) "-L${prefix}/lib/mariadb-10.6/mysql -lmysqlclient -lz -lm" } variant mariadb10.7 conflicts mysql57 mysql8 mariadb10.3 mariadb10.4 mariadb10.5 mariadb10.6 mariadb10.11 percona description "add MySQL support via mariadb-10.7" { depends_lib-append port:mariadb-10.7 lappend CCARGS -DHAS_MYSQL -I${prefix}/include/mariadb-10.7/mysql set ::named_auxlibs(AUXLIBS_MYSQL) "-L${prefix}/lib/mariadb-10.7/mysql -lmysqlclient -lz -lm" } variant mariadb10.11 conflicts mysql57 mysql8 mariadb10.3 mariadb10.4 mariadb10.5 mariadb10.6 mariadb10.7 percona description "add MySQL support via mariadb-10.11" { depends_lib-append port:mariadb-10.11 lappend CCARGS -DHAS_MYSQL -I${prefix}/include/mariadb-10.11/mysql set ::named_auxlibs(AUXLIBS_MYSQL) "-L${prefix}/lib/mariadb-10.11/mysql -lmysqlclient -lz -lm" } variant percona conflicts mysql57 mysql8 mariadb10.3 mariadb10.4 mariadb10.5 mariadb10.6 mariadb10.7 description "add MySQL support via percona" { depends_lib-append port:percona lappend CCARGS -DHAS_MYSQL -I${prefix}/include/percona/mysql set ::named_auxlibs(AUXLIBS_MYSQL) "-L${prefix}/lib/percona/mysql -lmysqlclient -lz -lm" } variant postgresql11 conflicts postgresql12 postgresql13 postgresql14 postgresql15 postgresql16 description "add postgresql support via postgresql11" { depends_lib-append port:postgresql11 lappend CCARGS -DHAS_PGSQL -I${prefix}/include/postgresql11 set ::named_auxlibs(AUXLIBS_PGSQL) "-L${prefix}/lib/postgresql11 -lpq" } variant postgresql12 conflicts postgresql11 postgresql13 postgresql14 postgresql15 postgresql16 description "add postgresql support via postgresql12" { depends_lib-append port:postgresql12 lappend CCARGS -DHAS_PGSQL -I${prefix}/include/postgresql12 set ::named_auxlibs(AUXLIBS_PGSQL) "-L${prefix}/lib/postgresql12 -lpq" } variant postgresql13 conflicts postgresql11 postgresql12 postgresql14 postgresql15 postgresql16 description "add postgresql support via postgresql13" { depends_lib-append port:postgresql13 lappend CCARGS -DHAS_PGSQL -I${prefix}/include/postgresql13 set ::named_auxlibs(AUXLIBS_PGSQL) "-L${prefix}/lib/postgresql13 -lpq" } variant postgresql14 conflicts postgresql11 postgresql12 postgresql13 postgresql15 postgresql16 description "add postgresql support via postgresql14" { depends_lib-append port:postgresql14 lappend CCARGS -DHAS_PGSQL -I${prefix}/include/postgresql14 set ::named_auxlibs(AUXLIBS_PGSQL) "-L${prefix}/lib/postgresql14 -lpq" } variant postgresql15 conflicts postgresql11 postgresql12 postgresql13 postgresql14 postgresql16 description "add postgresql support via postgresql15" { depends_lib-append port:postgresql15 lappend CCARGS -DHAS_PGSQL -I${prefix}/include/postgresql15 set ::named_auxlibs(AUXLIBS_PGSQL) "-L${prefix}/lib/postgresql15 -lpq" } variant postgresql16 conflicts postgresql11 postgresql12 postgresql13 postgresql14 postgresql15 description "add postgresql support via postgresql16" { depends_lib-append port:postgresql16 lappend CCARGS -DHAS_PGSQL -I${prefix}/include/postgresql16 set ::named_auxlibs(AUXLIBS_PGSQL) "-L${prefix}/lib/postgresql16 -lpq" } # remove after 2024-01-23 variant postgresql96 requires postgresql14 description "Legacy compatibility variant" {} # remove after 2024-06-10 variant mariadb10.2 requires mariadb10.11 description "Legacy compatibility variant" {} # remove after 2025-01-22 variant postgresql10 requires postgresql15 description "Legacy compatibility variant" {} livecheck.type regex livecheck.url ftp://ftp.porcupine.org/mirrors/postfix-release/official/ livecheck.regex ${name}-(\[0-9.\]+)${extract.suffix}