Update of /cvsroot/fink/dists/10.3/unstable/main/finkinfo/net
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8976

Added Files:
        postfix.info postfix.patch 
Log Message:
Initial checkin

--- NEW FILE: postfix.patch ---
diff -ruN postfix-2.1.4.orig/conf/main.cf postfix-2.1.4/conf/main.cf
--- postfix-2.1.4.orig/conf/main.cf     Sun Jun  6 17:53:58 2004
+++ postfix-2.1.4/conf/main.cf  Sat Sep 11 21:45:44 2004
@@ -629,3 +629,18 @@
 # readme_directory: The location of the Postfix README files.
 #
 readme_directory =
+
+# THE FOLLOWING DEFAULTS ARE SET BY APPLE
+#
+# bind to localhost only
+#
+inet_interfaces = localhost
+
+# turn off relaying for local subnet
+#
+mynetworks_style = host
+
+# mydomain_fallback: optional domain to use if mydomain is not set and
+# myhostname is not fully qualified.  It is ignored if neither are true.
+#
+mydomain_fallback = localhost
diff -ruN postfix-2.1.4.orig/conf/post-install postfix-2.1.4/conf/post-install
--- postfix-2.1.4.orig/conf/post-install        Wed Apr 21 21:05:34 2004
+++ postfix-2.1.4/conf/post-install     Sat Sep 11 21:45:44 2004
@@ -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
[EMAIL 
PROTECTED]@/bin:@FINKPREFIX@/sbin:/bin:/usr/bin:/usr/sbin:/usr/etc:/sbin:/etc:/usr/contrib/bin:/usr/gnu/bin:/usr/ucb:/usr/bsd
 SHELL=/bin/sh
 IFS="  
 "
diff -ruN postfix-2.1.4.orig/makedefs postfix-2.1.4/makedefs
--- postfix-2.1.4.orig/makedefs Wed Apr 14 14:59:43 2004
+++ postfix-2.1.4/makedefs      Sat Sep 11 21:45:44 2004
@@ -268,7 +268,7 @@
                          SYSLIBS=-flat_namespace
                          ;;
                       *) AWK=awk
-                         SYSLIBS=-flat_namespace
+                         #SYSLIBS=-flat_namespace
                          CCARGS="$CCARGS -DBIND_8_COMPAT -DNO_NETINFO"
                          ;;
                esac
diff -ruN postfix-2.1.4.orig/mta-switch postfix-2.1.4/mta-switch
--- postfix-2.1.4.orig/mta-switch       Wed Dec 31 19:00:00 1969
+++ postfix-2.1.4/mta-switch    Sat Sep 11 21:45:45 2004
@@ -0,0 +1,128 @@
+#!/bin/sh
+
+# Moves /usr/sbin/sendmail out of the way for Fink Postfix install
+
+PREFIX="@FINKPREFIX@"
+
+function sendmailPointsToPostfix () {
+       if [ -L /usr/sbin/sendmail -a "`/bin/ls -l /usr/sbin/sendmail | sed -e 's|.* 
-> \(.*\)$|\1|'`x" == "${PREFIX}/sbin/sendmailx" ] ; then
+               return 0
+       else
+               return 1
+       fi
+}
+
+case "$1" in 
+       install|setup|enable|activate|start|postfix|fink)
+               echo -n 'Checking if we need to move /usr/sbin/sendmail out of the 
way... '
+               
+               if sendmailPointsToPostfix ; then
+                       echo 'no.'
+                       echo 'Fink Postfix is already in place.'
+               else
+                       echo 'yes.'
+                       
+                       if [ -f /usr/sbin/sendmail.old ] ; then
+                               echo -n '/usr/sbin/sendmail.old already exists. Would 
you like to overwrite it [yN]? '
+                               
+                               read ANS
+                               case "$ANS" in
+                                       y*|Y*)  rm -f /usr/sbin/sendmail.old || exit 1 
;;
+                                       *)              echo '/usr/sbin/sendmail.old 
in the way. Failed.' ; exit 1 ;;
+                               esac
+                       fi
+                       
+                       echo
+                       echo 'Backing up the old sendmail to /usr/sbin/sendmail.old.'
+                       mv /usr/sbin/sendmail /usr/sbin/sendmail.old || exit 1
+                       echo "Putting a link to Fink Postfix's sendmail in its place."
+                       ln -s "${PREFIX}/sbin/sendmail" /usr/sbin/sendmail || exit 1
+                       echo 'Succeeded.'
+                       echo
+                       
+                       if [ "x$2" == "x-n" ] ; then
+                               echo 'Leaving /etc/hostconfig intact.'
+                               exit;
+                       fi
+                       
+                       echo 'Now we will take a crack at /etc/hostconfig.'
+                       if grep '^[[:space:]]*MAILSERVER=-\(YES\|AUTOMATIC\)-' 
/etc/hostconfig > /dev/null ; then
+                               echo "Backing up /etc/hostconfig to 
/etc/hostconfig.old."
+                               echo 'Turning off the mail server in /etc/hosconfig.'
+                               perl -pi.old 
-e's,MAILSERVER=-(YES|AUTOMATIC)-,MAILSERVER=-NO-,' /etc/hostconfig || exit 1
+                               echo 'Succeeded.'
+                       else
+                               echo '/etc/hostconfig already has the mail server 
disabled.'
+                       fi
+               fi
+               ;;
+       
+       stop|remove|uninstall|delete|rm|disable|sendmail|apple)
+               echo -n 'Checking if /usr/sbin/sendmail points to Fink Postfix... '
+               
+               if sendmailPointsToPostfix ; then
+                       echo 'yes.'
+                       
+                       if [ ! -f /usr/sbin/sendmail.old ] ; then
+                               echo '/usr/sbin/sendmail.old does not exist; cannot 
restore sendmail.'
+                               exit 1;
+                       fi
+                       
+                       echo
+                       echo 'Replacing /usr/sbin/sendmail with sendmail.old'
+                       mv /usr/sbin/sendmail.old /usr/sbin/sendmail || exit 1
+                       echo 'Succeeded.'
+                       echo
+                       
+                       if [ "x$2" == "x-n" ] ; then
+                               echo 'Leaving /etc/hostconfig intact.'
+                               exit;
+                       fi
+                       
+                       echo 'Now we will take a crack at /etc/hostconfig.'
+                       if grep '^[[:space:]]*MAILSERVER=-\(YES\|AUTOMATIC\)-' 
/etc/hostconfig > /dev/null ; then
+                               echo 'Mail server is already enabled in 
/etc/hostconfig.'
+                       else
+                               echo "Backing up /etc/hostconfig to 
/etc/hostconfig.old."
+                               cp -p /etc/hostconfig /etc/hostconfig.old || exit 1
+                               
+                               if ! grep '^[[:space:]]*MAILSERVER=' /etc/hostconfig > 
/dev/null ; then
+                                       echo '/etc/hostconfig does not include a 
MAILSERVER= line.'
+                                       echo -n 'Would you like to add one[Yn]? '
+                                       
+                                       ANS='?';
+                                       while [ $ANS == '?' ] ; do
+                                               read ANS
+                                               case "$ANS" in
+                                                       y*|Y*)
+                                                               echo 
'MAILSERVER=-YES-' >> /etc/hostconfig || exit 1
+                                                       ;;
+                                                       
+                                                       n*|N*)
+                                                               echo 'Leaving 
/etc/hostconfig as it is, removing backup.'
+                                                               rm /etc/hostconfig.old 
|| exit 1
+                                                       ;;
+                                                       
+                                                       *)
+                                                               ANS='?'
+                                                       ;;
+                                               esac
+                                       done
+                               else
+                                       echo 'Turning on the mail server in 
/etc/hosconfig.'
+                                       perl -pi.old 
-e's,MAILSERVER=-NO-,MAILSERVER=-YES-,' /etc/hostconfig || exit 1
+                                       echo 'Succeeded.'
+                               fi
+                       fi
+               else
+                       echo 'no.'
+                       echo 'Not making any changes.'
+               fi
+               ;;
+       
+       *)      echo "mta-switch -- Switches between Fink's and Apple's Postfix."
+               echo 'usage: mta-switch {fink|apple} [-n]'
+               echo '    -n turns off modifcation of /etc/hostconfig'
+               exit 1
+               ;;
+esac
+
diff -ruN postfix-2.1.4.orig/src/util/sys_defs.h postfix-2.1.4/src/util/sys_defs.h
--- postfix-2.1.4.orig/src/util/sys_defs.h      Mon Jun 14 14:13:40 2004
+++ postfix-2.1.4/src/util/sys_defs.h   Sat Sep 11 21:45:45 2004
@@ -124,9 +124,9 @@
 #define HAS_DB
 #define HAS_SA_LEN
 #define DEF_DB_TYPE    "hash"
-#define ALIAS_DB_MAP   "hash:/etc/aliases"
+#define ALIAS_DB_MAP   "hash:@FINKPREFIX@/etc/postfix/aliases"
 #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
-#define ROOT_PATH      "/bin:/usr/bin:/sbin:/usr/sbin"
+#define ROOT_PATH      
"@FINKPREFIX@/bin:@FINKPREFIX@/sbin:/bin:/usr/bin:/sbin:/usr/sbin"
 #define USE_STATFS
 #define STATFS_IN_SYS_MOUNT_H
 #define HAS_POSIX_REGEXP

--- NEW FILE: postfix.info ---
Package: postfix
Version: 2.1.4
Revision: 1

Homepage: http://www.postfix.org/
Description: Mail transfer agent that's fast and secure
DescDetail: <<
Postfix is Wietse Venema's mailer that started life as an alternative to
the widely-used Sendmail program. Postfix attempts to be fast, easy to
administer, and secure, while at the same time being sendmail compatible
enough to not upset existing users. Thus, the outside has a sendmail-ish
flavor, but the inside is completely different. 

This package does not provide TLS encryption or SASL authentication.
Please see the postfix-tls package for these features.
<<
DescUsage: <<
You need to do a few things to set Postfix up before you can use it:

 1) Edit /sw/etc/postfix/main.cf. In particular, edit myorigin,
    mydestination and mynetworks in that file. The file is well commented.
    More configuration options are documented in postconf(5).
 
 2) Edit the aliases in /sw/etc/postfix/aliases so that mail to root,
    and your user, go to your real email address. Run 'sudo newaliases'
    to update the alias database file.
 
 3) Run 'sudo mta-switch fink' to move the old sendmail from Apple's Postfix
    out of the way and place symlinks to Fink's Postfix in its place. You may
    need to do this after upgrades of Mac OS X from Apple. If you are running
    the system's Postfix, you must stop it before starting the Fink installed
    one or things could get very confused: 'sudo /usr/sbin/postfix stop'.
 
 4) Run 'sudo daemonic enable postfix'. This will create a Postfix startup
    item, but it won't actually start Postfix. To do that, you can run
    'sudo postfix start'.

Removing postfix via Fink will automatically disable it and re-enable
sendmail.
<<
DescPackaging: <<
Adds startup item via daemonic, and an mta-switch shell script.
NetInfo support disabled since Apple has depreciated it and no longer supplies
the necessary header files.

Original maintainer: Daniel Parks <[EMAIL PROTECTED]>
<<
License: OSI-Approved
Maintainer: Daniel Johnson <[EMAIL PROTECTED]>

Depends: daemonic, db42-shlibs | db42-ssl-shlibs, pcre-shlibs
BuildDepends: db42 | db42-ssl, pcre
Conflicts: postfix-release, postfix-tls
Replaces: postfix-release, postfix-tls

Source: ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-%v.tar.gz
Source-MD5: f96fc9e7cbf9750d4a91475fcbd02a81

PatchScript: <<
sed 's|@FINKPREFIX@|%p|g ' <%a/%n.patch | patch -p1
perl -pi.bak -e's,/(etc|var/spool)/postfix,%p/\1/postfix,g' man/man1/* man/man5/* 
man/man8/* conf/* html/*.html README_FILES/*
<<

NoSetCPPFLAGS: true
NoSetLDFLAGS: true
CompileScript: <<
make makefiles CCARGS='-DDEF_COMMAND_DIR=\"%p/sbin\" \
        -DDEF_CONFIG_DIR=\"%p/etc/postfix\" \
        -DDEF_DAEMON_DIR=\"%p/lib/postfix\" \
        -DDEF_MAILQ_PATH=\"%p/bin/mailq\" \
        -DDEF_MANPAGE_DIR=\"%p/share/man\" \
        -DDEF_NEWALIAS_PATH=\"%p/bin/newaliases\" \
        -DDEF_README_DIR=\"%p/share/doc/%n/README_FILES\" \
        -DDEF_HTML_DIR=\"%p/share/doc/%n/html\" \
        -DDEF_QUEUE_DIR=\"%p/var/spool/postfix\" \
        -DDEF_SENDMAIL_PATH=\"%p/sbin/sendmail\" \
        -DHAS_DB \
        -I%p/include -I%p/include/db4' \
        AUXLIBS="-L%p/lib -ldb"
make
<<

InstallScript: <<
        /bin/sh postfix-install -non-interactive install_root="%d"
        install -m0755 mta-switch %i/sbin
<<
DocFiles: AAAREADME COMPATIBILITY COPYRIGHT HISTORY LICENSE RELEASE_NOTES 
RELEASE_NOTES-1.1 RELEASE_NOTES-2.0 US_PATENT_6321267
ConfFiles: <<
        %p/etc/postfix/main.cf
        %p/etc/postfix/master.cf
        %p/etc/postfix/access
        %p/etc/postfix/aliases
        %p/etc/postfix/canonical
        %p/etc/postfix/header_checks
        %p/etc/postfix/relocated
        %p/etc/postfix/transport
        %p/etc/postfix/virtual
<<
DaemonicName: postfix
DaemonicFile: <<
        <service>
                <description>Postfix Mail Transfer Agent</description>
                <message>Postfix</message>
                
                <daemon name="postfix">
                        <executable checkexit="true">%p/sbin/postfix</executable>
                        <parameters>start</parameters>
                        <configfile>%p/etc/postfix/main.cf</configfile>
                </daemon>
        </service>
<<

PreInstScript: <<
        echo 'Stopping postfix in case you are upgrading from an old version.'
        { [ -x %p/sbin/postfix ] && %p/sbin/postfix stop ; } || true
<<
PostInstScript: <<
        %p/etc/postfix/post-install upgrade-package
<<
PreRmScript: <<
        if [ $1 != "upgrade" ]; then
                daemonic remove %n
                echo "Stopping postfix..."
                %p/sbin/postfix stop >& /dev/null || true
                yes 'n' | mta-switch apple
        fi
<<



-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
_______________________________________________
Fink-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to