JavaMail Properties
Simple configuration of JavaMail. This configuration file must be in the Java Properties XML format.
The location to the javamail configuration file is specified in the java system property spamzilla.properties. To specify this system property on the command line, use the -D java switch, example given:
java -Dspamzilla.properties org.apache.axis.transport.http.SimpleAxisServer
Thread Pool Options
This controlls the thread resource. In the spamzilla java mail component, multithreadding is used as the approach for concurrent sends. It is not the most efficient mechanism, but with Java 1.5, and a modern CPU, it is fast enough and allows for a very simple internal design.
| mailer.pool.coresize | Controls the number of threads at start |
| mailer.pool.maxsize | Controls the maximum number of threads in the pool |
| mailer.pool.keepalive | Specifies the amount of time to keep an idle thread alive, if we have more than coresize threads. |
| mailer.pool.keepalive.units | The unit type for the keepalive time, may be one of nanoseconds, microseconds, milliseconds, seconds |
Example:
<entry key="mailer.pool.coresize">120</entry>
<entry key="mailer.pool.maxsize">180</entry>
<entry key="mailer.pool.keepalive">500</entry>
<entry key="mailer.pool.keepalive.units">milliseconds</entry>
Queue Options
These options control various details about how, and when, each next block of targets is fetched from the database server.
| mailer.queue.blocksize | Number of Targets to request per iteration. |
| mailer.queue.lowmark | Low water mark for queue. This is the queue size at which the node will request more targets. |
| mailer.queue.group | The number of targets to group per connection if possible. To disable grouping, use a value of 1. |
Example:
<entry key="mailer.queue.blocksize">300</entry>
<entry key="mailer.queue.lowmark">20</entry>
<entry key="mailer.queue.group">5</entry>
Sending Options
These are miscelanious options that control minor details about sending.
| mailer.version | The value of this property will be used for the X-Mailer header |
| mailer.debug | This may be one of true, false and will specify weither or not detailed debug output about each SMTP transaction should be emitted |
Example:
<entry key="mailer.version">Microsoft Outlook Express 6.00.2900.2180</entry>
<entry key="mailer.debug">false</entry>
Database Options
Database connection pool and resource options. These options control how large of a database connection pool to create, to what database and as which user.
| database.pool.size | Specifies the size of the pool |
| database.pool.dsn | Specifies the datasource to be used |
| database.dsn | The DSN, or Data Source Name, of which to connect |
| database.driver | The name of a java class to preload (JDBC will often error if the required driver is not loaded before it is requested) |
Example:
<entry key="database.pool.size">10</entry>
<entry key="database.driver">org.postgresql.Driver</entry>
<entry key="database.dsn">jdbc:postgresql://204.15.164.12/spamzilla</entry>
<entry key="database.username">scott</entry>
<entry key="database.password">example</entry>
Subscription Options
This describes the actions which the mail node should subscribe to, and at what locations, through the spamzilla PubSub? distribution framework.
Caveat currently only controllers are valid Publishers in the PubSub? framework. Mail nodes may only be subscribers, however, controller nodes may also be subscribers, this way controllers can be distributed amongst themselves.
Note due to the design of Apache Axis, the service framework that JavaMail is built around, subscription currently does not happen during startup of the webservice. For this reason, you must use a small javascript web service client tool for kick-starting subscriptions, included in the spamzilla java mailer's distribution. See JavaMail/Subscribe for more information.
| subscriptions | The number of subscriptions to expect. If you have 2 subscriptions, it will expect to have a subscription.1.url, subscription.1.object, subscription.1.method… subscription.2.url, subscription.2.object, subscription.2.method… |
| subscription.N.url | The unified resource locator of the service. |
| subscription.N.object | The object to listen against (as per SOAPAction). |
| subscription.N.method | The method to listen against. |
Example:
<entry key="subscriptions.localurl">http://205.15.164.2:8080/axis/services/Mailer</entry>
<entry key="subscriptions">1</entry>
<entry key="subscription.1.url">http://204.15.164.12/soap?session=controller</entry>
<entry key="subscription.1.object">Mailer</entry>
<entry key="subscription.1.method">startCampaign</entry>
Local Resource Options
This namespace is allocated for local resources, although currently the only local resource is local bindable IP addresses.
| resource.ip.allocate | The frequency in which to offer the first ip address before cycling. Note that each mailer may try the next ip in the list, but this will tell us how many times to start with the first address before the second becomes the first address to try using, and so forth. |
| resource.ips | The number of available IPs |
| resource.ip.N | The textual representation for an IP. In IPv4: 255.255.255.255 |
Example:
<entry key="resource.ip.allocate">10</entry>
<entry key="resource.ips">1</entry>
<entry key="resource.ip.1">192.168.15.101</entry>
<entry key="resource.ip.1.helo">c-67-183-222-93.hsd1.wa.comcast.net</entry>
See Also
- SpamZilla/Configuration for controller configurations or the Perl Mail Node.
- JavaMail/Subscribe for information about the subscription tool.
- JavaMail/Logging for information about spamzilla's logging.