Commit 86747e22 authored by Sylvestre Ledru's avatar Sylvestre Ledru

Import of imapfilter. the history has been lost as part of the alioth end

parents
*.o
imapfilter
Lefteris Chatzimparmpas <lefcha@fastmail.com>
Copyright (c) 2001-2017 Eleftherios Chatzimparmpas
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
all install uninstall clean:
cd src && $(MAKE) $@
TAG = $(shell git describe --abbrev=0 --tags)
VERSION = $(shell echo $(TAG) | sed s/^v//)
FORMAT = tar.gz
dist:
@ if [ -n "`git tag --list $(TAG)`" ]; \
then \
git archive --verbose --format=$(FORMAT) \
--prefix=imapfilter-$(VERSION)/ \
--output=imapfilter-$(VERSION).$(FORMAT) v$(VERSION); \
echo "Created Git archive: imapfilter-$(VERSION).$(FORMAT)"; \
else \
echo "No such tag in the Git repository: $(TAG)"; \
fi
distclean:
rm -f imapfilter-*.*
This diff is collapsed.
IMAPFilter
Description
IMAPFilter is a mail filtering utility. It connects to remote mail servers
using the Internet Message Access Protocol (IMAP), sends searching queries to
the server and processes mailboxes based on the results. It can be used to
delete, copy, move, flag, etc. messages residing in mailboxes at the same or
different mail servers. The 4rev1 and 4 versions of the IMAP protocol are
supported.
IMAPFilter uses the Lua programming language as a configuration and extension
language.
Website
http://github.com/lefcha/imapfilter
Changes
All the changes in each new release up to the latest are in the NEWS file.
Installation
Compile time requirements are Lua (version 5.3 or 5.2 or 5.1), the PCRE
library, and the OpenSSL library.
Compile and install the program:
make all
make install
Documentation
There is detailed description of the command line options in the
imapfilter(1) manual page, and of the configuration file format in the
imapfilter_config(5) manual page.
There are also more configuration examples in the samples/config.lua file,
and some examples of extensions through Lua in the samples/extend.lua file.
License
Released under the terms and conditions of the MIT/X11 license, included in
the LICENSE file.
Authors
See AUTHORS file.
imapfilter (1.0rc1-1) unstable; urgency=low
Now imapfilter uses LUA 5.0 as configuration/extension language.
-- Francesco Paolo Lovergine <frankie@debian.org> Mon, 3 May 2004 23:18:41 +0200
imapfilter (1:2.6.11-1) unstable; urgency=medium
* New upstream release
* Standards-Version updated to 4.1.1
-- Sylvestre Ledru <sylvestre@debian.org> Mon, 27 Nov 2017 21:41:23 +0100
imapfilter (1:2.6.10-1) unstable; urgency=medium
* New upstream release
-- Sylvestre Ledru <sylvestre@debian.org> Sun, 18 Dec 2016 18:35:26 +0100
imapfilter (1:2.6.8-1) unstable; urgency=medium
* New upstream release
Support OpenSSL 1.1.0 (Closes: #828350)
-- Sylvestre Ledru <sylvestre@debian.org> Sun, 27 Nov 2016 14:49:31 +0100
imapfilter (1:2.6.7-1) unstable; urgency=medium
* New upstream release
* Standards-Version updated to 3.9.8
-- Sylvestre Ledru <sylvestre@debian.org> Sat, 25 Jun 2016 23:16:27 +0200
imapfilter (1:2.6.6-1) unstable; urgency=medium
* New upstream release
* Disable SSLv3 in the OpenSSL backend when OPENSSL_NO_SSL3_METHOD is
defined (Closes: #808393)
-- Sylvestre Ledru <sylvestre@debian.org> Sun, 06 Mar 2016 10:23:22 +0100
imapfilter (1:2.6.4-1) unstable; urgency=medium
* New upstream release
* Remove the usage of SSLv3. Thanks to Andy Whitcroft for the patch
(Closes: #804457)
-- Sylvestre Ledru <sylvestre@debian.org> Wed, 16 Dec 2015 14:09:22 +0100
imapfilter (1:2.6.2-1) unstable; urgency=medium
* New upstream release
-- Sylvestre Ledru <sylvestre@debian.org> Tue, 04 Aug 2015 09:45:20 +0200
imapfilter (1:2.5.7-1) unstable; urgency=medium
* Upload in unstable
-- Sylvestre Ledru <sylvestre@debian.org> Tue, 28 Apr 2015 09:10:26 +0200
imapfilter (1:2.5.7-1~exp1) experimental; urgency=medium
* New upstream release (Closes: #649543)
* Switch to dh
* Fix the watch file
* Standards-Version updated to 3.9.6
* Add myself to the uploaders
* Add Vcs-Browser Vcs-Git tags
-- Sylvestre Ledru <sylvestre@debian.org> Mon, 05 Jan 2015 19:26:18 +0100
imapfilter (1:2.5.2-2) unstable; urgency=low
* Man pages moved to correct location. Fixed Makefile patch for that.
(closes: #674800)
-- Francesco Paolo Lovergine <frankie@debian.org> Mon, 28 May 2012 12:25:10 +0200
imapfilter (1:2.5.2-1) unstable; urgency=low
* New upstream release.
* Policy bumped to 3.9.3. No changes required.
* Now building with Lua 5.2.
* Debhelper level set to 9.
-- Francesco Paolo Lovergine <frankie@debian.org> Fri, 25 May 2012 12:55:11 +0200
imapfilter (1:2.2.3-1) unstable; urgency=low
* New upstream bufix release.
(closes: #616646)
* Moved to debian source format 3.0 and quilt.
* Now imapfilter has moved to github, changed both debian/watch and
homepage field in debian/control.
* Policy bumped to 3.9.1, with no changes.
* Debhelper level set to 8.
-- Francesco Paolo Lovergine <frankie@debian.org> Fri, 11 Mar 2011 00:11:51 +0100
imapfilter (1:2.2.2-1) unstable; urgency=low
* New upstream bugfix release.
* Policy bumped to 3.8.4, no changes.
-- Francesco Paolo Lovergine <frankie@debian.org> Mon, 19 Apr 2010 17:08:06 +0200
imapfilter (1:2.2-1) unstable; urgency=low
* New upstream release.
* Added ${misc:Depends} macro to make lintian happy.
-- Francesco Paolo Lovergine <frankie@debian.org> Tue, 19 Jan 2010 23:08:03 +0100
imapfilter (1:2.1.2-1) unstable; urgency=low
* New upstream release.
-- Francesco Paolo Lovergine <frankie@debian.org> Fri, 04 Dec 2009 00:22:57 +0100
imapfilter (1:2.0.11-1) unstable; urgency=low
* New upstream release.
* Debhelper level changed to 7.
* Policy bumped to 3.8.3.
* Patch Makefile.dpatch updated.
* The debian/rules file has been cleaned and adapted to policy.
-- Francesco Paolo Lovergine <frankie@debian.org> Mon, 21 Sep 2009 14:01:33 +0200
imapfilter (1:2.0.10-1) unstable; urgency=low
* New upstream release
-- Francesco Paolo Lovergine <frankie@debian.org> Wed, 20 Feb 2008 11:04:22 +0100
imapfilter (1:2.0.8-1) unstable; urgency=low
* New upstream release
-- Francesco Paolo Lovergine <frankie@debian.org> Sun, 23 Dec 2007 09:14:17 +0100
imapfilter (1:2.0.6-1) unstable; urgency=low
* New upstream release
* Policy bumped to 3.7.3 (no changes).
* Makefile.dapatch changed to remove -lm superfluous linking.
-- Francesco Paolo Lovergine <frankie@debian.org> Tue, 11 Dec 2007 11:23:00 +0100
imapfilter (1:2.0.4-2) unstable; urgency=low
* Fixed Makefile patch due to upstream changes in macros use.
(closes: #444944,#444945)
-- Francesco Paolo Lovergine <frankie@debian.org> Tue, 02 Oct 2007 10:24:04 +0200
imapfilter (1:2.0.4-1) unstable; urgency=low
* New upstream release. Makefile patch fixed.
* Introduced homepage field in debian/control.
-- Francesco Paolo Lovergine <frankie@debian.org> Mon, 01 Oct 2007 17:35:12 +0200
imapfilter (1:2.0.3-1) unstable; urgency=low
* New upstream release, with major bugfixes.
-- Francesco Paolo Lovergine <frankie@debian.org> Fri, 27 Jul 2007 10:56:23 +0200
imapfilter (1:2.0.2-1) unstable; urgency=low
* New upstream release. Fixes message caching issue.
(closes: #431406)
-- Francesco Paolo Lovergine <frankie@debian.org> Mon, 02 Jul 2007 12:47:45 +0200
imapfilter (1:2.0.1-1) unstable; urgency=low
* New upstream release, fixes backward compatibility.
-- Francesco Paolo Lovergine <frankie@debian.org> Fri, 29 Jun 2007 12:39:52 +0200
imapfilter (1:2.0-1) unstable; urgency=low
* New upstream release
-- Francesco Paolo Lovergine <frankie@debian.org> Thu, 28 Jun 2007 14:39:24 +0200
imapfilter (1:1.3-1) unstable; urgency=low
* New upstream release.
* Moved to lua 5.1.
* Added PCRE build-dependency.
* Moved to debhelper level 5.
-- Francesco Paolo Lovergine <frankie@debian.org> Tue, 24 Apr 2007 11:11:48 +0200
imapfilter (1:1.2.2-2) unstable; urgency=low
* Added a missing watch file.
-- Francesco Paolo Lovergine <frankie@debian.org> Thu, 3 Aug 2006 14:43:23 +0200
imapfilter (1:1.2.2-1) unstable; urgency=low
* New upstream release, with minor bug-fixes.
* Policy bumped to 3.7.2 without changes.
* Updated copyright file with new information
* Added homepage to long description in debian/control
-- Francesco Paolo Lovergine <frankie@debian.org> Thu, 3 Aug 2006 14:22:16 +0200
imapfilter (1:1.2.1-1) unstable; urgency=medium
* New upstream release
(closes: #355506, #355925).
Thanks a lot upstream and reporters.
-- Francesco Paolo Lovergine <frankie@debian.org> Fri, 10 Mar 2006 10:33:20 +0100
imapfilter (1:1.2-1) unstable; urgency=low
* New upstream release.
(closes: #353965)
* Moved to compatibility level 4, no changes.
-- Francesco Paolo Lovergine <frankie@debian.org> Fri, 3 Mar 2006 17:12:28 +0100
imapfilter (1:1.1.1-1) unstable; urgency=low
* New upstream release
-- Francesco Paolo Lovergine <frankie@debian.org> Fri, 11 Nov 2005 15:58:05 +0100
imapfilter (1:1.1-2) unstable; urgency=high
* Removed a double free, present from old days in debian version.
(closes: #326007)
-- Francesco Paolo Lovergine <frankie@debian.org> Wed, 21 Sep 2005 13:22:49 +0200
imapfilter (1:1.1-1) unstable; urgency=low
* New upstream release.
* Unapplied pathmax.dpatch, integrated upstream.
* Introduced Makefile.dpatch to create a custom makefile instead of debian/Makefile.debian.
That's more nice on updates.
-- Francesco Paolo Lovergine <frankie@debian.org> Fri, 26 Aug 2005 12:19:48 +0200
imapfilter (1:1.0-2) unstable; urgency=low
* Added dpatch support in rules and control files.
* Added an upstream patch for hurd PATH_MAX problem.
Now path names can be of any dimension.
[ patch name: pathmax.dpatch ]
(closes: #257090)
-- Francesco Paolo Lovergine <frankie@debian.org> Fri, 9 Jul 2004 13:40:59 +0200
imapfilter (1:1.0-1) unstable; urgency=low
* New upstream release. Now sample lua file is correct upstream too.
-- Francesco Paolo Lovergine <frankie@debian.org> Tue, 25 May 2004 11:42:41 +0200
imapfilter (1.0rc4-2) unstable; urgency=low
* Typo in the fixating example lua file. Now corrected.
-- Francesco Paolo Lovergine <frankie@debian.org> Thu, 13 May 2004 11:10:25 +0200
imapfilter (1.0rc4-1) unstable; urgency=low
* New upstream release
* Fixating sample lua file sample.config.lua
(closes: #248290)
-- Francesco Paolo Lovergine <frankie@debian.org> Wed, 12 May 2004 12:37:49 +0200
imapfilter (1.0rc1-1) unstable; urgency=low
* New upstream release.
Now the program uses lua, so added build-dep (debian/control)
-- Francesco Paolo Lovergine <frankie@debian.org> Mon, 3 May 2004 23:18:41 +0200
imapfilter (0.9.5-1) unstable; urgency=low
* New upstream release
* New maintainer (closes: #231458)
* Policy updated to 3.6.1
* README.Debian has been removed, being superfluous.
* Copyright file revised.
-- Francesco Paolo Lovergine <frankie@debian.org> Fri, 6 Feb 2004 22:25:13 +0100
imapfilter (0.9.2-1) unstable; urgency=low
* New upstream release
-- michael cardenas <mbc@debian.org> Mon, 25 Aug 2003 15:41:08 -0700
imapfilter (0.8.3-1) unstable; urgency=low
* New upstream source.
* Corrected capitalization in description. closes: #163713
-- Michael Cardenas <mbc@debian.org> Sun, 20 Oct 2002 18:32:13 -0700
imapfilter (0.7.3-2) unstable; urgency=low
* Various clean ups. Removed extraneous dh_make templates, truncated the
debian readme at 80 characters.
-- Michael Cardenas <michaelc@lindows.com> Tue, 20 Aug 2002 15:24:53 -0700
imapfilter (0.7.3-1) unstable; urgency=low
* Initial Release.
-- michael cardenas <michaelc@lindows.com> Sat, 20 Jul 2002 04:12:10 -0700
Source: imapfilter
Section: mail
Priority: optional
Maintainer: Francesco Paolo Lovergine <frankie@debian.org>
Uploaders: Sylvestre Ledru <sylvestre@debian.org>
Build-Depends: debhelper (>= 9), libssl-dev, liblua5.2-dev, libpcre3-dev
Standards-Version: 4.1.1
Homepage: https://github.com/lefcha/imapfilter
Vcs-Git: git://git.debian.org/collab-maint/imapfilter.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/imapfilter.git;a=summary
Package: imapfilter
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: filter mail in your IMAP account
Imapfilter is a client application that allows you to
filter mail in your imap mail account. When used in
conjunction with mutt, as your precommand, it allows
you to have your mail sorted into imap folders.
This package was debianized by michael cardenas <michaelc@lindows.com> on
Sat, 20 Jul 2002 04:12:10 -0700.
It was downloaded from http://imapfilter.hellug.gr/
Upstream Author: Lefteris Chatzibarbas <lefcha@hellug.gr>
Copyright:
Copyright (c) 2001-2009 Lefteris Chatzibarbas
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
usr/bin
usr/share/man
usr/share/doc
usr/share/doc/imapfilter
usr/share/doc/imapfilter/examples
NEWS
README
samples/config.lua
samples/extend.lua
Index: imapfilter.git/src/Makefile
===================================================================
--- imapfilter.git.orig/src/Makefile
+++ imapfilter.git/src/Makefile
@@ -1,24 +1,24 @@
-DESTDIR ?=
-PREFIX ?= /usr/local
+LIBDESTDIR ?=
+PREFIX ?= /usr
BINDIR = $(PREFIX)/bin
SHAREDIR = $(PREFIX)/share/imapfilter
-MANDIR = $(PREFIX)/man
+MANDIR = $(PREFIX)/share/man
MYCFLAGS =
MYLDFLAGS =
MYLIBS =
-INCDIRS =
+INCDIRS = -I/usr/include/lua5.2
LIBDIRS =
-LIBLUA = -llua
+LIBLUA = -llua5.2
LIBPCRE = -lpcre
LIBSSL = -lssl
LIBCRYPTO = -lcrypto
CFLAGS = -Wall -Wextra -O -DCONFIG_SHAREDIR='"$(SHAREDIR)"' $(INCDIRS) $(MYCFLAGS)
LDFLAGS = $(LIBDIRS) $(MYLDFLAGS)
-LIBS = -lm -ldl $(LIBLUA) $(LIBPCRE) $(LIBSSL) $(LIBCRYPTO) $(MYLIBS)
+LIBS = $(LIBLUA) $(LIBPCRE) $(LIBSSL) $(LIBCRYPTO) $(MYLIBS)
MAN1 = imapfilter.1
MAN5 = imapfilter_config.5
fix-makefile.diff
#ubuntu-switch-to-SSLv23_client_method-and-use-CTX-options-to-select-protocol.patch
Description: switch to SSLv23_client_method() and use CTX options to select protocol
With us disabling SSLv3 we now either will not build (on Debian) or
coredump during initialisation. As per the Debian bug recommendation
switch to always using SSLv23_client_method() as that can handle the best
protocol available (including TLS etc) going forward. Where we need to
specify a specific protocol start using SSL_CTS_set_options() to limit
the negociable protocols.
Author: Andy Whitcroft <apw@ubuntu.com>
Bug-Debian: https://bugs.debian.org/804457
Bug-Ubuntu: https://launchpad.net/bugs/1516585
Index: imapfilter.git/src/imapfilter.c
===================================================================
--- imapfilter.git.orig/src/imapfilter.c
+++ imapfilter.git/src/imapfilter.c
@@ -21,10 +21,7 @@
extern buffer ibuf, obuf, nbuf, cbuf;
extern regexp responses[];
-extern SSL_CTX *ssl3ctx, *ssl23ctx, *tls1ctx;
-#if OPENSSL_VERSION_NUMBER >= 0x01000100fL
-extern SSL_CTX *tls11ctx, *tls12ctx;
-#endif
+extern SSL_CTX *ssl23ctx;
options opts; /* Program options. */
environment env; /* Environment variables. */
@@ -114,24 +111,12 @@ main(int argc, char *argv[])
SSL_library_init();
SSL_load_error_strings();
- ssl3ctx = SSL_CTX_new(SSLv3_client_method());
ssl23ctx = SSL_CTX_new(SSLv23_client_method());
- tls1ctx = SSL_CTX_new(TLSv1_client_method());
-#if OPENSSL_VERSION_NUMBER >= 0x01000100fL
- tls11ctx = SSL_CTX_new(TLSv1_1_client_method());
- tls12ctx = SSL_CTX_new(TLSv1_2_client_method());
-#endif
if (exists_dir(opts.truststore))
capath = opts.truststore;
else if (exists_file(opts.truststore))
cafile = opts.truststore;
- SSL_CTX_load_verify_locations(ssl3ctx, cafile, capath);
SSL_CTX_load_verify_locations(ssl23ctx, cafile, capath);
- SSL_CTX_load_verify_locations(tls1ctx, cafile, capath);
-#if OPENSSL_VERSION_NUMBER >= 0x01000100fL
- SSL_CTX_load_verify_locations(tls11ctx, cafile, capath);
- SSL_CTX_load_verify_locations(tls12ctx, cafile, capath);
-#endif
start_lua();
#if LUA_VERSION_NUM < 502
@@ -150,13 +135,7 @@ main(int argc, char *argv[])
#endif
stop_lua();
- SSL_CTX_free(ssl3ctx);
SSL_CTX_free(ssl23ctx);
- SSL_CTX_free(tls1ctx);
-#if OPENSSL_VERSION_NUMBER >= 0x01000100fL
- SSL_CTX_free(tls11ctx);
- SSL_CTX_free(tls12ctx);
-#endif
ERR_free_strings();
regexp_free(responses);
Index: imapfilter.git/src/socket.c
===================================================================
--- imapfilter.git.orig/src/socket.c
+++ imapfilter.git/src/socket.c
@@ -17,11 +17,7 @@
#include "session.h"
-SSL_CTX *ssl3ctx, *ssl23ctx, *tls1ctx;
-#if OPENSSL_VERSION_NUMBER >= 0x01000100fL
-SSL_CTX *tls11ctx, *tls12ctx;
-#endif
-
+SSL_CTX *ssl23ctx;
/*
* Connect to mail server.
@@ -90,28 +86,28 @@ int
open_secure_connection(session *ssn)
{
int r, e;
- SSL_CTX *ctx;
+ SSL_CTX *ctx = ssl23ctx;
- if (!ssn->sslproto) {
- ctx = ssl23ctx;
- } else if (!strcasecmp(ssn->sslproto, "ssl3")) {
- ctx = ssl3ctx;
+ if (!strcasecmp(ssn->sslproto, "ssl3")) {
+ SSL_CTX_set_options(ctx, SSL_OP_NO_SSL_MASK);
+ SSL_CTX_clear_options(ctx, SSL_OP_NO_SSLv3);
} else if (!strcasecmp(ssn->sslproto, "tls1")) {
- ctx = tls1ctx;
+ SSL_CTX_set_options(ctx, SSL_OP_NO_SSL_MASK);
+ SSL_CTX_clear_options(ctx, SSL_OP_NO_TLSv1);
} else if (!strcasecmp(ssn->sslproto, "tls1.1")) {
+ SSL_CTX_set_options(ctx, SSL_OP_NO_SSL_MASK);
#if OPENSSL_VERSION_NUMBER >= 0x01000100fL
- ctx = tls11ctx;
+ SSL_CTX_clear_options(ctx, SSL_OP_NO_TLSv1_1);
#else
- ctx = tls1ctx;
+ SSL_CTX_clear_options(ctx, SSL_OP_NO_TLSv1);
#endif
} else if (!strcasecmp(ssn->sslproto, "tls1.2")) {
+ SSL_CTX_set_options(ctx, SSL_OP_NO_SSL_MASK);
#if OPENSSL_VERSION_NUMBER >= 0x01000100fL
- ctx = tls12ctx;
+ SSL_CTX_clear_options(ctx, SSL_OP_NO_TLSv1_2);
#else
- ctx = tls1ctx;
+ SSL_CTX_clear_options(ctx, SSL_OP_NO_TLSv1);
#endif
- } else {
- ctx = ssl23ctx;
}
if (!(ssn->sslconn = SSL_new(ctx)))
#!/usr/bin/make -f
%:
dh $@
override_dh_auto_clean:
make clean
version=3
opts="filenamemangle=s/(?:.*)?v?(\d[\d\.]*)\.tar\.gz/imapfilter-$1.tar.gz/" \
https://github.com/lefcha/imapfilter/tags (?:.*/)?v?(\d[\d\.]*)\.tar\.gz
.Dd Apr 27, 2016
.Dt IMAPFILTER 1
.Os
.Sh NAME
.Nm imapfilter
.Nd mail filter
.Sh SYNOPSIS
.Nm
.Op Fl inVv
.Op Fl c Ar configfile
.Op Fl d Ar debugfile
.Op Fl e Ar 'command'
.Op Fl l Ar logfile
.Op Fl t Ar truststore
.Sh DESCRIPTION
.Nm
is a mail filtering utility. It connects to remote mail servers using the
Internet Message Access Protocol (IMAP), sends searching queries to the server
and processes mailboxes based on the results. It can be used to delete, copy,
move, flag, etc. messages residing in mailboxes at the same or different mail
servers. The 4rev1 and 4 versions of the IMAP protocol are supported.
.Pp
The command line options of
.Xr imapfilter 1
are as follows:
.Bl -tag -width Ds
.It Fl c Ar configfile
Path to the configuration file to read, or the
.Sq -
character to read the configuration from the standard input stream. The
default is
.Pa $HOME/.imapfilter/config.lua .
.It Fl d Ar debugfile
File that contains debugging information about the full communication with the
server, along with other inner workings' details.
.It Fl e Ar 'command'
May be used to enter
.Dq one line
of configuration, while it is also possible to pipe a full configuration as a
string.
When this option is used, a configuration file will not be loaded.
.It Fl i
Enters interactive mode after executing the configuration file.
.It Fl l Ar logfile
File that contains logs of error messages produced.
.It Fl n
This option enables the so called dry-run mode, and any actions that would
result in changes to the server do not actually take place. So the requests
that would modify any data are not sent to the server, even though
informational messages about these actions are still printed.
Any other methods, that only receive data from the server, are performed as
normal, such as for example the searching methods. Note, that the number of
messages an action is reported to be applied upon, might differ between dry-run
mode and the normal execution, and this is expected as in the latter case the
data on the server are continuesly altered by subsequent actions.
.It Fl t Ar truststore
The path to the system's SSL CA TrustStore directory or file. SSL connections
will be validated using the CA certificates found in this directory or file,
and when this is not possible the local
.Pa $HOME/.imapfilter/certificates
file will be used. The default is either the
.Pa /etc/ssl/certs
directory or the
.Pa /etc/ssl/cert.pem
file, whichever is found.
.It Fl V
Displays version and copyright information.