Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Jun 2006 02:41:18 +1000
From:      Raul <email-ports@def-defying.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Raul <email-ports@def-defying.com>
Subject:   ports/98757: New port: mail/squirrelmail-tmda-plugin tmdatools plugin for SquirrelMail
Message-ID:  <E1Fok2w-0002rD-KM@mail.def-defying.com.au>
Resent-Message-ID: <200606091620.k59GKE1x046012@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         98757
>Category:       ports
>Synopsis:       New port: mail/squirrelmail-tmda-plugin tmdatools plugin for SquirrelMail
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 09 16:20:13 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Raul Pollicino <email-ports@def-defying.com>
>Release:        FreeBSD 6.0-RELEASE i386
>Organization:
None
>Environment:
System: FreeBSD freebsd.Dimension.Z 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu Nov 3 09:36:13 UTC 2005 root@x64.samsco.home:/usr/obj/usr/src/sys/GENERIC i386

>Description:
Plug-in to SquirrelMail for inclusion into the ports collection.

The plug-in allows users of TMDA to control filter lists and tag messages
from within SquirrelMail.

Name chosen to match existing Squirrelmail plugin implmentations.

>How-To-Repeat:
Not applicable.

>Fix:
--- tmdatools.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	squirrelmail-tmda-plugin/
#	squirrelmail-tmda-plugin/pkg-descr
#	squirrelmail-tmda-plugin/pkg-message
#	squirrelmail-tmda-plugin/pkg-plist
#	squirrelmail-tmda-plugin/Makefile
#	squirrelmail-tmda-plugin/distinfo
#
echo c - squirrelmail-tmda-plugin/
mkdir -p squirrelmail-tmda-plugin/ > /dev/null 2>&1
echo x - squirrelmail-tmda-plugin/pkg-descr
sed 's/^X//' >squirrelmail-tmda-plugin/pkg-descr << 'END-of-squirrelmail-tmda-plugin/pkg-descr'
XThis is a port of tmdatools plugin for Squirrelmail.
X
XThis plugin allows a TMDA enabled account to be managed from within the
XSquirrelMail interface, including the ability to edit list files, add
Xcontrol headers to outgoing email, manage pending messages and create
Xtagged addresses for use outside SquirrelMail.
X
XWWW: http://www.morison.net/squirrelmail-plugins/tmdatools.html
END-of-squirrelmail-tmda-plugin/pkg-descr
echo x - squirrelmail-tmda-plugin/pkg-message
sed 's/^X//' >squirrelmail-tmda-plugin/pkg-message << 'END-of-squirrelmail-tmda-plugin/pkg-message'
X1. Configure TMDA Tools and set file permissions
X------------------------------------------------
XOpen tmdatools_config.php into a text editor. Read the comments in tmdatools_config.php and make any changes needed on your system.
X
XIn order for TMDA Tools to gain write access to the files specified in $plugin_tmdatools_editfiles you need to set ownership and permissions as shown below, where user=your user name and squirreluser=a group to which the user that SquirrelMail is running as on your system belongs.
X
X    chown user:squirreluser filename
X    chmod 660 filename
X
XCheckpoint Test: Login to SquirrelMail. Go to the TMDA Tools page. Verify that you can edit the files as required.
X
X
X2. Configure TMDA
X-----------------
XTMDA must be configured to a) show the appropriate headers for the TMDA Tools pending list manager; b) to allow mode 640 on ~/.tmda/crypt_key; and c) to override the default mode used when creating messages in your pending folder (so that squirreluser can view pending messages). Open your TMDA configuration file ~/.tmda/config into a text editor. Add the following lines:
X
X    TERSE_SUMMARY_HEADERS = ["from_name", "subject", "date"]
X    ALLOW_MODE_640 = 1
X    os.umask(027)
X
XWhen calling tmda-address, tmda-pending and (if required) sending email via the tmda-sendmail wrapper as called by SquirrelMail, squirreluser will require read access to your ~/.tmda/config and sometimes ~/.tmda/crypt_key files. Go to a shell prompt and and change the ownership and access mode as follows:
X
X    cd ~/.tmda
X    chmod 640 config crypt_key
X    chown user:squirreluser config crypt_key
X
XCheckpoint Test: Login to SquirrelMail. Go to the TMDA Tools page. Verify that you can use the Address Generator.
X
XCheckpoint Test: Send email to yourself from both another account on the same system and an external account. This will verify that you have not broken tmda's incoming email processing by changing these file permissions.
X
X
X3. Set directory and existing file permissions
X----------------------------------------------
XIf you have TMDA configured to log outgoing messages, squirreluser will require write access to your TMDA log directory, and to any outgoing log file that already exists. To manage pending messages, squirreluser will require write access to the pending messages directory and any pending messages currently in that directory. The sticky bit must be set on these directories to ensure that squirreluser is set to be the group owner of new files created in these directories by other processes. If these directories are ~/.tmda/logs/ and ~/.tmda/pending/ respectively, set permissions as follows:
X
X    cd ~/.tmda/
X    chown -R user:squirreluser logs
X    chmod -R 660 logs
X    chmod 2770 logs
X    chown -R user:squirreluser pending
X    chmod -R 660 pending
X    chmod 2770 pending
X
XCheckpoint Test: Send email to yourself from both another account on the same system and an external account. This will verify that you have not broken TMDA's incoming email processing by changing these permissions.
X
X
X4. Configure SquirrelMail to send email via sendmail (if required)
X------------------------------------------------------------------
XNote: This step is only required if you have not already configured SquirrelMail to send email via TMDA through some other mechanism, such as tmda-ofmipd (authenticated SMTP).
X
XOpen your SquirrelMail configuration file config.php into a text editor. Make changes as follows:
X
X    $useSendmail = true;
X
XThe $sendmail_path variable should remain as the system sendmail binary; as this will be overridden with the path to the tmda-sendmail wrapper if the plugin is activated for the logged in user.
X
XCheckpoint Test: Log out of SquirrelMail, and then log back in. You should now be able to send email via TMDA. The default TMDA send mode depends on your TMDA configuration. You can override the default send mode on a per-message basis by selecting a specific TMDA send mode on the compose email form.
X
X
XWWW: http://www.morison.net/squirrelmail-plugins/tmdatools.html
X
END-of-squirrelmail-tmda-plugin/pkg-message
echo x - squirrelmail-tmda-plugin/pkg-plist
sed 's/^X//' >squirrelmail-tmda-plugin/pkg-plist << 'END-of-squirrelmail-tmda-plugin/pkg-plist'
X@unexec %D/%%SQUIRRELDIR%%/config/conf.pl --remove-plugin tmdatools
X%%SQUIRRELDIR%%/%%TMDATOOLDIR%%/COPYING
X%%SQUIRRELDIR%%/%%TMDATOOLDIR%%/INSTALL
X%%SQUIRRELDIR%%/%%TMDATOOLDIR%%/README
X%%SQUIRRELDIR%%/%%TMDATOOLDIR%%/address.php
X%%SQUIRRELDIR%%/%%TMDATOOLDIR%%/editfile.php
X%%SQUIRRELDIR%%/%%TMDATOOLDIR%%/index.php
X%%SQUIRRELDIR%%/%%TMDATOOLDIR%%/paginator.php
X%%SQUIRRELDIR%%/%%TMDATOOLDIR%%/pending.php
X%%SQUIRRELDIR%%/%%TMDATOOLDIR%%/setup.php
X%%SQUIRRELDIR%%/%%TMDATOOLDIR%%/tmdatools.php
X%%SQUIRRELDIR%%/%%TMDATOOLDIR%%/tmdatools_config.php.sample
X%%SQUIRRELDIR%%/%%TMDATOOLDIR%%/tmdatools_findhome.php
X%%SQUIRRELDIR%%/%%TMDATOOLDIR%%/tools.php
X%%SQUIRRELDIR%%/%%TMDATOOLDIR%%/version
X%%SQUIRRELDIR%%/%%TMDATOOLDIR%%/viewer.php
X@dirrm %%SQUIRRELDIR%%/%%TMDATOOLDIR%%
END-of-squirrelmail-tmda-plugin/pkg-plist
echo x - squirrelmail-tmda-plugin/Makefile
sed 's/^X//' >squirrelmail-tmda-plugin/Makefile << 'END-of-squirrelmail-tmda-plugin/Makefile'
X# New ports collection makefile for: squirrelmail-tmda-plugin
X# Date created:     	           	 2006-06-10
X# Whom:         	               	 Raul Pollicino <email-freebsd@def-defying.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=      squirrelmail-tmda-plugin
XPORTVERSION=   1.0.2
XCATEGORIES=    mail
XMASTER_SITES=  http://www.squirrelmail.org/plugins/
XDISTNAME=      tmdatools 1.0.2 1.4.2 \(stable\)
XDISTFILES=     tmdatools.1.0.2-1.4.2.tar.gz
X
XMAINTAINER=    email-ports@def-defying.com
XCOMMENT=       Adds TMDA support to SquirrelMail
X
XRUN_DEPENDS=   tmda-filter:${PORTSDIR}/mail/squirrelmail:${PORTSDIR}/mail/tmda
X
XNO_BUILD=      yes
X
XSQUIRREL_PLUGIN_NAME= tmdatools
XWRKSRC=        ${WRKDIR}/tmdatools
X
X.ifndef WITHOUT_WWWDIR
XSQUIRRELDIR?=   ${PREFIX}/www/squirrelmail
XPLIST_SUB+=     SQUIRRELDIR=www/squirrelmail
X.else
XSQUIRRELDIR?=   ${PREFIX}/squirrelmail
XPLIST_SUB+=     SQUIRRELDIR=squirrelmail
X.endif
XTMDATOOLDIR?=   ${SQUIRRELDIR}/plugins/${SQUIRREL_PLUGIN_NAME}
XPLIST_SUB+=     TMDATOOLDIR=plugins/${SQUIRREL_PLUGIN_NAME}
X
Xpre-everything::
X	@${ECHO} "The plugin expects SquirrelMail install in ${SQUIRRELDIR}"
X	@${ECHO} "To use the old location ${PREFIX}/squirrelmail define WITHOUT_WWWDIR=yes"
X	@${ECHO} ""
X.ifndef WITHOUT_ACTIVATE
X	@${ECHO} "Activating plug-in in SquirrelMail after installation."
X	@${ECHO} "If you don't want to automatically activate the plug-in set WITHOUT_ACTIVATE=yes"
X.else
X	@${ECHO} "NOT Activating plug-in in SquirrelMail after installation."
X	@${ECHO} "If you want to automatically activate the plug-in unset WITHOUT_ACTIVATE"
X.endif
X	@${ECHO} ""
X
Xpost-patch:
X	@${REINPLACE_CMD} \
X		-e 's|"/usr/local/tmda-1.0.2/"|${TMDATOOLDIR}|g' \
X		${WRKSRC}/tmdatools_config.php.sample
X	@${RM} ${WRKSRC}/tmdatools_config.php.sample.bak
X
Xdo-install:
X	@${MKDIR} ${TMDATOOLDIR}
X	@${CP} -Rp ${WRKSRC}/ ${TMDATOOLDIR}
X	@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${TMDATOOLDIR}
X	@${RM} -f ${WRKSRC}/tmdatools_config.php.sample.bak
X.ifndef WITHOUT_ACTIVATE
X	@${SQUIRRELDIR}/config/conf.pl --install-plugin ${SQUIRREL_PLUGIN_NAME}
X.else
X	@${ECHO} "To activate the plug-in in SquirrelMail use"
X	@${ECHO} "${SQUIRRELDIR}/config/conf.pl --install-plugin ${SQUIRREL_PLUGIN_NAME}"
X.endif
X
Xpost-install:
X	@${ECHO} ""
X	@${ECHO} "Refer to ${TMDATOOLDIR}/INSTALL for final installation instructions."
X	@${ECHO} ""
X
X.include <bsd.port.mk>
END-of-squirrelmail-tmda-plugin/Makefile
echo x - squirrelmail-tmda-plugin/distinfo
sed 's/^X//' >squirrelmail-tmda-plugin/distinfo << 'END-of-squirrelmail-tmda-plugin/distinfo'
XMD5 (tmdatools.1.0.2-1.4.2.tar.gz) = d1d5ef4a89d5490caf7c5b67e4c1f6ee
XSHA256 (tmdatools.1.0.2-1.4.2.tar.gz) = 2722e783ca579fa963843419793fd06deb3029ec6ba31878cca1729f67d9980d
XSIZE (tmdatools.1.0.2-1.4.2.tar.gz) = 17347
END-of-squirrelmail-tmda-plugin/distinfo
exit
--- tmdatools.shar ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1Fok2w-0002rD-KM>