Skip to content

A PHP client for ManageSieve (RFC 5804)

License

Notifications You must be signed in to change notification settings

arnonerba/managesieve-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 

Repository files navigation

ManageSieve-PHP

A PHP client for ManageSieve (RFC 5804). This project is loosely based on Dan Ellis's PHP 4-era project, sieve-php. It is also inspired by ProtonMail/libsieve-php and zambodaniel/managesieve.

Examples

<?php
include_once('managesieve.php');

try {
	$ms = new ManageSieve('mail.example.com', 4190, 'LOGIN', 'username', 'password');

	$ms->list_scripts();

	print '<pre>' . PHP_EOL;
	print_r($ms->scripts);
	print '</pre>' . PHP_EOL;
} catch (Exception $e) {
	print '<p><strong>Fatal error: </strong><code>' . $e->getMessage() . '</code></p>' . PHP_EOL;
}

Limitations

  • Server-side STARTTLS support is required. Unencrypted connections are not supported.
  • Currently, PLAIN and LOGIN are the only supported SASL authentication mechanisms.
  • The project has only been tested with the Dovecot (Pigeonhole) ManageSieve server.