services -- Writing PigeonDeliver 2.0 Services

Carlo Contavalli

Revision History
Revision 1.0.02004/08/22
First Document Revision

This document describes how to write PigeonDeliver 2.0 Services. Its main purpose is to introduce programmers and users to the structure of PigeonDeliver Services. This document will be modified frequently, to reflect changes in the PigeonDeliver API. Each version of this document will refer to a particular family of PigeonDeliver releases that will be clearly declared at the beginning of the document. This version of the document refer to any known PigeonDeliver version.


Table of Contents
1. Before starting
1.1. Intended Audience
1.2. Copyright Notice
2. What is a PigeonDeliver Service?
3. Service provided methods
4. Expected execution paths
4.1. Single thread
4.2. Multiple threads
5. Error handling
6. Starting to write a PigeonDeliver Service
7. About Methods
7.1. load method
7.2. unload method
7.3. init method
7.4. done method
7.5. del_init method
7.6. del_done method
7.7. del_perform method
8. Error statuses
9. PigeonDeliver API for Services
9.1. Accessing user configurations
9.2. Outputting errors or warnings
9.3. Reading the email being delivered
9.4. Changing the email being delivered
9.5. Forwarding a mail
9.6. Generating a mail
9.7. Modifying the delivery process

1. Before starting

This document was written as part of the documentation of the PigeonAir Project to provide help and support to users, system administrators or developers.

While every effort has been made to ensure that the information is accurate at the time of publication, this document may contain errors, omissions, incongruences or wrong technical details. No liability for damages is accepted by the Author, the publishers or any other organization or person providing the information, arising from any errors or omissions that may appear, however caused.

In case you find an error, you would like to propose better solutions than those discussed in this document or you would like to discuss an idea regarding this document or its content, we would be glad to hear from you and please feel free to contact us by writing to the <deliver-dev at ml.pigeonair.net> mailing list or by directly contacting one of the authors.

1.1. Intended Audience

This document is meant to introduce developers to the structure of PigeonDeliver services and to provide all the information that may be needed to write a PigeonDeliver service.

This document assumes you are already familiar with the PigeonDeliver inner workings, installation and configuration, and no introductory details will be provided. The reader should thus have read all the introductory documents available on the internet site.

1.2. Copyright Notice

This document was written by Carlo Contavalli <ccontavalli at masobit.net> and is thus Copyright (C) Carlo Contavalli 2003, 2004 and the PigeonAir Project.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts.

Any example of program code available in this document should be considered protected by the terms of the GNU General Public License.

You should have received a copy of the GNU General Public License along with this document; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Trademarks are owned by their respective owners.