# $Id: Portfile,v 1.19 2004/04/25 08:32:42 yeled Exp $ PortSystem 1.0 name postfix version 2.0.17 revision 1 categories mail maintainers yeled@opendarwin.org 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/ platforms darwin checksums md5 482e3912e4e910bd62f1a2d74bfa3b77 master_sites ftp://ftp.tau.ac.il/pub/unix/mail/postfix/official/ \ http://postfix.problemlos.ch/release/official/ \ ftp://ftp.matrix.com.br/pub/postfix/official/ \ ftp://ftp.its.cz/MIRRORS/ftp.porcupine.org/mirrors/postfix-release/official/ \ ftp://ftp.club-internet.fr/pub/mirrors/ftp.porcupine.org/postfix-release/official/ \ ftp://ftp.doc.cs.univ-paris8.fr/mirrors/ftp.porcupine.org/postfix-release/official/ patchfiles patch-access.5 patch-flush.8 patch-master.8 \ patch-regexp_table.5 patch-sys_defs.h patch-canonical.5 \ patch-mail_params.h patch-pcre_table.5 patch-postdrop.1 \ patch-postqueue.1 patch-relocated.5 patch-transport.5 \ patch-cleanup.8 patch-main.cf patch-postfix-install \ patch-proxymap.8 patch-sample-misc.cf patch-sendmail.1 \ patch-virtual.5 build.env CCARGS=-DNO_PCRE default_variants +pcre variant pcre { depends_lib-append lib:libpcre:pcre build.env-delete CCARGS=-DNO_PCRE } platform darwin 7 { build.env-append CCARGS=-DBIND_8_COMPAT } configure { cd ${worksrcpath} reinplace "s|__PREFIX|${prefix}|g" src/util/sys_defs.h reinplace "s|__PREFIX|${prefix}|g" conf/main.cf reinplace "s|__PREFIX|${prefix}|g" src/global/mail_params.h reinplace "s|__PREFIX|${prefix}|g" conf/sample-misc.cf reinplace "s|__PREFIX|${prefix}|g" man/man1/postdrop.1 reinplace "s|__PREFIX|${prefix}|g" man/man1/postqueue.1 reinplace "s|__PREFIX|${prefix}|g" man/man1/sendmail.1 reinplace "s|__PREFIX|${prefix}|g" man/man5/access.5 reinplace "s|__PREFIX|${prefix}|g" man/man5/canonical.5 reinplace "s|__PREFIX|${prefix}|g" man/man5/pcre_table.5 reinplace "s|__PREFIX|${prefix}|g" man/man5/regexp_table.5 reinplace "s|__PREFIX|${prefix}|g" man/man5/relocated.5 reinplace "s|__PREFIX|${prefix}|g" man/man5/transport.5 reinplace "s|__PREFIX|${prefix}|g" man/man5/virtual.5 reinplace "s|__PREFIX|${prefix}|g" man/man8/cleanup.8 reinplace "s|__PREFIX|${prefix}|g" man/man8/flush.8 reinplace "s|__PREFIX|${prefix}|g" man/man8/master.8 reinplace "s|__PREFIX|${prefix}|g" man/man8/proxymap.8 } build.target depends_run path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup destroot { adduser postfix realname=Postfix\ Server addgroup postdrop cd ${worksrcpath} file mkdir ${destroot}${prefix}/bin file mkdir ${destroot}${prefix}/etc/postfix file mkdir ${destroot}${prefix}/etc/rc.d file mkdir ${destroot}${prefix}/libexec file mkdir ${destroot}${prefix}/sbin file mkdir ${destroot}${prefix}/share/man file mkdir ${destroot}${prefix}/share/postfix xinstall -d -o postfix -g postdrop ${destroot}${prefix}/var/spool/postfix/public xinstall -d -o postfix -g postdrop ${destroot}${prefix}/var/spool/postfix/maildrop # Add turd files to avoid these directories to be deleted. system "touch ${destroot}${prefix}/var/spool/postfix/public/.turd" system "chown postfix:postdrop ${destroot}${prefix}/var/spool/postfix/public/.turd" system "touch ${destroot}${prefix}/var/spool/postfix/maildrop/.turd" system "chown postfix:postdrop ${destroot}${prefix}/var/spool/postfix/maildrop/.turd" system "/bin/sh postfix-install -non-interactive \ install_root=${destroot} \ config_directory=${prefix}/etc/postfix \ daemon_directory=${prefix}/libexec \ command_directory=${prefix}/sbin \ queue_directory=${prefix}/var/spool/postfix \ manpage_directory=${prefix}/share/man \ sendmail_path=${prefix}/sbin/sendmail \ newaliases_path=${prefix}/bin/newaliases \ mailq_path=${prefix}/bin/mailq \ sample_directory=${prefix}/share/postfix/sample \ readme_directory=${prefix}/share/postfix/readme" xinstall -m 755 -d ${destroot}${prefix}/etc/rc.d xinstall -m 755 -c ${portpath}/files/postfix.sh ${destroot}${prefix}/etc/rc.d reinplace "s|__PREFIX|${prefix}|g" \ ${destroot}${prefix}/etc/rc.d/postfix.sh } # This makes sure we don't overwrite user /etc files. This now breaks postfix # "just working" on fresh installs. # YOU MUST MOVE THE SAMPLE FILES TO THE CORRECT NAMESPACE. post-destroot { file rename ${destroot}${prefix}/etc/postfix/main.cf \ ${destroot}${prefix}/etc/postfix/main.cf.sample file rename ${destroot}${prefix}/etc/postfix/master.cf \ ${destroot}${prefix}/etc/postfix/master.cf.sample file rename ${destroot}${prefix}/etc/postfix/aliases \ ${destroot}${prefix}/etc/postfix/aliases.sample } post-install { # Tell the user about the renaming of the configuration files. ui_msg "To get postfix working, you need to copy sample configuration " ui_msg "files and to edit them (${prefix}/etc/postfix/*.sample)." ui_msg "You may also want to turn your system's MTA off." }