1 |
.TH IMAPFILTER 1 "7 August 2001" "Version 0.1" Commands |
.Dd February 16, 2004 |
2 |
.SH NAME |
.Dt IMAPFILTER 1 |
3 |
imapfilter - mail filter |
.Os |
4 |
.SH SYNOPSIS |
.Sh NAME |
5 |
.B imapfilter |
.Nm imapfilter |
6 |
.RB [ -qtvL ] |
.Nd mail filter |
7 |
.RB [ -c |
.Sh SYNOPSIS |
8 |
.IR configfile ] |
.Nm |
9 |
.RB [ -l |
.Op Fl hkpqvV |
10 |
.IR logfile ] |
.Op Fl c Ar configfile |
11 |
.SH DESCRIPTION |
.Op Fl d Ar interval |
12 |
.B imapfilter |
.Op Fl l Ar logfile |
13 |
is a mail filtering utility. It connects to remote mail servers using the |
.Sh DESCRIPTION |
14 |
Internet Message Access Protocol (IMAP) and deletes messages according to |
.Nm |
15 |
defined filter rules. It is purposed as a preconnect utility before user |
is a mail filtering utility. It connects to remote mail servers using the |
16 |
accesses his/her mailbox (eg. fetch mail). In that way it "clears" user's |
Internet Message Access Protocol (IMAP) and processes messages based on the |
17 |
mailbox from any unwanted messages, without having to download even a single |
definition of filter rules. It can be used to delete, copy, move, flag, etc. |
18 |
header line of them. |
messages residing in multiple mailboxes at different mail servers. The |
19 |
.SH OPTIONS |
IMAP4rev1 and IMAP4 versions of the protocol are supported. |
20 |
.TP |
.Pp |
21 |
.B -c configfile |
The options are as follows: |
22 |
Configuration file to read settings and filters from. The default is |
.Bl -tag -width Ds |
23 |
.IR $HOME/.imapfilterrc . |
.It Fl D |
24 |
.TP |
Debug mode; creates a temporary file name in |
25 |
.B -l logfile |
.Pa /tmp/imapfilter.XXXX , |
26 |
File that contains logs of any mail deletion and error messages that |
where debugging messages about the program's progress are printed. |
27 |
.B imapfilter |
.It Fl V |
28 |
produces. The default is |
Displays program's version. |
29 |
.IR $HOME/.imapfilter_log . |
.It Fl c Ar configfile |
30 |
.TP |
Configuration file to read settings and filters from. The default is |
31 |
.B -q |
.Pa $HOME/.imapfilterrc . |
32 |
Be quite; don't print any information at all. |
.It Fl d Ar interval |
33 |
.TP |
Runs imapfilter at daemon mode and repeatedly polls at the specified interval. |
34 |
.B -t |
.It Fl k |
35 |
Enables test mode, in which the program works as before, but just doesn't |
Kills any other running instances of |
36 |
delete any messages on remote mailbox. |
.Nm |
37 |
.TP |
and removes the lockfile left from a past session. |
38 |
.B -v |
.It Fl l Ar logfile |
39 |
Be verbose; print detailed information about the program's actions. |
File that contains logs of error messages |
40 |
.TP |
.Nm |
41 |
.B -L |
produces and optionally information about the deleted messages. |
42 |
Disable logging of any information to file. |
.It Fl p |
43 |
.SH CONFIGURATION FILE |
Enters the interactive encrypted passwords editor. |
44 |
The configuration file has the following format: |
.It Fl q |
45 |
.PP |
Quiet mode; prints less detailed information about the program's actions. |
46 |
Empty lines and lines beginning with '#' are considered comments. |
Multiple |
47 |
.PP |
.Fl q |
48 |
Otherwise a line is in the format "KEYWORD = ARGUMENT" for account settings |
options decrease the verbosity. The minimum is -2. |
49 |
and "DENY = HEADER" for the filters. |
.It Fl v |
50 |
.PP |
Verbose mode; prints more detailed information about the program's actions. |
51 |
The available keywords are: |
Multiple |
52 |
.TP |
.Fl v |
53 |
.B SERVER |
options increase the verbosity. The maximum is 2. |
54 |
Hostname of the mailserver on which to connect. |
.El |
55 |
.TP |
.Pp |
56 |
.B PORT |
While running in daemon mode, if the SIGUSR1 signal is send, |
57 |
TCP/IP port to connect on to remote server. If not provided the default IMAP |
.Nm |
58 |
protocol port (ie. port 143) will be used. |
wakes up from its sleep phase and rereads its configuration file. |
59 |
.TP |
.Sh AUTHENTICATION AND ENCRYPTION |
60 |
.B USERNAME |
.Nm |
61 |
User's name to be used while logging in to server. |
supports the Challenge-Response Authentication Mechanism (CRAM) for |
62 |
.TP |
user authentication. The authentication type associated with CRAM is |
63 |
.B PASSWORD |
CRAM-MD5. |
64 |
Password of the user. |
.Nm |
65 |
.TP |
will authenticate using CRAM-MD5, if the mail server supports this |
66 |
.B LOGFILE |
authentication method, instead of plaintext password LOGIN. |
67 |
Log file to save filtering information and error messages. |
.Pp |
68 |
.TP |
.Nm |
69 |
.B DENY |
supports encryption of the connection with the IMAP STARTTLS extension, |
70 |
The HEADER is comprised by FIELD-NAME and FIELD-BODY, with the two seperated |
and will try to negotiate a TLS connection if the mail server supports it. |
71 |
with an optional ':' character and |
.Pp |
72 |
.B only |
.Nm |
73 |
one space. |
supports imaps (port 993) SSL/TLS connections. The user must manually enable |
74 |
|
imaps SSL/TLS connections and specify the SSL/TLS protocol to be negotiated, |
75 |
The FIELD-NAME should be one of FROM, TO, CC, BCC, SUBJECT or a user specified |
through |
76 |
header field-name. The FIELD-BODY is a string. Messages that have a header |
.Nm Ap s |
77 |
with the defined FIELD-NAME and contain the FIELD-BODY match the DENY filter |
configuration file. |
78 |
and are being deleted. The matching is case-insensitive. |
.Sh PASSWORD EDITOR |
79 |
.SH CONFIGURATION EXAMPLES |
.Nm |
80 |
See |
has the capability to encrypt the accounts' passwords and store them |
81 |
.IR sample.imapfilterrc . |
separately at |
82 |
.SH ENVIROMENT |
.Pa $HOME/.imapfilter/passwords . |
83 |
.TP |
These passwords are encrypted with a master password, supplied by |
84 |
.B HOME |
the user. The Blowfish block cipher with a 128bit key in CBC mode |
85 |
|
is used to do the encryption. The master password is entered each |
86 |
|
time |
87 |
|
.Nm |
88 |
|
is run, in order to decrypt the password file and retrieve the |
89 |
|
actual passwords of the user's IMAP mail accounts. |
90 |
|
.Pp |
91 |
|
First of all, while defining accounts in the |
92 |
|
.Nm |
93 |
|
configuration file, the user must specify only the username and server |
94 |
|
in those accounts he/she wishes to encrypt the passwords before storage. |
95 |
|
Then, one can enter the interactive passwords' editor by using the |
96 |
|
.Fl p |
97 |
|
option. |
98 |
|
.Pp |
99 |
|
After entering the interactive password editor, a command line prompt |
100 |
|
is used to manage the passwords. The available commands are: |
101 |
|
.Bl -tag -width Ds |
102 |
|
.It Cm c |
103 |
|
Clears a password from an account. It takes as an argument a |
104 |
|
number, specifying which account's password should be cleared. |
105 |
|
.It Cm e |
106 |
|
Edits an account's password entry. It takes as an argument a |
107 |
|
number, the account's password to be edited. |
108 |
|
.It Cm h |
109 |
|
Prints a brief help message of all commands. |
110 |
|
.It Cm l |
111 |
|
Lists all accounts. Specifically a number that describes the |
112 |
|
account, the hostname of the IMAP mail server, the username |
113 |
|
and the password (if one is already specified). |
114 |
|
.It Cm p |
115 |
|
Changes the master password, used to encrypt all other passwords. |
116 |
|
.It Cm q |
117 |
|
Quits the password editor without saving changes. |
118 |
|
.It Cm w |
119 |
|
Saves changes. |
120 |
|
.It Cm x |
121 |
|
Saves changes and exits the password editor. |
122 |
|
.El |
123 |
|
.Sh INTERNALS |
124 |
|
After |
125 |
|
.Nm |
126 |
|
reads the configuration file and creates all necessary data structures, it |
127 |
|
starts by going through the list of accounts. It connects to the servers |
128 |
|
specified, in the order they were defined in the configuration file with |
129 |
|
the |
130 |
|
.Ar account |
131 |
|
keyword. It then goes through the list of mailboxes belonging to the server, |
132 |
|
in the order they were defined in the configuration file with the |
133 |
|
.Ar folder |
134 |
|
keyword. For each mailbox it applies the filters that were specified for it, |
135 |
|
in the order they were defined in the configuration file using the |
136 |
|
.Ar job |
137 |
|
keyword. This process continues until the last account, mailbox and filter. |
138 |
|
.Sh ENVIRONMENT |
139 |
|
.Bl -tag -width Ds |
140 |
|
.It Ev HOME |
141 |
User's home directory. |
User's home directory. |
142 |
.SH FILES |
.El |
143 |
.TP |
.Sh FILES |
144 |
.I $HOME/.imapfilterrc |
.Bl -tag -width Ds |
145 |
|
.It Pa $HOME/.imapfilterrc |
146 |
Default configuration file. |
Default configuration file. |
147 |
.TP |
.It Pa $HOME/.imapfilter/passwords |
148 |
.I $HOME/.imapfilter_log |
File where the encrypted passwords are stored. |
149 |
Default log file. |
.It Pa $HOME/.imapfilter/certificates |
150 |
.SH CONFORMING TO |
File where the SSL/TLS certificates are stored. |
151 |
.TP |
.It Pa $HOME/.imapfilter/lock |
152 |
IMAP4rev1: |
Lock file containing the PID of |
153 |
RFC 2060 |
.Nm . |
154 |
.SH AUTHOR |
.It Pa /tmp/imapfilter.XXXX |
155 |
Lefteris Chatzibarbas <lefcha@hol.gr> |
Debug file. |
156 |
|
.El |
157 |
|
.Sh SEE ALSO |
158 |
|
.Xr imapfilterrc 5 |
159 |
|
.Sh STANDARDS |
160 |
|
.Bl -tag -width Ds |
161 |
|
.It IMAP4rev1: |
162 |
|
RFC 3501, RFC 2683, RFC 2595, RFC 2342, RFC 2195 |
163 |
|
.El |
164 |
|
.Sh AUTHORS |
165 |
|
.An Lefteris Chatzibarbas Aq lefcha@hellug.gr |