{"id":13440500,"url":"https://github.com/dovecot/pigeonhole","last_synced_at":"2026-01-18T08:26:42.466Z","repository":{"id":38361787,"uuid":"49322791","full_name":"dovecot/pigeonhole","owner":"dovecot","description":"Pigeonhole project: Sieve support for Dovecot.","archived":false,"fork":false,"pushed_at":"2025-11-27T09:30:02.000Z","size":39945,"stargazers_count":91,"open_issues_count":3,"forks_count":41,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-11-30T02:54:01.027Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://pigeonhole.dovecot.org","language":"C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dovecot.png","metadata":{"files":{"readme":"README","changelog":"NEWS","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-01-09T12:05:32.000Z","updated_at":"2025-11-27T09:30:06.000Z","dependencies_parsed_at":"2023-02-15T12:15:50.391Z","dependency_job_id":"121dbd05-cbea-4145-ab86-53777730ebc1","html_url":"https://github.com/dovecot/pigeonhole","commit_stats":null,"previous_names":[],"tags_count":99,"template":false,"template_full_name":null,"purl":"pkg:github/dovecot/pigeonhole","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dovecot%2Fpigeonhole","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dovecot%2Fpigeonhole/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dovecot%2Fpigeonhole/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dovecot%2Fpigeonhole/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dovecot","download_url":"https://codeload.github.com/dovecot/pigeonhole/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dovecot%2Fpigeonhole/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28534143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T03:01:23.325Z","updated_at":"2026-01-18T08:26:42.450Z","avatar_url":"https://github.com/dovecot.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"Pigeonhole for Dovecot v2.4\n\nIntroduction\n============\n\nThis package is part of the Pigeonhole project (http://pigeonhole.dovecot.org).\nIt adds support for the Sieve language (RFC 5228) and the ManageSieve protocol\n(RFC 5804) to the Dovecot Secure IMAP Server. In the literal sense, a pigeonhole\nis a a hole or recess inside a dovecot for pigeons to nest in. It is, however,\nalso the name for one of a series of small, open compartments in a cabinet used\nfor filing or sorting mail. As a verb, it describes the act of putting an item\ninto one of those pigeonholes. The name `Pigeonhole' therefore well describes an\nimportant part of the functionality that this project adds to Dovecot: sorting\nand filing e-mail messages.\n\nThe Sieve language is used to specify how e-mail needs to be processed. By\nwriting Sieve scripts, users can customize how messages are delivered, e.g.\nwhether they are forwarded or stored in special folders. Unwanted messages can\nbe discarded or rejected, and, when the user is not available, the Sieve\ninterpreter can send an automated reply. Above all, the Sieve language is meant\nto be simple, extensible and system independent. And, unlike most other mail\nfiltering script languages, it does not allow users to execute arbitrary\nprograms. This is particularly useful to prevent virtual users from having full\naccess to the mail store. The intention of the language is to make it impossible\nfor users to do anything more complex (and dangerous) than write simple mail\nfilters.\n\nUsing the ManageSieve protocol, users can upload their Sieve scripts remotely,\nwithout needing direct filesystem access through FTP or SCP. Additionally, a\nManageSieve server always makes sure that uploaded scripts are valid, preventing\ncompile failures at mail delivery.\n\nThis package provides Sieve support as a plugin to Dovecot's Local Delivery\nAgent (LDA) and Dovecot's LMTP service. The ManageSieve protocol is provided is\nan additional service, next to Dovecot's own POP3 and IMAP services.\n\nFeatures\n========\n\n  * The Pigeonhole Sieve implementation aims to be admin- and user-friendly.\n    Much like Dovecot itself, common error messages are made as easily\n    understandable as possible. Any crash, no matter how it happened, is\n    considered a bug that will be fixed. The compiler does not bail on the first\n    error, but it looks for more script errors to make debugging more efficient.\n\n  * The Pigeonhole Sieve implementation is, much like the Sieve language itself,\n    highly extensible with new Sieve capabilities. This includes support for\n    third-party plugins. It should eventually provide the necessary\n    infrastructure for at least all currently known relevant (proposed) Sieve\n    extensions. The goal is to keep the extension interface provided by the\n    Sieve implementation as generic as possible, i.e. without explicit support\n    for specific extensions. New similar extensions can then use the same\n    interface methods without changes to the Sieve engine code. If an extension\n    is not loaded using the require command, the compiler truly does not know of\n    its existence.\n\n  * The Pigeonhole Sieve plugin is backwards compatible with the old CMUSieve\n    plugin, which provided Sieve support for older versions of Dovecot. All\n    Sieve extensions supported by the old plugin are also supported by the\n    Pigeonhole Sieve plugin, including those that are now considered to be\n    deprecated.\n\n  * The Pigeonhole Sieve implementation supports executing multiple Sieve\n    scripts sequentially. Using this feature it is possible to execute\n    administrator-controlled Sieve scripts before and after the user's personal\n    Sieve script, guaranteeing that responses and message deliveries are never\n    duplicated. This implementation is based on a draft specification\n    (http://tools.ietf.org/html/draft-degener-sieve-multiscript-00), which\n    defines the Sieve behavior when multiple scripts are executed sequentially\n    on the same message.\n\n  * The Pigeonhole Sieve implementation includes a test suite to automatically\n    assess whether the compiled Sieve engine works correctly. The test suite is\n    an extension to the Sieve language and is therefore easily extended with new\n    tests. Currently, the test suite is mostly limited to testing script\n    processing. The performed actions are not tested fully yet.\n\n  * The Pigeonhole Sieve implementation supports the new and very useful\n    variables extension, which allows maintaining state information throughout\n    a Sieve script across subsequent rules.\n\n  * The Pigeonhole Sieve plugin is distributed with a sieve-test tool that\n    simplifies testing Sieve scripts and provides additional debugging\n    facilities.\n\nSieve Implementation Status\n===========================\n\nThe core of the language (as specified in RFC 5228) is fully supported. In\naddition to that, this Sieve implementation features various extensions. The\nfollowing list outlines the implementation status of each supported extension:\n\n  The language extensions defined in the base specification are fully supported:\n\n    encoded-character (RFC 5228; page 10)\n    fileinto (RFC 5228; page 23)\n    envelope (RFC 5228; page 27)\n\n  The following Sieve language extensions are also supported:\n\n    copy (RFC 3894): fully supported.\n    body (RFC 5173): fully supported.\n    environment (RFC 5183): fully supported (v0.4.0+).\n    variables (RFC 5229): fully supported.\n    vacation (RFC 5230): fully supported.\n      + vacation-seconds (RFC 6131): fully supported (v0.2.3+).\n    relational (RFC 5231): fully supported.\n    imap4flags (RFC 5232): fully supported.\n    subaddress (RFC 5233): fully supported, but with limited configurability.\n    spamtest and virustest (RFC 5235): fully supported (v0.1.16+).\n    date (RFC 5260; Section 4): fully supported (v0.1.12+).\n    index (RFC 5260; Section 6): fully supported (v0.4.7+).\n    editheader (RFC 5293): fully supported (v0.3.0+).\n    reject (RFC 5429; Section 2.2): fully supported.\n    enotify (RFC 5435): fully supported (v0.1.3+).\n        mailto method (RFC 5436): fully supported (v0.1.3+).\n        xmpp method (RFC 5437): is under development and will become available\n          as a plugin.\n    ihave (RFC 5463): fully supported (v0.2.4+).\n    mailbox (RFC 5490; Section 3): fully supported (v0.1.10+), but ACL\n        permissions are not verified for mailboxexists.\n    mboxmetadata and servermetadata (RFC 5490): fully supported (v0.4.7+)\n    foreverypart (RFC 5703; Section 3): fully supported (v0.4.10+).\n    mime (RFC 5703; Section 4): fully supported (v0.4.10+).\n    extracttext (RFC 5703; Section 7): fully supported (v0.4.12+).\n    include (RFC 6609): fully supported (v0.4.0+).\n    imapsieve (RFC 6785): fully supported (v0.4.14+).\n    duplicate (RFC 7352): fully supported (v0.4.3+).\n    regex (draft v08; not latest version): almost fully supported, but\n        UTF-8 is not supported.\n\n  The following deprecated extensions are supported for backwards\n  compatibility:\n\n    imapflags (obsolete draft): fully backwards compatible (v0.1.3+)\n    notify (obsolete draft): fully backwards compatible (v0.1.15+)\n\n    The availability of these deprecated extensions is disabled by default.\n\n  The following Dovecot-specific Sieve extensions are available:\n\n    vnd.dovecot.debug (v0.3.0+):\n        Allows logging debug messages.\n    vnd.dovecot.execute (v0.4.0+; sieve_extprograms plugin):\n        Implements executing a pre-defined set of external programs with the\n        option to process string data through the external program.\n    vnd.dovecot.filter (v0.4.0+; sieve_extprograms plugin):\n        Implements filtering messages through a pre-defined set of external\n        programs.\n    vnd.dovecot.pipe (v0.4.0+; sieve_extprograms plugin):\n        Implements piping messages to a pre-defined set of external programs.\n    vnd.dovecot.report (v0.4.14):\n        Implements sending MARF reports (RFC 5965).\n\n  The following extensions are under development:\n\n    ereject (RFC 5429; page 4): implemented, but currently equal to reject.\n\n  Many more extensions to the language exist. Not all of these extensions are\n  useful for Dovecot in particular, but many of them are. Currently, the\n  author has taken notice of the following extensions:\n\n    replace (RFC 5703; Section 5): planned.\n    enclose (RFC 5703; Section 6): planned.\n    envelope-dsn, envelope-deliverby, redirect-dsn and\n      redirect-deliverby (RFC 6009): planned; depends on lib-smtp changes in\n        Dovecot.\n    extlists (RFC 6134): planned.\n    convert (RFC 6558): under consideration.\n\n    These extensions will be added as soon as the necessary infrastructure is\n    available.\n\nCompiling and Configuring\n=========================\n\nRefer to INSTALL file.\n\nSieve Tools\n===========\n\nTo test the sieve engine outside deliver, it is useful to try the commands that\nexist in the src/sieve-tools/ directory of this package. After installation,\nthese are available at your $prefix/bin directory. The following commands are\ninstalled:\n\nsievec       - Compiles sieve scripts into a binary representation for later\n               execution. Refer to the next section on manually compiling Sieve\n               scripts.\n\nsieve-test   - This is a universal Sieve test tool for testing the effect of a\n               Sieve script on a particular message. It allows compiling,\n               running and testing Sieve scripts. It can either be used to\n               display the actions that would be performed on the provided test\n               message or it can be used to test the actual delivery of the\n               message and show the messages that would normally be sent through\n               SMTP.\n\nsieve-dump   - Dumps the content of a Sieve binary file for (development)\n               debugging purposes.\n\nsieve-filter - Allow running Sieve filters on messages already stored in a\n               mailbox. \n\nWhen installed, man pages are also available for these commands. In this package\nthe man pages are present in doc/man and can be viewed before install using\ne.g.:\n\nman -l doc/man/sieve-test.1\n\nVarious example scripts are bundled in the directory 'examples'. These scripts\nwere downloaded from various locations. View the top comment in the scripts for\nurl and author information.\n\nCompiling Sieve Scripts\n=======================\n\nWhen the LDA Sieve plugin executes a script for the first time (or after it has\nbeen changed), it is compiled into into a binary form. The Pigeonhole Sieve\nimplementation uses the .svbin extension to store compiled Sieve scripts (e.g.\n.dovecot.svbin). To store the binary, the plugin needs write access in the\ndirectory in which the script is located.\n\nA problem occurs when a global script is encountered by the plugin. For security\nreasons, global script directories are not supposed to be writable by the user.\nTherefore, the plugin cannot store the binary when the script is first compiled.\nNote that this doesn't mean that the old compiled version of the script is used\nwhen the binary cannot be written: it compiles and uses the current script\nversion. The only real problem is that the plugin will not be able to update\nthe binary on disk, meaning that the global script needs to be recompiled each\ntime it needs to be executed, i.e. for every incoming message, which is\ninefficient.\n\nTo mitigate this problem, the administrator must manually pre-compile global\nscripts using the sievec command line tool. For example:\n\nsievec /var/lib/dovecot/sieve/global/\n\nThis is often necessary for scripts listed in the sieve_default, sieve_before\nand sieve_after settings. For global scripts that are only included in other\nscripts using the include extension, this step is not necessary, since included\nscripts are incorporated into the binary produced for the main script located in\na user directory.\n\nCompile and Runtime Logging\n===========================\n\nLog messages produced at runtime by the Sieve plugin are written to two\nlocations:\n\n  * Messages are primarily logged to the user log. By default this log file is\n    located in the same directory as the user's main active personal script (as\n    specified by the sieve setting). This log file bears the name of that script\n    file appended with \".log\", e.g. \".dovecot.sieve.log\". The location of the\n    user log file can also be explicitly configured using the sieve_user_log\n    setting (e.g. for when Sieve scripts are not stored on the local file\n    system).\n\n    If there are errors or warnings in the script, the messages are appended to\n    that log file until it eventually grows too large. When that happens, the\n    old log file is rotated to a \".log.0\" file and an empty log file is started.\n    Informational messages are not written to this log file and the log file is\n    not created until messages are actually logged, i.e. when an error or\n    warning is produced.\n\n  * Messages that could be of interest to the system administrator are also\n    written to the Dovecot LDA logging facility (usually syslog). This includes\n    informational messages that indicate what actions are executed on incoming\n    messages. Compile errors encountered in the user's private script are not\n    logged here.\n\nThe ManageSieve service reports compile errors and warnings only back to the\nuser. System and configuration-related messages are written to the Dovecot\nlogging facility.\n\nKnown issues\n============\n\nSieve\n-----\n\nMost open issues are outlined in the TODO file. The more generic ones are (re-)\nlisted here:\n\n* Compile errors are sometimes a bit obscure and long. This needs work.\n  Suggestions for improvement are welcome.\n\n* The documentation needs work.\n\nManageSieve\n-----------\n\nFor up to date information please visit\nhttps://doc.dovecot.org/admin_manual/pigeonhole_managesieve_server/\n\nAuthors\n=======\n\nRefer to AUTHORS file.\n\nContact Info\n============\n\nStephan Bosch \u003cstephan at rename-it dot nl\u003e\nIRC: Freenode, #dovecot, S[r]us\nWeb: http://pigeonhole.dovecot.org\n\nPlease use the Dovecot mailing list \u003cdovecot at dovecot.org\u003e for questions about\nthis package. You can post to the list without subscribing, the mail then waits\nin a moderator queue for a while. See http://dovecot.org/mailinglists.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdovecot%2Fpigeonhole","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdovecot%2Fpigeonhole","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdovecot%2Fpigeonhole/lists"}