Next: , Previous: Working with Subscriptions, Up: Tutorial


7.6 Sieve Scripts

listserv_getsieve_scripts parses the list settings and generates Sieve scripts. When applied at SMTP-Level to incoming emails for the mailing lists, the scripts reject messages that would be bounced by listserv. In this way listserv is prohibited to bounce emails, and messages get rejected rather than bounced. In turn the server running listserv is not blacklisted, as the bounces do not end in honeypots for spam.

For a mailing list several email addresses are allocated, e.g. LIST-L@, LIST-L-request@, owner-LIST-L@ . listserv_getsieve_scripts generates scripts for all addresses.

The odd elements of returned value contain the address for which the script is generated, and the even elements are the scripts theirselves. The last (odd) element of the returned value is NULL.

Details about the algorithm, the options for generating the scripts, and the addresses for which scripts are generated, is provided in the documentation of See listserv_getsieve_scripts.

Example:

       char **scripts = listserv_getsieve_scripts (l, "ABC-L", 11);
     
       scripts[0] contains the name of the first script like ABC-L, scripts[1] is the script itself, scripts[2] contains the name of the second script like ABC-L-request, scripts[3] is the script itself... When scripts[2i+1] is NULL there are no more scripts.

The last parameter of listserv_getsieve_scripts contains bitwise ORed extensions for generating the script. 11 stands for 1 (supports test envelope) + 2 (supports action reject) + 8 (supports external lists).