diff options
author | Sahil Tandon <sahil@FreeBSD.org> | 2010-07-30 03:39:18 +0000 |
---|---|---|
committer | Sahil Tandon <sahil@FreeBSD.org> | 2010-07-30 03:39:18 +0000 |
commit | b38c6b674796c12084a0a0c0b2c11dfe26970919 (patch) | |
tree | 5af34d64c5210397d0b2224dc054764a9c6744b1 /mail/postfix-current | |
parent | 2e418d35484f3dda5d613c05610e5270517996c1 (diff) | |
download | ports-b38c6b674796c12084a0a0c0b2c11dfe26970919.tar.gz ports-b38c6b674796c12084a0a0c0b2c11dfe26970919.zip |
Notes
Diffstat (limited to 'mail/postfix-current')
-rw-r--r-- | mail/postfix-current/Makefile | 211 | ||||
-rw-r--r-- | mail/postfix-current/distinfo | 6 | ||||
-rw-r--r-- | mail/postfix-current/files/patch-conf::main.cf | 80 | ||||
-rw-r--r-- | mail/postfix-current/files/patch-conf::post-install | 11 | ||||
-rw-r--r-- | mail/postfix-current/files/patch-makedefs | 10 | ||||
-rw-r--r-- | mail/postfix-current/files/patch-src::global::mail_params.h | 38 | ||||
-rw-r--r-- | mail/postfix-current/files/pkg-install.in | 158 | ||||
-rw-r--r-- | mail/postfix-current/files/pkg-message.in (renamed from mail/postfix-current/pkg-message) | 4 | ||||
-rw-r--r-- | mail/postfix-current/files/postfix.sh.in | 6 | ||||
-rw-r--r-- | mail/postfix-current/pkg-install | 167 | ||||
-rw-r--r-- | mail/postfix-current/pkg-plist | 56 |
11 files changed, 322 insertions, 425 deletions
diff --git a/mail/postfix-current/Makefile b/mail/postfix-current/Makefile index d157fe062af7..3ad8252b9024 100644 --- a/mail/postfix-current/Makefile +++ b/mail/postfix-current/Makefile @@ -1,12 +1,12 @@ # New ports collection makefile for: postfix-current -# Date created: 18 Mar 1999 -# Whom: torstenb +# Date created: 18 Mar 1999 +# Whom: torstenb # # $FreeBSD$ # PORTNAME= postfix -DISTVERSION= 2.8-20100323 +DISTVERSION= 2.8-20100707 PORTEPOCH= 4 CATEGORIES= mail ipv6 MASTER_SITES= ftp://ftp.porcupine.org/mirrors/postfix-release/experimental/ \ @@ -27,23 +27,37 @@ CONFLICTS= courier-0.* postfix-1.* postfix-2.* postfix-current-2.[0-79]* \ MAKE_JOBS_SAFE= yes USE_SUBMAKE= yes USE_PERL5_BUILD=yes -USE_RC_SUBR= postfix.sh +SCRIPTS_ENV+= POSTFIX_DEFAULT_MTA="${POSTFIX_DEFAULT_MTA}" + +# back compat pull in settings from POSTFIX_OPTIONS for convenience when +# make config is run (happens first time port is built, too) +.for o in SASL2 SASLKRB5 SASLKRB5MIT TLS BDB MySQL PgSQL OpenLDAP CDB NIS VDA Test +STATUS_${o}=off +.endfor +.if defined(POSTFIX_OPTIONS) +. for o in ${POSTFIX_OPTIONS} +STATUS_${o}=on +. endfor +.endif -OPTIONSFILE= ${PORT_DBDIR}/${PORTNAME}${PKGNAMESUFFIX}/options -OPTIONS= PCRE "Perl Compatible Regular Expressions" on \ - SASL2 "Cyrus SASLv2 (Simple Auth. and Sec. Layer)" off \ +OPTIONS= PCRE "Perl Compatible Regular Expressions" on \ + SASL2 "Cyrus SASLv2 (Simple Auth. and Sec. Layer)" ${STATUS_SASL2} \ DOVECOT "Dovecot SASL authentication method" off \ - SASLKRB "If your SASL req. Kerberos select this option" off \ - SASLKRB5 "If your SASL req. Kerberos5 select this option" off \ - SASLKMIT "If your SASL req. MIT Kerberos5 select this option" off \ - TLS "Enable SSL and TLS support" off \ - BDB "Berkeley DB (choose version with WITH_BDB_VER)" off \ - MYSQL "MySQL maps (choose version with WITH_MYSQL_VER)" off \ - PGSQL "PostgreSQL maps (choose with DEFAULT_PGSQL_VER)" off \ - OPENLDAP "OpenLDAP maps (choose ver. with WITH_OPENLDAP_VER)" off \ - CDB "CDB maps lookups" off \ - NIS "NIS maps lookups" off \ - TEST "SMTP/LMTP test server and generator" off + SASLKRB5 "If your SASL req. Kerberos5 select this option" ${STATUS_SASLKRB5} \ + SASLKMIT "If your SASL req. MIT Kerberos5 select this option" ${STATUS_SASLKRB5MIT} \ + TLS "Enable SSL and TLS support" ${STATUS_TLS} \ + BDB "Berkeley DB (choose version with WITH_BDB_VER)" ${STATUS_BDB} \ + MYSQL "MySQL maps (choose version with WITH_MYSQL_VER)" ${STATUS_MySQL} \ + PGSQL "PostgreSQL maps (choose with DEFAULT_PGSQL_VER)" ${STATUS_PgSQL} \ + SQLITE "SQLite maps" off \ + OPENLDAP "OpenLDAP maps (choose ver. with WITH_OPENLDAP_VER)" ${STATUS_OpenLDAP} \ + CDB "CDB maps lookups" ${STATUS_CDB} \ + NIS "NIS maps lookups" ${STATUS_NIS} \ + VDA "VDA (Virtual Delivery Agent 32Bit)" ${STATUS_VDA} \ + TEST "SMTP/LMTP test server and generator" ${STATUS_Test} \ + INST_BASE "Install into /usr and /etc/postfix" off + +.include <bsd.port.options.mk> MAN1= postalias.1 postcat.1 postconf.1 postdrop.1 postfix.1 postkick.1 \ postlock.1 postlog.1 postmap.1 postmulti.1 postqueue.1 postsuper.1 \ @@ -52,7 +66,7 @@ MAN1= postalias.1 postcat.1 postconf.1 postdrop.1 postfix.1 postkick.1 \ MAN5= access.5 aliases.5 bounce.5 canonical.5 cidr_table.5 generic.5 \ header_checks.5 ldap_table.5 master.5 mysql_table.5 nisplus_table.5 \ pcre_table.5 pgsql_table.5 postconf.5 postfix-wrapper.5 regexp_table.5 \ - relocated.5 tcp_table.5 transport.5 virtual.5 + relocated.5 sqlite_table.5 tcp_table.5 transport.5 virtual.5 MAN8= anvil.8 bounce.8 cleanup.8 discard.8 dnsblog.8 error.8 flush.8 local.8 master.8 \ oqmgr.8 pickup.8 pipe.8 postscreen.8 proxymap.8 qmgr.8 qmqpd.8 scache.8 showq.8 \ @@ -65,8 +79,8 @@ MLINKS= sendmail.1 mailq.1 \ bounce.8 trace.8 \ smtp.8 lmtp.8 -CONF1= access aliases canonical generic header_checks main.cf master.cf \ - relocated transport virtual +HTML1= body_checks.5.html bounce.5.html postfix-power.png \ + scache.8.html tlsmgr.8.html .if !defined(DEBUG) MAKEFILEFLAGS+= DEBUG= @@ -74,11 +88,19 @@ MAKEFILEFLAGS+= DEBUG= MAKEFILEFLAGS+= CC="${CC}" OPT="${CFLAGS}" -SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ - TOUCH="${TOUCH}" \ - MKDIR="${MKDIR}" - -.include <bsd.port.pre.mk> +POSTFIX_CCARGS+= -DDEF_CONFIG_DIR=\\\"${ETCDIR}\\\" \ + -DDEF_DAEMON_DIR=\\\"${DAEMONDIR}\\\" \ + -DDEF_COMMAND_DIR=\\\"${PREFIX}/sbin\\\" \ + -DDEF_SENDMAIL_PATH=\\\"${PREFIX}/sbin/sendmail\\\" \ + -DDEF_NEWALIAS_PATH=\\\"${PREFIX}/bin/newaliases\\\" \ + -DDEF_MAILQ_PATH=\\\"${PREFIX}/bin/mailq\\\" \ + -DDEF_MANPAGE_DIR=\\\"${MANPREFIX}/man\\\" \ + -DDEF_README_DIR=\\\"${READMEDIR}\\\" \ + -DDEF_HTML_DIR=\\\"${READMEDIR}\\\" \ + -DDEF_QUEUE_DIR=\\\"/var/spool/postfix\\\" \ + -DDEF_DATA_DIR=\\\"/var/db/postfix\\\" \ + -DDEF_MAIL_OWNER=\\\"postfix\\\" \ + -DDEF_SGID_GROUP=\\\"maildrop\\\" \ # Default requirement for postfix rc script _REQUIRE= LOGIN cleanvar @@ -100,17 +122,11 @@ POSTFIX_AUXLIBS+= -L${LOCALBASE}/lib -lsasl2 -lpam -lcrypt .if defined(WITH_DOVECOT) RUN_DEPENDS+= dovecot:${PORTSDIR}/mail/dovecot POSTFIX_CCARGS+= -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\" -.endif - -.if defined(WITH_SASLKRB) -.if defined(WITH_SASLKRB5) || defined(WITH_SASLKMIT) -BROKEN= Select only one SASL Kerberos option -.endif -POSTFIX_AUXLIBS+= -lkrb -lcrypto -lcom_err +_REQUIRE+= dovecot .endif .if defined(WITH_SASLKRB5) -.if defined(WITH_SASLKRB) || defined(WITH_SASLKMIT) +.if defined(WITH_SASLKMIT) BROKEN= Select only one SASL Kerberos option .endif .if ${OSVERSION} >= 800037 @@ -120,7 +136,7 @@ POSTFIX_AUXLIBS+= -lkrb5 ${KRB5_EXTR} -lcrypto -lcrypt -lcom_err -lasn1 -lroken .endif .if defined(WITH_SASLKMIT) -.if defined(WITH_SASLKRB) || defined(WITH_SASLKRB5) +.if defined(WITH_SASLKRB5) BROKEN= Select only one SASL Kerberos option .endif LIB_DEPENDS+= krb5.3:${PORTSDIR}/security/krb5 @@ -153,6 +169,12 @@ POSTFIX_AUXLIBS+= -L${LOCALBASE}/lib -L${LOCALBASE}/pgsql/lib -lpq -lcrypt _REQUIRE+= postgresql .endif +.if defined(WITH_SQLITE) +USE_SQLITE= yes +POSTFIX_CCARGS+= -DHAS_SQLITE -I${LOCALBASE}/include +POSTFIX_AUXLIBS+= -L${LOCALBASE}/lib -lsqlite3 +.endif + .if defined(WITH_OPENLDAP) USE_OPENLDAP= yes .if defined(WITH_OPENLDAP_VER) @@ -174,24 +196,75 @@ POSTFIX_CCARGS+= -DHAS_NIS _REQUIRE+= ypserv .endif +.if defined(WITH_VDA) +BROKEN= At the moment there is no VDA patch for ${PORTNAME}-${DISTVERSION} available +.endif + .if defined(WITH_TEST) BINTEST= qmqp-sink qmqp-source smtp-sink smtp-source MANTEST= qmqp-sink.1 qmqp-source.1 smtp-sink.1 smtp-source.1 MAN1+= ${MANTEST} -PLIST_SUB+= SUB_TEST="" +PLIST_SUB+= TEST="" .else -PLIST_SUB+= SUB_TEST="@comment " +PLIST_SUB+= TEST="@comment " .endif +.if defined(WITH_INST_BASE) +PKGNAMESUFFIX= -base +PREFIX= /usr +ETCDIR= /etc/postfix +USE_RCORDER= postfix.sh +PLIST_SUB+= BASE="" +.else +USE_RC_SUBR= postfix.sh +PLIST_SUB+= BASE="@comment " +.endif + +PLIST_SUB+= PFETC=${ETCDIR} + .if defined(NOPORTDOCS) -READMEDIR=no +READMEDIR= no .else -READMEDIR=${PREFIX}/share/doc/postfix +READMEDIR= ${DOCSDIR} .endif -SUB_LIST+= REQUIRE="${_REQUIRE}" +DAEMONDIR= ${PREFIX}/libexec/postfix + +SUB_LIST+= REQUIRE="${_REQUIRE}" READMEDIR="${READMEDIR}" DAEMONDIR="${DAEMONDIR}" +SUB_FILES+= pkg-install pkg-message + +# sed script for files in ${WRKSRC}/README_FILES ${WRKSRC}/conf ${WRKSRC}/man +REINPLACE= s!^PATH=.*!PATH=/bin:/sbin:/usr/bin:/usr/sbin:${PREFIX}/bin:${PREFIX}/sbin!;\ + s!(_directory = )/usr/!\1${PREFIX}/!g;\ + s!^(data_directory = /var/)lib/!\1db/!g;\ + s!^\#(mynetworks_style = host)!\1!g;\ + s!^(sendmail_path =)!\1 ${PREFIX}/sbin/sendmail!g;\ + s!^(newaliases_path =)!\1 ${PREFIX}/bin/newaliases!g;\ + s!^(mailq_path =)!\1 ${PREFIX}/bin/mailq!g;\ + s!^(setgid_group =)!\1 maildrop!g;\ + s!^(manpage_directory =)!\1 ${MANPREFIX}/man!g;\ + s!^((html|readme)_directory =)!\1 ${READMEDIR}!g;\ + \!^\#alias_database = dbm:/etc/mail/aliases$$!d;\ + s!(:|= )/etc/postfix!\1$$config_directory!g;\ + s!/etc/postfix!${ETCDIR}!g;\ + s!^(sample_directory =)!\1 ${ETCDIR}!g;\ + s!($config_directory/(access|aliases|canonical|generic|header_checks|relocated|transport|virtual):f:root:-:644:)p1!\1o!; pre-patch: +.if defined(POSTFIX_OPTIONS) + @${ECHO_MSG} + @${ECHO_MSG} + @${ECHO_MSG} + @${ECHO_MSG} "***** ALERT *****" + @${ECHO_MSG} "POSTFIX_OPTIONS is no longer supported," + @${ECHO_MSG} "${PORTNAME} uses options, consider running" + @${ECHO_MSG} "# make config" + @${ECHO_MSG} + @${ECHO_MSG} + @${ECHO_MSG} + @sleep 10 +.endif + .if defined(WITH_SASL2) && !defined(WITH_MYSQL) && exists(${LOCALBASE}/lib/libsasl2.a) @if /usr/bin/nm ${LOCALBASE}/lib/libsasl2.a | ${GREP} -wq "mysql_init"; then \ ${ECHO_MSG}; \ @@ -204,20 +277,21 @@ pre-patch: fi .endif - @${ECHO} "<HTML><BODY>See <A HREF="header_checks.5.html">header_checks.5.html</A></BODY></HTML>" \ + @${ECHO} '<HTML><BODY>See <A HREF="header_checks.5.html">header_checks.5.html</A></BODY></HTML>' \ > ${WRKSRC}/html/body_checks.5.html - @${FIND} -P ${WRKSRC}/man -type f | ${XARGS} \ - ${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" - @${FIND} -P ${WRKSRC}/README_FILES -type f | ${XARGS} \ - ${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" - @${FIND} -P ${WRKSRC}/conf -type f | ${XARGS} \ - ${REINPLACE_CMD} -e "s|/etc/postfix|${PREFIX}/etc/postfix|g" + @${REINPLACE_CMD} -E -e 's![[:<:]]perl[[:>:]]!${PERL}!' \ + ${WRKSRC}/src/bounce/Makefile.in + @${REINPLACE_CMD} -E -e 's!^(#define DEF_SGID_GROUP[^"]+)"postdrop"$$!\1"maildrop"!' \ + ${WRKSRC}/src/global/mail_params.h + @${FIND} -X ${WRKSRC}/README_FILES ${WRKSRC}/conf ${WRKSRC}/man \ + -type f -a ! \( -name INSTALL -o -name aliases \) | ${XARGS} \ + ${REINPLACE_CMD} -E -e '${REINPLACE}' post-patch: -# All files modified with ${FILESDIR}/patch-* to use !!PREFIX!! need REINPLACE. Put below. - @${REINPLACE_CMD} -e "s,!!PREFIX!!,${PREFIX},g" \ - ${WRKSRC}/conf/main.cf ${WRKSRC}/src/global/mail_params.h - @${REINPLACE_CMD} -e "s|perl|${PERL}|" ${WRKSRC}/src/bounce/Makefile.in +.for f in ${HTML1} + @${ECHO} '$$html_directory/$f:f:root:-:644' \ + >> ${WRKSRC}/conf/postfix-files +.endfor do-configure: (cd ${WRKSRC} && ${MAKE} -f Makefile.init makefiles ${MAKEFILEFLAGS} \ @@ -228,26 +302,13 @@ pre-su-install: @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL do-install: - cd ${WRKSRC}; ${SH} postfix-install -non-interactive install_root=/ tempdir=/tmp \ - config_directory=${PREFIX}/etc/postfix \ - data_directory=/var/db/postfix \ - daemon_directory=${PREFIX}/libexec/postfix \ - command_directory=${PREFIX}/sbin \ - queue_directory=/var/spool/postfix \ - sendmail_path=${PREFIX}/sbin/sendmail \ - newaliases_path=${PREFIX}/bin/newaliases \ - mailq_path=${PREFIX}/bin/mailq \ - mail_owner=postfix \ - setgid_group=maildrop \ - manpage_directory=${MANPREFIX}/man \ - sample_directory=${PREFIX}/etc/postfix \ + @cd ${WRKSRC} && ${SH} postfix-install -non-interactive install_root=/ tempdir=/tmp \ + daemon_directory=${DAEMONDIR} \ + html_directory=${READMEDIR} \ readme_directory=${READMEDIR} - ${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/rmail/rmail ${PREFIX}/bin/rmail - ${INSTALL_SCRIPT} ${WRKSRC}/auxiliary/qshape/qshape.pl ${PREFIX}/bin/qshape ${INSTALL_MAN} ${WRKSRC}/man/man1/qshape.1 ${MANPREFIX}/man/man1 - .for f in ${BINTEST} ${INSTALL_PROGRAM} ${WRKSRC}/bin/${f} ${PREFIX}/bin .endfor @@ -255,22 +316,10 @@ do-install: ${INSTALL_MAN} ${WRKSRC}/man/man1/${f} ${MANPREFIX}/man/man1 .endfor - @${MKDIR} ${PREFIX}/etc/postfix/dist -.for f in ${CONF1} - ${INSTALL_DATA} ${WRKSRC}/conf/${f} ${PREFIX}/etc/postfix/dist -.endfor - -.if !defined(NOPORTDOCS) - ${INSTALL} -d -o ${DOCOWN} -g ${DOCGRP} -m 555 ${DOCSDIR} - @cd ${WRKSRC}/html && ${INSTALL_DATA} *.html *.jpg *.png ${DOCSDIR} && \ - ${ECHO_MSG} "Installed HTML documentation in ${DOCSDIR}" -.endif - post-install: @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL # Fix compressed man pages - @${REINPLACE_CMD} -E -e "s|(man[158]/.*.[158]):|\1.gz:|g" ${PREFIX}/libexec/postfix/postfix-files - @${RM} -f ${PREFIX}/libexec/postfix/postfix-files.bak + @${REINPLACE_CMD} -i '' -E -e "s|(man[158]/.*.[158]):|\1.gz:|g" ${DAEMONDIR}/postfix-files @${CAT} ${PKGMESSAGE} -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/mail/postfix-current/distinfo b/mail/postfix-current/distinfo index 3873bccec714..bfbb50080fa2 100644 --- a/mail/postfix-current/distinfo +++ b/mail/postfix-current/distinfo @@ -1,3 +1,3 @@ -MD5 (postfix/postfix-2.8-20100323.tar.gz) = 5bbe7c726f48b1096638dfaf201ae637 -SHA256 (postfix/postfix-2.8-20100323.tar.gz) = 49327f23e36e0ddcaef1e7253cab1b96e5daa96db72ff19e07daaf8e09c86e46 -SIZE (postfix/postfix-2.8-20100323.tar.gz) = 3446878 +MD5 (postfix/postfix-2.8-20100707.tar.gz) = 694ed73c39a81355e1ef92c9fb11b47c +SHA256 (postfix/postfix-2.8-20100707.tar.gz) = 05ab6c9f51e0bb685d00bfdbe2c019cf7126f6a2a3a5a0bfd9c275f6ab43fe2b +SIZE (postfix/postfix-2.8-20100707.tar.gz) = 3474450 diff --git a/mail/postfix-current/files/patch-conf::main.cf b/mail/postfix-current/files/patch-conf::main.cf deleted file mode 100644 index 14976bcaa09c..000000000000 --- a/mail/postfix-current/files/patch-conf::main.cf +++ /dev/null @@ -1,80 +0,0 @@ ---- conf/main.cf.orig 2007-12-18 11:50:25.000000000 -0200 -+++ conf/main.cf 2008-02-29 22:35:12.000000000 -0300 -@@ -33,19 +33,19 @@ - # The command_directory parameter specifies the location of all - # postXXX commands. - # --command_directory = /usr/sbin -+command_directory = !!PREFIX!!/sbin - - # The daemon_directory parameter specifies the location of all Postfix - # daemon programs (i.e. programs listed in the master.cf file). This - # directory must be owned by root. - # --daemon_directory = /usr/libexec/postfix -+daemon_directory = !!PREFIX!!/libexec/postfix - - # The data_directory parameter specifies the location of Postfix-writable - # data files (caches, random numbers). This directory must be owned - # by the mail_owner account (see below). - # --data_directory = /var/lib/postfix -+data_directory = /var/db/postfix - - # QUEUE AND PROCESS OWNERSHIP - # -@@ -244,7 +244,7 @@ - # - #mynetworks_style = class - #mynetworks_style = subnet --#mynetworks_style = host -+mynetworks_style = host - - # Alternatively, you can specify the mynetworks list by hand, in - # which case Postfix ignores the mynetworks_style setting. -@@ -615,37 +615,37 @@ - # sendmail_path: The full pathname of the Postfix sendmail command. - # This is the Sendmail-compatible mail posting interface. - # --sendmail_path = -+sendmail_path = !!PREFIX!!/sbin/sendmail - - # newaliases_path: The full pathname of the Postfix newaliases command. - # This is the Sendmail-compatible command to build alias databases. - # --newaliases_path = -+newaliases_path = !!PREFIX!!/bin/newaliases - - # mailq_path: The full pathname of the Postfix mailq command. This - # is the Sendmail-compatible mail queue listing command. - # --mailq_path = -+mailq_path = !!PREFIX!!/bin/mailq - - # setgid_group: The group for mail submission and queue management - # commands. This must be a group name with a numerical group ID that - # is not shared with other accounts, not even with the Postfix account. - # --setgid_group = -+setgid_group = maildrop - - # html_directory: The location of the Postfix HTML documentation. - # --html_directory = -+html_directory = no - - # manpage_directory: The location of the Postfix on-line manual pages. - # --manpage_directory = -+manpage_directory = !!PREFIX!!/man - - # sample_directory: The location of the Postfix sample configuration files. - # This parameter is obsolete as of Postfix 2.1. - # --sample_directory = -+sample_directory = !!PREFIX!!/etc/postfix - - # readme_directory: The location of the Postfix README files. - # --readme_directory = -+readme_directory = no diff --git a/mail/postfix-current/files/patch-conf::post-install b/mail/postfix-current/files/patch-conf::post-install deleted file mode 100644 index 78401de5bdf3..000000000000 --- a/mail/postfix-current/files/patch-conf::post-install +++ /dev/null @@ -1,11 +0,0 @@ ---- conf/post-install.orig Thu Feb 24 08:06:08 2005 -+++ conf/post-install Sat Mar 5 11:53:42 2005 -@@ -185,7 +185,7 @@ - - umask 022 - --PATH=/bin:/usr/bin:/usr/sbin:/usr/etc:/sbin:/etc:/usr/contrib/bin:/usr/gnu/bin:/usr/ucb:/usr/bsd -+PATH=/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin - SHELL=/bin/sh - IFS=" - " diff --git a/mail/postfix-current/files/patch-makedefs b/mail/postfix-current/files/patch-makedefs index 2c6f01dc0379..142224ad1331 100644 --- a/mail/postfix-current/files/patch-makedefs +++ b/mail/postfix-current/files/patch-makedefs @@ -1,11 +1,9 @@ ---- makedefs.orig 2009-05-11 18:26:46.000000000 -0300 -+++ makedefs 2009-09-15 10:27:12.000000000 -0300 -@@ -144,6 +144,10 @@ +--- makedefs.orig 2010-07-27 19:35:56.000000000 -0400 ++++ makedefs 2010-07-27 19:36:28.000000000 -0400 +@@ -146,6 +146,8 @@ ;; - FreeBSD.7*) SYSTYPE=FREEBSD7 + FreeBSD.8*) SYSTYPE=FREEBSD8 ;; -+ FreeBSD.8*) SYSTYPE=FREEBSD8 -+ ;; + FreeBSD.9*) SYSTYPE=FREEBSD9 + ;; OpenBSD.2*) SYSTYPE=OPENBSD2 diff --git a/mail/postfix-current/files/patch-src::global::mail_params.h b/mail/postfix-current/files/patch-src::global::mail_params.h deleted file mode 100644 index 0452e1abe3c7..000000000000 --- a/mail/postfix-current/files/patch-src::global::mail_params.h +++ /dev/null @@ -1,38 +0,0 @@ ---- src/global/mail_params.h.orig 2008-04-28 20:47:26.000000000 -0300 -+++ src/global/mail_params.h 2008-07-20 20:21:07.000000000 -0300 -@@ -67,7 +67,7 @@ - extern gid_t var_owner_gid; - - #define VAR_SGID_GROUP "setgid_group" --#define DEF_SGID_GROUP "postdrop" -+#define DEF_SGID_GROUP "maildrop" - extern char *var_sgid_group; - extern gid_t var_sgid_gid; - -@@ -241,7 +241,7 @@ - */ - #define VAR_DAEMON_DIR "daemon_directory" - #ifndef DEF_DAEMON_DIR --#define DEF_DAEMON_DIR "/usr/libexec/postfix" -+#define DEF_DAEMON_DIR "!!PREFIX!!/libexec/postfix" - #endif - extern char *var_daemon_dir; - -@@ -265,7 +265,7 @@ - */ - #define VAR_DATA_DIR "data_directory" - #ifndef DEF_DATA_DIR --#define DEF_DATA_DIR "/var/lib/postfix" -+#define DEF_DATA_DIR "/var/db/postfix" - #endif - extern char *var_data_dir; - -@@ -279,7 +279,7 @@ - */ - #define VAR_CONFIG_DIR "config_directory" - #ifndef DEF_CONFIG_DIR --#define DEF_CONFIG_DIR "/etc/postfix" -+#define DEF_CONFIG_DIR "!!PREFIX!!/etc/postfix" - #endif - extern char *var_config_dir; - diff --git a/mail/postfix-current/files/pkg-install.in b/mail/postfix-current/files/pkg-install.in new file mode 100644 index 000000000000..3e90b486cb71 --- /dev/null +++ b/mail/postfix-current/files/pkg-install.in @@ -0,0 +1,158 @@ +#!/bin/sh +# +# $FreeBSD: /tmp/pcvs/ports/mail/postfix-current/files/pkg-install.in,v 1.1 2010-07-30 03:39:18 sahil Exp $ +# + +# If the POSTFIX_DEFAULT_MTA environment variable is set to YES, it +# will make the port/package use defaults which make postfix replace +# sendmail as much as possible. + +PREFIX=${PKG_PREFIX:=%%PREFIX%%} +ETCDIR=${ETCDIR:=%%ETCDIR%%} +DAEMONDIR=${DAEMONDIR:=%%DAEMONDIR%%} +READMEDIR=${READMEDIR:=%%READMEDIR%%} +BATCH=${BATCH:=no} +POSTFIX_DEFAULT_MTA=${POSTFIX_DEFAULT_MTA:=no} + +if [ "${POSTFIX_DEFAULT_MTA}" = "no" ]; then + DEFAULT_REPLACE_MAILERCONF=n +else + DEFAULT_REPLACE_MAILERCONF=y +fi + +if [ -x /usr/sbin/nologin ]; then + NOLOGIN=/usr/sbin/nologin +else + NOLOGIN=/sbin/nologin +fi + +ask() { + local question default answer + + question=$1 + default=$2 + if [ -z "${PACKAGE_BUILDING}" -a "${BATCH}" = "no" ]; then + read -p "${question} [${default}]? " answer + fi + if [ -z "${answer}" ]; then + answer=${default} + fi + echo ${answer} +} + +yesno() { + local question default answer + + question=$1 + default=$2 + while :; do + answer=$(ask "${question}" "${default}") + case "${answer}" in + [Yy]*) return 0;; + [Nn]*) return 1;; + esac + echo "Please answer yes or no." + done +} + +if [ "$2" = "PRE-INSTALL" ]; then + USER=postfix + UID=125 + GROUP=postfix + GID=125 + GROUP2=maildrop + GID2=126 + + if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then + echo "You already have a group \"${GROUP}\", so I will use it." + else + if /usr/sbin/pw groupadd ${GROUP} -g ${GID}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + echo "Please create it, and try again." + exit 1 + fi + fi + + if /usr/sbin/pw groupshow "${GROUP2}" 2>/dev/null; then + echo "You already have a group \"${GROUP2}\", so I will use it." + else + if /usr/sbin/pw groupadd ${GROUP2} -g ${GID2}; then + echo "Added group \"${GROUP2}\"." + else + echo "Adding group \"${GROUP2}\" failed..." + echo "Please create it, and try again." + exit 1 + fi + fi + + if /usr/sbin/pw user show "${USER}" 2>/dev/null; then + echo "You already have a user \"${USER}\", so I will use it." + else + if /usr/sbin/pw useradd ${USER} -u ${UID} -g ${GROUP} -h - -d /var/spool/postfix -s ${NOLOGIN} -c "Postfix Mail System"; then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + echo "Please create it, and try again." + exit 1 + fi + fi + + if /usr/sbin/pw show group mail | grep -q "${USER}" 2>/dev/null; then + echo "You already have user \"${USER}\" in group \"mail\", so I will use it." + else + echo "You need user \"${USER}\" added to group \"mail\"." + if yesno "Would you like me to add it" y; then + /usr/sbin/pw groupmod mail -m ${USER} || exit + echo "Done." + else + echo "Please create it, and try again." + exit 1 + fi + fi +fi + +if [ "$2" = "POST-INSTALL" ]; then + SAMPLES="main.cf master.cf" + for file in $SAMPLES + do + if [ ! -f ${ETCDIR}/$file ]; then + cp ${DAEMONDIR}/$file ${ETCDIR}/ + fi + done + + /bin/sh ${DAEMONDIR}/post-install tempdir=/tmp \ + daemon_directory=${DAEMONDIR} \ + html_directory=${READMEDIR} \ + readme_directory=${READMEDIR} \ + upgrade-package +fi + +replace() { + local orig repl + + orig=$1 + repl=$2 + if [ -e ${orig} ]; then + /bin/mv -f ${orig} ${orig}.OFF + /bin/chmod 0 ${orig}.OFF + fi + if [ -e ${repl} ]; then + /bin/ln -s ${repl} ${orig} + fi +} + +if [ "$2" = "POST-INSTALL" -a -z "${PACKAGE_BUILDING}" ]; then + if yesno "Would you like to activate Postfix in /etc/mail/mailer.conf" ${DEFAULT_REPLACE_MAILERCONF}; then + /bin/mv -f /etc/mail/mailer.conf /etc/mail/mailer.conf.old + echo "#" > /etc/mail/mailer.conf + echo -n "# Execute the Postfix sendmail program" >> /etc/mail/mailer.conf + echo ", named ${PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf + echo "#" >> /etc/mail/mailer.conf + echo "sendmail ${PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf + echo "send-mail ${PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf + echo "mailq ${PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf + echo "newaliases ${PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf + fi +fi diff --git a/mail/postfix-current/pkg-message b/mail/postfix-current/files/pkg-message.in index 3b23f15a2cac..9b21a7f7a5ec 100644 --- a/mail/postfix-current/pkg-message +++ b/mail/postfix-current/files/pkg-message.in @@ -16,9 +16,11 @@ daily_status_mail_rejects_enable="NO" daily_status_include_submit_mailq="NO" daily_submit_queuerun="NO" +If /etc/periodic.conf does not exist please create it and add those values. + If you are using SASL, you need to make sure that postfix has access to read the sasldb file. This is accomplished by adding postfix to group mail and -making the /usr/local/etc/sasldb* file(s) readable by group mail (this should +making the %%PREFIX%%/etc/sasldb* file(s) readable by group mail (this should be the default for new installs). If you are upgrading from postfix version prior to 2.0, please see the README diff --git a/mail/postfix-current/files/postfix.sh.in b/mail/postfix-current/files/postfix.sh.in index 44aa542f07a8..849e6c1f9bd6 100644 --- a/mail/postfix-current/files/postfix.sh.in +++ b/mail/postfix-current/files/postfix.sh.in @@ -25,9 +25,9 @@ rcvar=${name}_enable load_rc_config $name -: ${postfix_enable="NO"} -: ${postfix_pidfile="/var/spool/postfix/pid/master.pid"} -: ${postfix_procname="%%PREFIX%%/libexec/postfix/master"} +: ${postfix_enable:="NO"} +: ${postfix_pidfile:="/var/spool/postfix/pid/master.pid"} +: ${postfix_procname:="%%PREFIX%%/libexec/postfix/master"} start_cmd=${name}_start stop_cmd=${name}_stop diff --git a/mail/postfix-current/pkg-install b/mail/postfix-current/pkg-install deleted file mode 100644 index 52e768d500cd..000000000000 --- a/mail/postfix-current/pkg-install +++ /dev/null @@ -1,167 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# If the POSTFIX_DEFAULT_MTA environment variable is set to YES, it -# will make the port/package use defaults which make postfix replace -# sendmail as much as possible. - -PKG_PREFIX=${PKG_PREFIX:=/usr/local} -BATCH=${BATCH:=no} -POSTFIX_DEFAULT_MTA=${POSTFIX_DEFAULT_MTA:=no} - -if [ x${POSTFIX_DEFAULT_MTA} = xno ]; then - DEFAULT_REPLACE_MAILERCONF=n -else - DEFAULT_REPLACE_MAILERCONF=y -fi - -if [ -x /usr/sbin/nologin ]; then - NOLOGIN=/usr/sbin/nologin -else - NOLOGIN=/sbin/nologin -fi - -ask() { - local question default answer - - question=$1 - default=$2 - if [ -z "${PACKAGE_BUILDING}" -a x${BATCH} = xno ]; then - read -p "${question} [${default}]? " answer - fi - if [ x${answer} = x ]; then - answer=${default} - fi - echo ${answer} -} - -yesno() { - local question default answer - - question=$1 - default=$2 - while :; do - answer=$(ask "${question}" "${default}") - case "${answer}" in - [Yy]*) return 0;; - [Nn]*) return 1;; - esac - echo "Please answer yes or no." - done -} - -if [ x"$2" = xPRE-INSTALL ]; then - USER=postfix - UID=125 - GROUP=postfix - GID=125 - GROUP2=maildrop - GID2=126 - - if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." - else - if /usr/sbin/pw groupadd ${GROUP} -g ${GID}; then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - echo "Please create it, and try again." - exit 1 - fi - fi - - if /usr/sbin/pw groupshow "${GROUP2}" 2>/dev/null; then - echo "You already have a group \"${GROUP2}\", so I will use it." - else - if /usr/sbin/pw groupadd ${GROUP2} -g ${GID2}; then - echo "Added group \"${GROUP2}\"." - else - echo "Adding group \"${GROUP2}\" failed..." - echo "Please create it, and try again." - exit 1 - fi - fi - - if /usr/sbin/pw user show "${USER}" 2>/dev/null; then - echo "You already have a user \"${USER}\", so I will use it." - else - if /usr/sbin/pw useradd ${USER} -u ${UID} -g ${GROUP} -h - -d /var/spool/postfix -s ${NOLOGIN} -c "Postfix Mail System"; then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - echo "Please create it, and try again." - exit 1 - fi - fi - - if /usr/sbin/pw show group mail | grep -q "${USER}" 2>/dev/null; then - echo "You already have user \"${USER}\" in group \"mail\", so I will use it." - else - echo "You need user \"${USER}\" added to group \"mail\"." - if yesno "Would you like me to add it" y; then - /usr/sbin/pw groupmod mail -m ${USER} || exit - echo "Done." - else - echo "Please create it, and try again." - exit 1 - fi - fi -fi - -if [ x"$2" = xPOST-INSTALL ]; then - if [ -d ${PKG_PREFIX}/etc/postfix/dist ]; then - for file in ${PKG_PREFIX}/etc/postfix/dist/*; do - if [ ! -f ${PKG_PREFIX}/etc/postfix/${file#${PKG_PREFIX}/etc/postfix/dist} ]; then - cp $file ${PKG_PREFIX}/etc/postfix/ - fi - done - fi - - /bin/sh ${PKG_PREFIX}/libexec/postfix/post-install tempdir=/tmp \ - config_directory=${PKG_PREFIX}/etc/postfix \ - data_directory=/var/db/postfix \ - daemon_directory=${PKG_PREFIX}/libexec/postfix \ - command_directory=${PKG_PREFIX}/sbin \ - queue_directory=/var/spool/postfix \ - sendmail_path=${PKG_PREFIX}/sbin/sendmail \ - newaliases_path=${PKG_PREFIX}/bin/newaliases \ - mailq_path=${PKG_PREFIX}/bin/mailq \ - mail_owner=postfix \ - setgid_group=maildrop \ - manpage_directory=${PKG_PREFIX}/man \ - sample_directory=${PKG_PREFIX}/etc/postfix \ - readme_directory=no \ - upgrade-package -fi -# readme_directory is "no" above since the package will have correct perms -# already, and we don't know if they had PORTDOCS. - -replace() { - local orig repl - - orig=$1 - repl=$2 - if [ -e ${orig} ]; then - /bin/mv -f ${orig} ${orig}.OFF - /bin/chmod 0 ${orig}.OFF - fi - if [ -e ${repl} ]; then - /bin/ln -s ${repl} ${orig} - fi -} - -if [ x"$2" = xPOST-INSTALL -a -z "${PACKAGE_BUILDING}" ]; then - if yesno "Would you like to activate Postfix in /etc/mail/mailer.conf" ${DEFAULT_REPLACE_MAILERCONF}; then - /bin/mv -f /etc/mail/mailer.conf /etc/mail/mailer.conf.old - echo "#" > /etc/mail/mailer.conf - echo -n "# Execute the Postfix sendmail program" >> /etc/mail/mailer.conf - echo ", named ${PKG_PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf - echo "#" >> /etc/mail/mailer.conf - echo "sendmail ${PKG_PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf - echo "send-mail ${PKG_PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf - echo "mailq ${PKG_PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf - echo "newaliases ${PKG_PREFIX}/sbin/sendmail" >> /etc/mail/mailer.conf - fi -fi diff --git a/mail/postfix-current/pkg-plist b/mail/postfix-current/pkg-plist index ac86ecbf51f3..ff82e844d458 100644 --- a/mail/postfix-current/pkg-plist +++ b/mail/postfix-current/pkg-plist @@ -1,28 +1,5 @@ -@unexec if cmp -s %D/etc/postfix/main.cf %D/etc/postfix/dist/main.cf; then rm -f %D/etc/postfix/main.cf; fi -@unexec if cmp -s %D/etc/postfix/master.cf %D/etc/postfix/dist/master.cf; then rm -f %D/etc/postfix/master.cf; fi -@unexec if cmp -s %D/etc/postfix/access %D/etc/postfix/dist/access; then rm -f %D/etc/postfix/access; fi -@unexec if cmp -s %D/etc/postfix/aliases %D/etc/postfix/dist/aliases; then rm -f %D/etc/postfix/aliases; fi -@unexec if cmp -s %D/etc/postfix/canonical %D/etc/postfix/dist/canonical; then rm -f %D/etc/postfix/canonical; fi -@unexec if cmp -s %D/etc/postfix/header_checks %D/etc/postfix/dist/header_checks; then rm -f %D/etc/postfix/header_checks; fi -@unexec if cmp -s %D/etc/postfix/relocated %D/etc/postfix/dist/relocated; then rm -f %D/etc/postfix/relocated; fi -@unexec if cmp -s %D/etc/postfix/transport %D/etc/postfix/dist/transport; then rm -f %D/etc/postfix/transport; fi -@unexec if cmp -s %D/etc/postfix/virtual %D/etc/postfix/dist/virtual; then rm -f %D/etc/postfix/virtual; fi -@unexec if cmp -s %D/etc/postfix/generic %D/etc/postfix/dist/generic; then rm -f %D/etc/postfix/generic; fi -etc/postfix/LICENSE -etc/postfix/TLS_LICENSE -etc/postfix/bounce.cf.default -etc/postfix/main.cf.default -etc/postfix/makedefs.out -etc/postfix/dist/main.cf -etc/postfix/dist/master.cf -etc/postfix/dist/access -etc/postfix/dist/aliases -etc/postfix/dist/canonical -etc/postfix/dist/header_checks -etc/postfix/dist/relocated -etc/postfix/dist/transport -etc/postfix/dist/virtual -etc/postfix/dist/generic +@unexec if cmp -s %D/libexec/postfix/main.cf %%PFETC%%/main.cf; then rm -f %%PFETC%%/main.cf; fi +@unexec if cmp -s %D/libexec/postfix/master.cf %%PFETC%%/master.cf; then rm -f %%PFETC%%/master.cf; fi libexec/postfix/anvil libexec/postfix/bounce libexec/postfix/cleanup @@ -57,6 +34,15 @@ libexec/postfix/trivial-rewrite libexec/postfix/verify libexec/postfix/virtual libexec/postfix/tlsmgr +@dirrm libexec/postfix +bin/mailq +bin/newaliases +bin/qshape +bin/rmail +%%TEST%%bin/qmqp-sink +%%TEST%%bin/qmqp-source +%%TEST%%bin/smtp-sink +%%TEST%%bin/smtp-source sbin/postalias sbin/postcat sbin/postconf @@ -70,14 +56,6 @@ sbin/postmulti sbin/postqueue sbin/postsuper sbin/sendmail -%%SUB_TEST%%bin/qmqp-sink -%%SUB_TEST%%bin/qmqp-source -%%SUB_TEST%%bin/smtp-sink -%%SUB_TEST%%bin/smtp-source -bin/rmail -bin/qshape -bin/newaliases -bin/mailq %%PORTDOCS%%%%DOCSDIR%%/AAAREADME %%PORTDOCS%%%%DOCSDIR%%/ADDRESS_CLASS_README %%PORTDOCS%%%%DOCSDIR%%/ADDRESS_CLASS_README.html @@ -154,7 +132,10 @@ bin/mailq %%PORTDOCS%%%%DOCSDIR%%/SMTPD_POLICY_README.html %%PORTDOCS%%%%DOCSDIR%%/SMTPD_PROXY_README %%PORTDOCS%%%%DOCSDIR%%/SMTPD_PROXY_README.html +%%PORTDOCS%%%%DOCSDIR%%/SOHO_README %%PORTDOCS%%%%DOCSDIR%%/SOHO_README.html +%%PORTDOCS%%%%DOCSDIR%%/SQLITE_README +%%PORTDOCS%%%%DOCSDIR%%/SQLITE_README.html %%PORTDOCS%%%%DOCSDIR%%/STANDARD_CONFIGURATION_README %%PORTDOCS%%%%DOCSDIR%%/STANDARD_CONFIGURATION_README.html %%PORTDOCS%%%%DOCSDIR%%/STRESS_README @@ -238,6 +219,7 @@ bin/mailq %%PORTDOCS%%%%DOCSDIR%%/smtp.8.html %%PORTDOCS%%%%DOCSDIR%%/smtpd.8.html %%PORTDOCS%%%%DOCSDIR%%/spawn.8.html +%%PORTDOCS%%%%DOCSDIR%%/sqlite_table.5.html %%PORTDOCS%%%%DOCSDIR%%/tcp_table.5.html %%PORTDOCS%%%%DOCSDIR%%/trace.8.html %%PORTDOCS%%%%DOCSDIR%%/transport.5.html @@ -248,6 +230,10 @@ bin/mailq %%PORTDOCS%%%%DOCSDIR%%/tlsmgr.8.html %%PORTDOCS%%%%DOCSDIR%%/generic.5.html %%PORTDOCS%%@dirrm %%DOCSDIR%% -@dirrm libexec/postfix -@dirrm etc/postfix/dist +%%BASE%%@cwd / +etc/postfix/LICENSE +etc/postfix/TLS_LICENSE +etc/postfix/bounce.cf.default +etc/postfix/main.cf.default +etc/postfix/makedefs.out @dirrmtry etc/postfix |