Configuring OpenACS to use Postfix MTA (on MacOS X)
Once postfix is installed, all you need to do is enable it to start as your default Mailserver in /etc/hostconfig. Proceed with configuring Postfix, then onfigure OpenACS Notification Parameters to use Postfix. Finally, restart Postfix for the configurations to take effect. You may also need to restart your OpenACS server as well.
NOTE 1: Replace hostname.mydomain.tld with the hostname of your server. This should be something like openacs.org.Edit /etc/hostconfig to enable Postfix on PantherNOTE 2: I've assumed that the OpenACS server will run as the service0 user.
NOTE 3: You need to create the Maildir directory in the home directory of the service0 user.
$ mkdir /Users/service0/Maildir
MAILSERVER=-YES-Edit /etc/postfix/main.cf
myhostname=hostname.mydomain.tldEdit /etc/postfix/virtual
myorigin=$myhostname
inet_interfaces=$myhostname, localhost
mynetworks_style=host
virtual_maps=regexp:/etc/postfix/virtual
home_mailbox=Maildir/
Add the following regular expressions:Edit /etc/postfix/master.cf
/^notification-(.*)@hostname\.mydomain\.tld/ service0
/^bounce-(.*)@hostname\.mydomain\.tld/ service0
Uncomment line 77 and change:OpenACS: Configure Notifications Parameters
#smtp inet n - n - - smtpd
to
smtp inet n - n - - smtpd
EmailDomain: hostname.mydomain.tldOpenACS: Configure Mail Services Lite Parameters
EmailQmailQueue: /Users/service0/Maildir
EmailReplyAddressPrefix: notification
EmailQmailQueueScanP: 1
BounceDomain: hostname.mydomain.tldRestart Postfix
BounceMailDir: /Users/service0/Maildir
EnvelopePrefix: bounce
$ sudo Postfix stop
$ sudo Postfix start
07:39 PM, 25 May 2005 by Nick Carroll Permalink | Comments (0)
Advocacy
01:54 PM, 25 May 2005 by Ben Koot Permalink | Comments (2)
Blogroll as "How to navigation"
02:13 PM, 24 May 2005 by Ben Koot Permalink | Comments (0)
The idea
02:03 PM, 24 May 2005 by Ben Koot Permalink | Comments (0)
Bookmarklet [openacs.org]
08:13 AM, 24 May 2005 by Ben Koot Permalink | Comments (0)
A simple way to change
07:59 AM, 24 May 2005 by Ben Koot Permalink | Comments (0)
Categories
07:53 AM, 24 May 2005 by Ben Koot Permalink | Comments (0)
Call for non- or less-technical tips
11:56 AM, 23 May 2005 by Nick Grossman Permalink | Comments (0)
OpenACS Tip of the Week: Introduction to OpenACS
OpenACS Packages
OpenACS has transformed from a monolithic code base (3.x and below) to a neater modularised code base in the latest releases (4.x and above). Applications that use the OpenACS framework are now developed in self-contained modules called "packages". All packages are structured using the Model-View-Controller (MVC) pattern.
There are core packages such as the kernel, templating and authentication packages that give you the basis for a web application that supports user, group and application management. You can extend the functionality of a vanilla installation of OpenACS by plugging in already developed packages such as a calendar or wiki through a package installer interface. Or if you can't find a package that provides the functionality you need from OpenACS's extensive package catalog, then you can easily develop your own package.
A package contains an XML based .info file containing meta-data for the package. The core packages use the .info file for dependency checking, as well as for defining properties and specifying call-back commands. The package can also have an SQL directory that contains all SQL files for generating the data model for the application. There is a TCL directory that contains all library procedures for the application. Finally, there is a WWW directory that contains all the presentation logic for the Web application. The structure of the notes package is as follows:
notes
+ notes.info
+ sql
+ oracle
+ postgresql
* notes-create.sql
* notes-drop.sql
+ tcl
* notes-apm-callbacks.tcl
* notes-init.tcl
* notes-procs.tcl
+ www
* index.adp
* index.tcl
* index.xql
* index-postgresql.xql
* index-oracle.xql
In the SQL directory, the notes-create.sql file is called only once when the application is installed, and is used to create the data model in a database. Currently there is support for both Oracle and PostgreSQL in OpenACS, so depending on which RDBMS you are using, the notes-create.sql will be executed from the SQL sub-directory that corresponds to the RDBMS used.
In the TCL directory, the notes-apm-callbacks.tcl file contains procs that get called when the application is installed/mounted. The notes-init.tcl contains TCL procs that initiate the application when AOLServer starts up. The notes-procs.tcl contains TCL procs that can be used by files in WWW or by other packages.
In the WWW directory, each web page consists for an XQL file, a TCL file and an ADP file. The ADP file contains HTML and templating tags for presentation of data from the data base. The XQL file is an XML based file that contains SQL statements that can be used by the TCL file. SQL statements common to all database systems can be placed in file.xql, whereas RDBMS specific SQL statements can be placed in file-postgresql.xql or file-oracle.xql. The TCL file contains the logic for executing SQL statements and then pushing the returned data to the ADP template file.
That just about covers OpenACS and packages from a high-level overview. In future posts we will start blogging about more useful features in OpenACS.
11:02 AM, 23 May 2005 by Nick Carroll Permalink | Comments (0)
Welcome to the hints and tips blog
11:01 AM, 23 May 2005 by Jade Rubick Permalink | Comments (1)
| May 2005 | ||||||
| S | M | T | W | T | F | S |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 | ||||