Spamzilla Configuration
Directives
daemon
<spamzilla xmlns="http://www.blisted.org/spamzilla/config">
<daemon type="perl"
daemonize="false"
user="www-data"
group="www-data"
pid="/tmp/spamzilla.pid" />
</spamzilla>
Attributes
- type
- xsd:string Must be "perl" (otherwise it the node will be ignored
- daemonize
-
xsd:boolean
- if true Spamzilla will daemonize (background itself)
- if false Spamzilla will stay on the foreground This is overridable by the -d command line option?
- user
- xsd:string This must be the username (Currently ignored, see ticket #23) the process will run as
- group
- xsd:string This must be the group (Currently ignored, see ticket #23) the process will run as
- pid
- xsd:string The fully qualified path for the pid file, only used if daemonize is true
service
The service directive instructs the server to start a http server and connect a SOAP handler to it. There may be multiple SOAP handlers per daemon instance, but it is suggested you only have one.
<spamzilla xmlns="http://www.blisted.org/spamzilla/config">
<service type="POE"
address="192.168.15.101"
hostname="scottmc-laptop"
port="80"/>
</spamzilla>
Attributes
- type
- xsd:string This should have a value of "POE", otherwise it will be ignored (future reservation)
- address
- xsd:string This should be the address for the web server to bind, should be a locally bound IP address in IPv4 String notation
- hostname
- xsd:string The value of this will be used as the hostname for the server (future reservation)
- port
- xsd:integer The local port number to bind.
The service may have service components, each component must implement the Spamzilla Service API. During startup, the package matching Spamzilla::Service::<nameofservice> will load, and initialized by object construction, wrapped by a POE session. The object must register any handlers it wishes with its POE session, and register any public methods with the service component (POE session alias of service)
children
subscribe
<spamzilla xmlns="http://www.blisted.org/spamzilla/config">
<daemon type="perl"
daemonize="false"
user="www-data"
group="www-data"
pid="/tmp/spamzilla.pid" />
<service type="POE"
address="192.168.15.101"
hostname="scottmc-laptop"
port="80">
<subscribe url="http://192.168.15.101/soap">
<action object="Mailer" method="startCampaign"/>
<action object="Test" method="example"/>
</subscribe>
</service>
</spamzilla>
A child "subscribe" directive will instruct the SpamZilla? daemon to subscribe to another daemon instances notifications. Required attributes:
- url
- xsd:string The server to subscribe to
A "subscribe" directive may have the following children:
action
The action directive tells the subscriber to listen to the provided event. The event may be described with the following attributes:
- object
- xsd:string The name of the object to accept events for
- method
- xsd:string The name of the method to accept events for
component
Any component child must have the following attributes
- type
- xsd:string Value of type must be POE or the component will be ignored (future reservation)
- name
- xsd:string The name of the module to load (Mapped to Spamzilla::Service::<name>)
database
<database type="DBI"
dsn="DBI:Pg:dbname=spamzilla"
username="root"/>
Attributes
- type
- xsd:string The database interface to use. Currently only DBI is available.
- dsn
- xsd:string This value should be the DSN for the database interface being used.
- username
- xsd:string The username to use when connecting to the database optional
- password
- xsd:string The password to use when connecting to the database optional
webserver
<!-- attach to a servlet for admin interface -->
<webserver type="POE"
attach="service:POE"
authenticate="true"
track="true"
indexfile="spamzilla.xul"
docroot="/home/scott/development/projects/spamzilla/interface">
<user login="demo" password="spamzilla!"/>
<servlet uri="/notifications" type="POE" name="Notifier"/>
<servlet uri="/tdb/.*" type="POE" name="TemplateAttachments"/>
</webserver>
<!-- standalone for normal hosting -->
<webserver type="POE"
address="127.0.0.1"
hostname="localhost"
port="80"
track="true"
docroot="/home/scott/virtualhost"
authenticate="false">
<servlet uri="/optout.html" type="POE" name="Optout">
<stylesheet href="interface/template/optout.xslt"/>
</servlet>
</webserver>
The webserver directive starts a flat-file webserver. One of these is needed to host the administration interface.
Note: Currently, there is no frame forwarding optimization. This feature is in the queue and will be taken care of soon (See Tickets #18, #12 and #11) however there is a feature built into this webserver component for adhoc tracking. A {{{Key}}} template key will be replaced with a link formatted [CampaignID]-[TargetID]. Any link begining with this key, will have the key stripped from the URI before being handed off to the flat file webserver. So to set up frameforwards or image tracking, simply place the image or frame webpage in the webserver, and link to it with http://..domain../{{{Key}}}/rest-of-URI.
Attributes
- type
- xsd:string Must be "POE"
- attach
- xsd:string (optional) Should be service resource to attach to (Currently only service:POE is available). This preceeds hostname, address and port. athenticate: xsd:boolean Require authentication (or not) track: xsd:boolean Track linking (with above mentioned ad-hoc feature) indexfile: xsd:string File to use for index (default: index.html) docroot: xsd:string Fully qualified path of webserver document root. hostname: xsd:string Hostname for server (future reservation) address: xsd:string Fully qualified IPv4 address to bind for webserver (optional) port: xsd:string Port to bind webserver to
Children
servlet
The servlet child directive describes a servlet to load as a SpamZilla? Servlet. Multiple servlets can be loaded per webserver.
A servlet directive may have the following attributes:
- uri (xsd:string) The URI to bind the servlet to (as regular expression)
- type (xsd:string) Currently only "POE" is available (future reservation)
- name (xsd:string) The name of the module to load as a servlet (Implies Servlet:: prefix)
See Also