sympa version 5.3.4 for Mac OS X 10.5 Leopard
Friday the 16th of May, 2008

    sympa  most recent diff


      View the most recent changes for the sympa port at: sympa.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for sympa.
      The raw portfile for sympa 5.3.4 is located here:
      http://sympa.darwinports.com/dports/mail/sympa/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/sympa
      Google
      Web Darwinports.com



      # $Id: Portfile 33819 2008-02-05 23:35:01Z markd macports.org $

      PortSystem 1.0

      Name: sympa
      Version: 5.3.4
      Category: mail
      Maintainers: markd
      Platform: darwin

      Description: Sympa - Mailing List Manager with LDAP support

      Long Description: An advanced perl-based mail list manager with a web interface that supports LDAP authentication and LDAP extraction of list subscribers and owners.

      Homepage: http://www.sympa.org

      master_sites http://www.sympa.org/distribution/ http://www.sympa.org/distribution/old/

      checksums md5 13179ae837d710cc81b6db1fe7f2404b
      default_variants +server

      patchfiles patch-configure.in patch-Makefile.in patch-sympa.generic patch-src_alias_manager.pl

      depends_lib port:mysql5 port:apache2 port:mod_fcgid port:openssl port:postfix port:p5-libwww-perl port:p5-archive-zip port:p5-convert-asn1 port:p5-pathtools port:p5-dbi port:p5-dbd-mysql port:p5-mailtools port:p5-io-stringy port:p5-mime-tools port:p5-mime-base64 port:p5-mime-charset port:p5-mime-encwords port:p5-crypt-openssl-x509 port:p5-cgi port:p5-fcgi port:p5-libintl-perl port:p5-template-toolkit port:p5-crypt-ciphersaber port:p5-mhonarc port:p5-regexp-common port:p5-xml-libxml port:p5-io-socket-ssl port:p5-soap-lite port:p5-perl-ldap

      configure.args --prefix=${prefix} --with-bindir=${prefix}/bin/${name} --with-sbindir=${prefix}/bin/${name} --with-libexecdir=${prefix}/libexec/${name} --with-libdir=${prefix}/lib/${name} --with-cgidir=${prefix}/share/${name}/cgi-bin --with-iconsdir=${prefix}/share/${name}/icons --with-localedir=${prefix}/share/locale --with-scriptdir=${prefix}/share/${name}/script --with-sampledir=${prefix}/share/${name}/sample --with-docdir=${prefix}/share/doc/${name} --with-datadir=${prefix}/share/${name} --with-confdir=${prefix}/etc/${name} --with-etcdir=${prefix}/etc/${name} --with-initdir=${prefix}/share/${name} --with-expldir=${prefix}/var/${name}/expl --with-piddir=${prefix}/var/${name} --with-lockdir=${prefix}/var/${name}/lock --with-spooldir=${prefix}/var/${name}/spool --with-mandir=${prefix}/man --with-perl=${prefix}/bin/perl --with-openssl=${prefix}/bin/openssl --with-user=www --with-group=www --with-sendmail_aliases=${prefix}/etc/${name}/sympa_aliases --with-virtual_aliases=${prefix}/etc/${name}/sympa_virtual --with-newaliases=${prefix}/bin/newaliases --with-postmap=${prefix}/sbin/postmap

      Variant: postgresql {
      depends_lib-append port:p5-dbd-pg
      depends_lib-delete port:p5-dbd-mysql
      }

      Variant: server {
      # This variant doesn't do anything in this port, it only exists to trigger the server
      # variant in the mysql5 port.
      }

      # Create a startupitem to start/stop the server
      startupitem.create yes
      startupitem.start "${prefix}/share/${name}/sympa"
      startupitem.stop "${prefix}/share/${name}/sympa"


      pre-destroot {
      # Use sympa.generic startup script and fix paths
      reinplace "s|PATH=/usr/bin:/bin:/usr/sbin:/sbin|PATH=${prefix}/bin:${prefix}/sbin:/usr/bin:/bin:/usr/sbin:/sbin|g" "${worksrcpath}/src/etc/script/sympa.generic"

      reinplace "s|/dist/sympa/run|${prefix}/var/${name}|g" "${worksrcpath}/src/etc/script/sympa.generic"

      system "mv ${worksrcpath}/src/etc/script/sympa.generic ${worksrcpath}/src/etc/script/sympa"
      }

      post-destroot {
      # Flag wwsympa.fcgi as executable
      system "chmod ug+x ${destroot}${prefix}/share/sympa/cgi-bin/wwsympa.fcgi"
      # Create empty directories named in sympa.conf & wwsympa.conf not created by Sympa install
      xinstall -m 755 -d ${destroot}${prefix}/var/${name}/expl
      xinstall -m 755 -d ${destroot}${prefix}/var/log/${name}
      # Incoming spool directories
      xinstall -m 755 -d ${destroot}${prefix}/var/${name}/spool/msg
      xinstall -m 755 -d ${destroot}${prefix}/var/${name}/spool/bounce
      # Storage directories
      xinstall -m 755 -d ${destroot}${prefix}/var/${name}/arc
      xinstall -m 755 -d ${destroot}${prefix}/var/${name}/bounce

      # Create sympa.log and sympa_aliases files
      system "touch ${destroot}${prefix}/var/log/${name}/${name}.log"
      system "touch ${destroot}${prefix}/etc/${name}/sympa_aliases"
      system "chown www:www ${destroot}${prefix}/bin/${name}/*"
      system "chown www:www ${destroot}${prefix}/etc/${name}/*"

      # Fix alias_manager.pl since the alias_wrapper seems not to work
      reinplace "s|${prefix}/bin/${name}/aliaswrapper|${prefix}/bin/newaliases|g" "${destroot}${prefix}/bin/${name}/alias_manager.pl"

      # Keep these empty directories
      destroot.keepdirs ${destroot}${prefix}/var/${name}/expl ${destroot}${prefix}/var/log/${name} ${destroot}${prefix}/var/${name}/spool/msg ${destroot}${prefix}/var/${name}/spool/bounce ${destroot}${prefix}/var/${name}/arc ${destroot}${prefix}/var/${name}/bounce

      # Fix permissions for arc directory
      system "chown www:www ${destroot}${prefix}/var/${name}/arc"

      # Set sympa.conf variables (this file uses tabs as separators)
      reinplace "s|#openssl /usr/local/bin/openssl|openssl ${prefix}/bin/openssl|g" "${destroot}${prefix}/etc/sympa/sympa.conf"

      reinplace "s|#db_type mysql|db_type mysql|g" "${destroot}${prefix}/etc/sympa/sympa.conf"

      reinplace "s|#db_name sympa|db_name sympa|g" "${destroot}${prefix}/etc/sympa/sympa.conf"

      reinplace "s|#db_host localhost|db_host localhost|g" "${destroot}${prefix}/etc/sympa/sympa.conf"

      reinplace "s|#db_user sympa|db_user sympa|g" "${destroot}${prefix}/etc/sympa/sympa.conf"

      system "echo 'db_options mysql_socket=${prefix}/var/run/mysql5/mysqld.sock' >> ${destroot}${prefix}/etc/sympa/sympa.conf"

      # Set wwsympa.conf variables
      reinplace "s|${prefix}/arc|${prefix}/var/${name}/arc|g" "${destroot}${prefix}/etc/${name}/wwsympa.conf"

      reinplace "s|${prefix}/bounce|${prefix}/var/${name}/bounce|g" "${destroot}${prefix}/etc/${name}/wwsympa.conf"

      reinplace "s|/icons/sympa|${prefix}/share/${name}/icons|g" "${destroot}${prefix}/etc/${name}/wwsympa.conf"

      reinplace "s|/usr/bin/mhonarc|${prefix}/bin/mhonarc|g" "${destroot}${prefix}/etc/${name}/wwsympa.conf"

      reinplace "s|#openssl /usr/local/bin/openssl|openssl ${prefix}/bin/openssl|g" "${destroot}${prefix}/etc/${name}/wwsympa.conf"
      }

      post-activate {

      # get rid of .turd files created by destroot.keepdirs because they cause problems in Sympa queues
      system "rm ${prefix}/var/${name}/spool/msg/.turd_sympa"
      system "rm ${prefix}/var/${name}/spool/bounce/.turd_sympa"
      system "rm ${prefix}/var/${name}/bounce/.turd_sympa"
      system "rm ${prefix}/var/${name}/arc/.turd_sympa"

      ui_msg "\n **** To complete Sympa installation ****

      You must read the documentation at ${prefix}/share/doc/${name}/index.html for full
      Sympa configuration information, however the installation steps are roughly as shown below.


      1) Setup MySQL and prepare it for Sympa (for PostgreSQL, see documentation)
      Configure MySQL (new MySQL installs)
      sudo -u mysql ${prefix}/lib/mysql5/bin/mysql_install_db

      Start MySQL:
      sudo ${prefix}/share/mysql5/mysql/mysql.server start

      Set MySQL to start at system boot (optional)
      sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist

      Set a MySQL root password:
      Follow the instructions that were given after you executed 'mysql_install_db' above.

      Create a Sympa MySQL user ...
      mysql5 -u root -p (login with new root password when prompted)
      mysql> grant CREATE,INSERT,SELECT,DELETE,UPDATE on sympa.* to sympa localhost;
      mysql> grant CREATE,INSERT,SELECT,DELETE,UPDATE on sympa.* to sympa;
      mysql> quit;

      Create the Sympa database:
      cat ${prefix}/share/sympa/script/create_db.mysql | mysql5 -u root -p sympa

      Verify Sympa DB:
      mysql5 -u root -p
      mysql> use sympa;
      mysql> show tables;
      mysql> exit;

      NOTE: MySQL must start before Apache because of wwsympa.fcgi


      2) Setup Apache 2 & FastCGI
      cd ${prefix}/apache2/conf
      sudo cp httpd.conf.sample httpd.conf

      Modify the ${prefix}/apache2/conf/httpd.conf file

      Add directives and ScriptAlias:
      IPCCommTimeout 120
      MaxProcessCount 2


      SetHandler fcgid-script


      ScriptAlias /sympa ${prefix}/share/sympa/cgi-bin/wwsympa.fcgi

      Start Apache 2: (Turn off personal web sharing first!)
      sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist


      NOTE: The Apache user and group must be the same as the file wwsympa.fcgi.
      Sympa files are owned by user/group 'www' so the apache user and group
      must be www unless you chown Sympa files to something else.


      3) Enable Postfix (not covered), setup Sympa robot aliases, & list alias config
      Robot aliases:
      sympa: \"| ${prefix}/bin/sympa/queue sympa mydomain.org\"
      listmaster: \"| ${prefix}/bin/sympa/queue listmaster mydomain.org\"
      bounce+*: \"| ${prefix}/bin/sympa/bouncequeue sympa mydomain.org\"
      sympa-request:
      sympa-owner:

      Activate the robot aliases with the command \"sudo newaliases\"

      List alias config: (automatic list aliases)
      Add these statements to /etc/postfix/main.cf
      alias_maps = hash:/etc/aliases,hash:${prefix}/etc/${name}/sympa_aliases
      alias_database = hash:/etc/aliases,hash:${prefix}/etc/${name}/sympa_aliases

      Activate the new configuration with the command \"sudo postfix reload\"


      4) Edit ${prefix}/etc/sympa/sympa.conf variables
      domain
      listmaster
      email
      db_password
      wwsympa_url


      5) Edit ${prefix}/etc/sympa/wwsympa.conf variables
      title
      default_home


      6) Add a statement to OS X's syslog.conf file to support Sympa log files

      local1.* ${prefix}/var/log/sympa/sympa.log


      7) Start the Sympa daemon
      sudo launchctl load -w /Library/LaunchDaemons/org.macports.sympa.plist


      8) Have Sympa generate a listmaster password
      Go to http://localhost/sympa. Click the \"First login ?\" link, then
      enter the listmaster address you set in the sympa.conf file, and
      click \"Send me my password\" and retrieve the password in your inbox.


      9) Login to WWSympa at http://localhost/sympa with the listmaster address
      and then change the password and setup your lists.

      -------------------------------------------------
      File Locations:

      Executable files -> ${prefix}/bin/${name}
      CGI directory -> ${prefix}/share/${name}/cgi-bin
      Configuration files -> ${prefix}/etc/${name}
      Sample files -> ${prefix}/share/${name}/sample
      Documentation directory -> ${prefix}/share/doc/${name}
      Expl (also spool/pid/bounce/archive) directories -> ${prefix}/var/${name}
      \n"

      }

    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/sympa
      % sudo port install sympa
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching sympa
      ---> Verifying checksum for sympa
      ---> Extracting sympa
      ---> Configuring sympa
      ---> Building sympa with target all
      ---> Staging sympa into destroot
      ---> Installing sympa
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using sympa with these commands:
      %  man sympa
      % apropos sympa
      % which sympa
      % locate sympa

     Where to find more information:

    Darwin Ports



    image test