# $Id$ PortSystem 1.0 name qmail-spamcontrol version 2.4.18 revision 5 categories mail maintainers yahoo.com:compconsultant platforms darwin description Qmail, enhanced Spamcontrol version long_description Robust, popular mail system. extract.mkdir yes universal_variant no variant relaymailfrom {} variant noreqbrackets {} variant noverp {} variant moreipme {} variant bigtodo {} homepage http://www.fehcom.de/qmail/spamcontrol.html master_sites http://www.fehcom.de/qmail/spamcontrol/:spamcontrol \ http://cr.yp.to/software/:qmail \ http://qmail.site2nd.org/:qmail \ http://qmail-mirror.jms1.net/:qmail \ http://www.qmail.org/:qmail \ distfiles qmail-1.03.tar.gz:qmail \ spamcontrol-2418_tgz.bin:spamcontrol \ checksums qmail-1.03.tar.gz \ md5 622f65f982e380dbe86e6574f3abcb7c \ sha1 18fb960481291a0503e93a94df3f6094edb7f27a \ rmd160 b851f273f1d365d38efd949b1efcf35768ffa30f \ spamcontrol-2418_tgz.bin \ md5 a5502cd69e573a2753e532bce8fb6c3a \ sha1 b2329b412a88ca2072cfb5e430efd1dd8a410b64 \ rmd160 4306ff09148332f5ad4cb1a3ff3b5da74b888d79 \ worksrcdir qmail-1.03 patchfiles patch-dns.c.diff \ patch-strerr_sys.c.diff configure.cflags -O2 -include /usr/include/errno.h -c build.target setup-patch destroot.cmd ./install-destroot post-extract { # Merge Spamcontrol source with Qmail source foreach file [glob ${worksrcpath}/qmail-1.03/*] { file rename ${file} ${worksrcpath}/ } file delete ${worksrcpath}/qmail-1.03 # Create an install file to install into destroot since # destroot is not supported by qmail file copy ${worksrcpath}/conf-qmail ${worksrcpath}/conf-destroot reinplace "s|/var/qmail|${destroot}${prefix}/var/qmail|g" \ ${worksrcpath}/conf-destroot file copy ${worksrcpath}/install.c ${worksrcpath}/install-destroot.c # Change live install dir to reflect the prefix reinplace "s|/var/qmail|${prefix}/var/qmail|g" \ ${worksrcpath}/conf-qmail } post-patch { # Apply Spamcontrol patches foreach file [glob ${worksrcpath}/*.patch] { system "patch -p2 <${file}" } # Append our commands for making a destroot installer # This is because Spamcontrol and us needs to patch Makefile system "cat ${filespath}/append-Makefile >>${worksrcpath}/Makefile" # Handle the variants, disable via source code define change foreach file [glob ${worksrcpath}/*c] { if {![variant_isset relaymailfrom]} { reinplace "s|^#define RELAYMAILFROM|\/* #define RELAYMAILFROM *\/|g" \ ${file} } if {[variant_isset noreqbrackets]} { reinplace "s|^#define REQBRACKETS|\/* #define REQBRACKETS *\/|g" \ ${file} } if {[variant_isset noverp]} { reinplace "s|^#define VERP|\/* #define VERP *\/|g" \ ${file} } if {![variant_isset moreipme]} { reinplace "s|^#define MOREIPME|\/* #define MOREIPME *\/|g" \ ${file} } if {![variant_isset bigtodo]} { reinplace "s|^#define BIGTODO|\/* #define BIGTODO *\/|g" \ ${file} } } } configure { # The qmail users and groups are required before compilation addgroup qmail gid=2107 addgroup nofiles gid=2108 adduser alias uid=7790 gid=[existsgroup nofiles] realname=Qmail-alias-user home=${prefix}/var/qmail shell=/usr/bin/true adduser qmaild uid=7791 gid=[existsgroup nofiles] realname=Qmail-SMTP-user home=${prefix}/var/qmail shell=/usr/bin/true adduser qmaill uid=7792 gid=[existsgroup nofiles] realname=Qmail-log-user home=${prefix}/var/qmail shell=/usr/bin/true adduser qmailp uid=7793 gid=[existsgroup nofiles] realname=Qmail-password-user home=${prefix}/var/qmail shell=/usr/bin/true adduser qmailq uid=7794 gid=[existsgroup qmail] realname=Qmail-queue-user home=${prefix}/var/qmail shell=/usr/bin/true adduser qmailr uid=7795 gid=[existsgroup qmail] realname=Qmail-remote-user home=${prefix}/var/qmail shell=/usr/bin/true adduser qmails uid=7796 gid=[existsgroup qmail] realname=Qmail-send-user home=${prefix}/var/qmail shell=/usr/bin/true } pre-destroot { # A whole lot of keepdirs, Qmail creates lots of required, empty directories destroot.keepdirs \ ${destroot}${prefix}/var/log/qmail/smtpd \ ${destroot}${prefix}/var/qmail/control \ ${destroot}${prefix}/var/qmail/users \ ${destroot}${prefix}/var/qmail/queue/pid \ ${destroot}${prefix}/var/qmail/queue/bounce if {![variant_isset bigtodo]} { destroot.keepdirs-append \ ${destroot}${prefix}/var/qmail/queue/todo \ ${destroot}${prefix}/var/qmail/queue/intd } for {set i 0} {$i <= 22} {incr i} { destroot.keepdirs-append \ ${destroot}${prefix}/var/qmail/queue/info/${i} \ ${destroot}${prefix}/var/qmail/queue/remote/${i} \ ${destroot}${prefix}/var/qmail/queue/local/${i} \ ${destroot}${prefix}/var/qmail/queue/mess/${i} if {[variant_isset bigtodo]} { destroot.keepdirs-append \ ${destroot}${prefix}/var/qmail/queue/todo/${i} \ ${destroot}${prefix}/var/qmail/queue/intd/${i} } } } post-destroot { # Minimal requirements per Qmail install doc touch ${destroot}${prefix}/var/qmail/alias/.qmail-postmaster touch ${destroot}${prefix}/var/qmail/alias/.qmail-mailer-daemon touch ${destroot}${prefix}/var/qmail/alias/.qmail-root # Create the log directories xinstall -d -o qmaill ${destroot}${prefix}/var/log/qmail/smtpd # Copy example files xinstall -d ${destroot}${prefix}/var/qmail/samples xinstall -m 644 -W ${filespath} README.txt ${destroot}${prefix}/var/qmail/samples foreach file {run qmailctl qmail-send-run qmail-send-log-run qmail-smtpd-run qmail-smtpd-log-run} { xinstall -W ${filespath} ${file}.in ${destroot}${prefix}/var/qmail/samples/${file} reinplace "s%@PREFIX@%${prefix}%g" ${destroot}${prefix}/var/qmail/samples/${file} } # Additional Spamcontrol files xinstall -d ${destroot}${prefix}/var/qmail/scripts xinstall -W ${worksrcpath} \ qmail-alias2recipients \ qmail-users2recipients \ qmail-pwd2recipients \ qmail-vpopmail2recipients \ ${destroot}${prefix}/var/qmail/scripts xinstall -m 644 -W ${worksrcpath} \ conf-spamcontrol \ ucspi-ssl-0.70_ucspitls-0.4.patch_ \ clamav-0.90.1_output.patch_ \ Makefile.djbdns \ badmailfrom \ badmimetypes \ badloadertypes \ badrcptto \ tarpitcount \ README_spamcontrol.html \ README.wildmat \ README.moreipme \ README.bigtodo \ README.qmailqueue \ README.bouncemaxbytes \ README.doublebouncetrim \ README.recipients \ README.djbdns \ INSTALL.spamcontrol \ HISTORY.spamcontrol \ FILES.spamcontrol \ LICENSE.spamcontrol \ TODO.spamcontrol \ RELEASE_22.spamcontrol \ RELEASE_23.spamcontrol \ RELEASE_24.spamcontrol \ LOGGING.spamcontrol \ SMTPREPLY.spamcontrol \ README.mav \ PROPOSAL.mav \ README.clamav \ ${destroot}${prefix}/var/qmail/doc xinstall -W ${worksrcpath} \ install_spamcontrol.sh \ ${destroot}${prefix}/var/qmail/doc # User must run this xinstall -W ${worksrcpath} config-fast ${destroot}${prefix}/var/qmail/scripts/config-fast # Per Qmail install doc xinstall ${destroot}${prefix}/var/qmail/boot/home ${destroot}${prefix}/var/qmail/rc } post-install { ui_msg "\n To control qmail, the daemontools and ucspi-tcp ports are highly recommended. A good reference for setting up qmail is http://www.lifewithqmail.org/ . This port includes some sample files based on the Life with Qmail web site. They can be found in ${prefix}/var/qmail/samples . Also look at http://www.fehcom.de/qmail/spamcontrol.html for further info. The fehcom site has docs for all the stuff added to the base qmail software. There are numerous configuration options to qmail. Please read all the docs! ****************************** For now, you must run ${prefix}/var/qmail/scripts/config-fast your.domain.name to set up some files for your mail server. your.domain.name should point to this machine you are installing qmail on. ****************************** \n" } post-activate { # Remove the turd files system "cd ${prefix}/var/qmail; find . -name .turd_${name} -delete" system "rm ${destroot}${prefix}/var/log/qmail/smtpd/.turd_${name}" } platform darwin 6 { pre-fetch { error "${name} requires Mac OS X 10.3 or newer." } } livecheck.check regex livecheck.regex {Version\s+([0-9.]+)<}