|--upload will upload a script to the server.|
|--download will download a script from the server.|
|--list will list the scripts which exist on the server. One of those scripts might be marked ACTIVE.|
|--delete will delete a script from the server.|
|--checkscript will ask the server to validate the local file provided.|
|--edit will download a script, invoke an editor upon it, ask the server to check the results (and offer to re-edit if the server rejects it) and finally upload the result.|
|--activate will mark the specified remote script as the active one.|
|--deactivate will remove the active mark from the specified remote script without activating a replacement.|
|--exec will take a file-name containing commands as though given in the normal read-eval-print loop.|
(If --server is not explicitly stated, it may be provided at the end of the command-line for compatibility with sieveshell.)
$IMAP_SERVER for a default IMAP server.
$USERNAME and $LOGNAME where the getpwuid() function is not available.
$SSL_CERT_DIR and $SSL_CERT_FILE for locating default Certificate Authority trust anchors.
$VISUAL, else $EDITOR, for the edit action.
If the authentication protocol negotiates a protection layer then things will rapidly Go Bad. A mitigating factor is that no protection layer should be negotiated whilst under STARTTLS protection. Just use TLS!
When listing scripts, the format is based upon the raw server output, assuming that the server uses quoted-strings for the script names. The output is just passed back on the basis that its a fairly good interface to pass to a program. But a server could choose to use literal strings, even though the results are defined as line-break separated that would mean that some linebreaks are special. Hopefully no server will do this.
If sieve-connect fails to connect to an IPv4 server without the -4 option being explicitly passed, then youve encountered a portability issue in the IO::Socket::INET6 Perl library and need to upgrade that.
Most historical implementations used port 2000 for ManageSieve. RFC5804 allocates port 4190. This tool uses a port-spec of sieve(4190) as the default port, which means that an /etc/services (or substitute) entry for sieve as a TCP service takes precedence, but if that is not present, will assume 4190 as the default. This change means that if youre still using port 2000 and do not have an /etc/services entry, updating to/beyond release 0.75 of this tool will break invocations which do not specify a port. The specification of the default port was moved to the user-configurable section at the top of the script and administrators may wish to override the shipped default. You can bypass all of this mess by publishing SRV records, per RFC5804.
The Net::DNS Perl module does not (at time of writing) provide full support for weighted prioritised SRV records and I have not made any effort to fix this; whatever the default sort algorithm provides for SRV is what is used for ordering.
If you dont specify a server and dont export $IMAP_SERVER in the environment then the search mechanism is safer and more thorough if the Mozilla::PublicSuffix Perl module is installed. In particular, if your hostname is also your domain name and the parent domain is administered by someone you dont trust, then youll regret not installing that module.
Probably need to sit down and work through the final RFC and see if any functionality is still missing.
Actually uses STARTTLS. Can handle script names with embedded whitespace. Author needs access to a server which handles embedded quote characters properly to complete testing of that.
sieve-connect was written as a demonstration for the info-cyrus mailing-list, 2006-11-14. It was a single-action-and-quit script for scripting purposes. The command-loop code was written (two days) later and deliberately designed to be compatible with sieveshell.
Versions prior to 0.85 did not actually verify the peer certificate identity, although this author stupidly believed that it did. API/expectations mismatch.
Phil Pennock <email@example.com> is guilty, mLud.
There is a low-volume announcement list for new releases; the web interface is at http://mail.globnix.net/mailman/listinfo/sieve-connect-announce <http://mail.globnix.net/mailman/listinfo/sieve-connect-announce> or you can send mail, mailto:firstname.lastname@example.org?subject=subscribe <mailto:email@example.com?subject=subscribe>
Perl. Authen::SASL. IO::Socket::INET6. IO::Socket::SSL (at least version 1.14). Pod::Usage. Net::DNS for SRV lookup. Pod::Simple::Text for built-in man command (optional). Term::ReadKey to get passwords without echo. Various other Perl modules which are believed to be standard. Term::ReadLine will significantly improve interactive mode. Term::ReadLine::Gnu will improve it further by allowing tab-completion. Mozilla::PublicSuffix is highly recommended and will improve security.
sieve-connect is regularly tested with the timsieved server distributed with the Cyrus IMAP server. Further interoperability testing is underway, more is desired (test accounts appreciated!).