confparser-old
15 years agoCache the file only if not yet cached !
Frederic Jolliton [Wed, 9 Mar 2005 14:14:56 +0000 (14:14 +0000)]
Cache the file only if not yet cached !

git-archimport-id: frederic@jolliton.com--2005-private/confparser--main--0.1--patch-8

15 years agoTypo.
Frederic Jolliton [Wed, 9 Mar 2005 14:06:56 +0000 (14:06 +0000)]
Typo.

git-archimport-id: frederic@jolliton.com--2005-private/confparser--main--0.1--patch-7

15 years agoAdded integer support (in addition to string.)
Frederic Jolliton [Wed, 9 Mar 2005 14:05:44 +0000 (14:05 +0000)]
Added integer support (in addition to string.)

git-archimport-id: frederic@jolliton.com--2005-private/confparser--main--0.1--patch-6

15 years agoOOPS. Need to use 'validate' instead of old name 'checkConf'.
Frederic Jolliton [Wed, 9 Mar 2005 11:49:37 +0000 (11:49 +0000)]
OOPS. Need to use 'validate' instead of old name 'checkConf'.

git-archimport-id: frederic@jolliton.com--2005-private/confparser--main--0.1--patch-5

15 years agoAdded an install script.
Frederic Jolliton [Wed, 9 Mar 2005 11:23:08 +0000 (11:23 +0000)]
Added an install script.

git-archimport-id: frederic@jolliton.com--2005-private/confparser--main--0.1--patch-4

15 years agoMore cleaning. Added string comments. Removed remaining mailfilter stuff.
Frederic Jolliton [Mon, 7 Mar 2005 09:42:29 +0000 (09:42 +0000)]
More cleaning. Added string comments. Removed remaining mailfilter stuff.

git-archimport-id: frederic@jolliton.com--2005-private/confparser--main--0.1--patch-3

15 years agoCleaning. Added copyright notices.
Frederic Jolliton [Mon, 7 Mar 2005 08:39:34 +0000 (08:39 +0000)]
Cleaning. Added copyright notices.

git-archimport-id: frederic@jolliton.com--2005-private/confparser--main--0.1--patch-2

15 years agoStripping project to just confparser stuff.
Frederic Jolliton [Mon, 7 Mar 2005 08:34:40 +0000 (08:34 +0000)]
Stripping project to just confparser stuff.

git-archimport-id: frederic@jolliton.com--2005-private/confparser--main--0.1--patch-1

15 years agoTypo fixes in README and install.sh frederic@jolliton.com--2005-private,confparser--main--0.1--base-0
Frederic Jolliton [Wed, 5 Jan 2005 20:03:47 +0000 (20:03 +0000)]
Typo fixes in README and install.sh

git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1.2--patch-7

15 years agoIn broken test, consider header with unknown charset as valid.
Frederic Jolliton [Sun, 21 Nov 2004 12:47:02 +0000 (12:47 +0000)]
In broken test, consider header with unknown charset as valid.

* In isMailBroken, we consider header with unknown charset as valid.
  This is because, Python may don't know some encoding and we don't
  want the script to tag the mail as broken is this case.

git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1.2--patch-6

15 years agoBetter log message for broken headers.
Frederic Jolliton [Fri, 19 Nov 2004 09:26:57 +0000 (09:26 +0000)]
Better log message for broken headers.

* Output for broken headers changed to log at most
  a predefined quantity of header, and to remove the ''
  around the names.
git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1.2--patch-5

15 years agoBroken test now check if headers are correctly encoded.
Frederic Jolliton [Fri, 19 Nov 2004 09:08:25 +0000 (09:08 +0000)]
Broken test now check if headers are correctly encoded.

* 'broken' test, in addition to testing that the mail was
  correctly parsed by email python module, now also test
  that every header can be decoded correctly (that mean
  that for example, a subject header with 8 bits contents
  will be marked as broken.)
git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1.2--patch-4

15 years agoFix exception in virus scan.
Frederic Jolliton [Thu, 18 Nov 2004 05:19:28 +0000 (05:19 +0000)]
Fix exception in virus scan.

* IMPORTANT: We catch exception derived from Exception, but antivirusScan was
  throwing a string exception. That caused global try/catch to miss that, and
  let sendmail believe than the mail was correctly delivered.

* confparser.readConfiguration now return None if rule file doesn't exist.

* Removed log for absence of rule (either because the user file doesn't exist,
  or because no rule are defined inside it.)
git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1.2--patch-3

15 years agoAdded support to test if a particular header is present or not.
Frederic Jolliton [Wed, 17 Nov 2004 14:19:55 +0000 (14:19 +0000)]
Added support to test if a particular header is present or not.

* The 'present' match was added to test if a header is present
  in mail or not.

git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1.2--patch-2

15 years agoFixed parser for one letter keyword.
Frederic Jolliton [Wed, 17 Nov 2004 14:16:44 +0000 (14:16 +0000)]
Fixed parser for one letter keyword.

* Fixed regex in confparser.py. Otherwise, keyword
  with only one letter were not recognized.

git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1.2--patch-1

15 years agoSealing. frederic@jolliton.com--2004-private,mail-filter--main--0.1.2--base-0
Frederic Jolliton [Sun, 14 Nov 2004 20:55:41 +0000 (20:55 +0000)]
Sealing.

git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1.1--version-0

15 years agoUpdated the CREATING-RULES file.
Frederic Jolliton [Thu, 11 Nov 2004 16:42:33 +0000 (16:42 +0000)]
Updated the CREATING-RULES file.

* Added a short explanation about partial match in headers.
git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1.1--patch-6

15 years agoFixed bug in message about custom error code.
Frederic Jolliton [Thu, 11 Nov 2004 15:01:53 +0000 (15:01 +0000)]
Fixed bug in message about custom error code.

* Fixed the bug when generating the log for the case were we
  return a custom error code.
git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1.1--patch-5

15 years agoAdded '.user' partial match.
Frederic Jolliton [Thu, 11 Nov 2004 14:46:59 +0000 (14:46 +0000)]
Added '.user' partial match.

* Added '.user' partial match, to match against
  the part before the @ in email address.
git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1.1--patch-4

15 years ago'all' match added. Better header parsing. Behavior of test mode change.
Frederic Jolliton [Thu, 11 Nov 2004 14:33:01 +0000 (14:33 +0000)]
'all' match added. Better header parsing. Behavior of test mode change.

* Added 'all' match. It's always matching any mail.
  It allow catchall rule.
* Better header parsing. Headers were not normalized for blank
  when using a partial match (.domain/.address/.name). Part
  name '.raw' added ('from.raw' is equivalent to 'from'.)
* Test mode behavior changed. Now, it list summary of matching
  rules.
* Fixed a bug on the output when checking a configuration (with -c).
git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1.1--patch-3

15 years agoAdded --version option. Added install.sh.
Frederic Jolliton [Thu, 11 Nov 2004 12:26:54 +0000 (12:26 +0000)]
Added --version option. Added install.sh.

* Added --version option.
* Added install.sh to install mail.filter.
* Makefile now just call install.sh for rule 'install'
  (and copying mailfilter.py was missing from the previous Makefile.)
git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1.1--patch-2

15 years agoEnhanced matches for headers. Better header parsing.
Frederic Jolliton [Thu, 11 Nov 2004 11:33:20 +0000 (11:33 +0000)]
Enhanced matches for headers. Better header parsing.

* Enhanced matches for headers by adding the following
  support for the suffixes .name, .address and .domain
  to header name (e.g 'From.domain' to match domain part.)
* Better header parsing, by using email.Header.decode_header
  and building a unicode string from the value returned.
  (i.e to support for example '=?iso-8859-1?q?...'.)
git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1.1--patch-1

15 years agoSealing. frederic@jolliton.com--2004-private,mail-filter--main--0.1.1--base-0
Frederic Jolliton [Mon, 1 Nov 2004 02:29:07 +0000 (02:29 +0000)]
Sealing.

git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1--version-0

15 years agoImportant bug preventing the use of rules.
Frederic Jolliton [Mon, 1 Nov 2004 01:45:59 +0000 (01:45 +0000)]
Important bug preventing the use of rules.

* 'return conf' was missing from readConfiguration !
* Path to Cyrus deliver binary changed to reflect
  the location on this command on Gentoo system with
  Cyrus 2.2.
git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1--patch-8

15 years agoAdded --disable-backup option.
Frederic Jolliton [Mon, 1 Nov 2004 01:19:06 +0000 (01:19 +0000)]
Added --disable-backup option.

git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1--patch-7

15 years agoBugfix related to exception in process()
Frederic Jolliton [Mon, 1 Nov 2004 00:56:43 +0000 (00:56 +0000)]
Bugfix related to exception in process()

* The try/except was catching SystemExit exception, which what
  wrong.
git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1--patch-6

15 years agoAdded a Makefile with clean/install
Frederic Jolliton [Sun, 31 Oct 2004 04:38:57 +0000 (04:38 +0000)]
Added a Makefile with clean/install

git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1--patch-5

15 years agoAdded a README and CREATING-RULES file
Frederic Jolliton [Sun, 31 Oct 2004 04:26:47 +0000 (04:26 +0000)]
Added a README and CREATING-RULES file

* Added a README file with installation instruction
* Added a CREATING-RULES file with instruction to
  create rules configuration file.
git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1--patch-4

15 years agoChanges related to logs and error handling.
Frederic Jolliton [Sat, 30 Oct 2004 22:53:29 +0000 (22:53 +0000)]
Changes related to logs and error handling.

git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1--patch-3

15 years agoMajor changes for reading/parsing/validating configuration files.
Frederic Jolliton [Sat, 30 Oct 2004 22:25:21 +0000 (22:25 +0000)]
Major changes for reading/parsing/validating configuration files.

* Split validator into 2 parts:
  - basicvalidator, for the core part,
  - confparser, mail.filter specific part.
* Split parser into 2 parts:
  - basicparser, for the core part,
  - confparser, mail.filter specific part.
* confparser now cache parser result for faster processing.
* And some minor changes and bugfixes.
git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1--patch-2

15 years agoLot of untested changes.
Frederic Jolliton [Fri, 29 Oct 2004 21:39:33 +0000 (21:39 +0000)]
Lot of untested changes.

* Many changes.
git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1--patch-1

16 years agoInitital import of mail-filter frederic@jolliton.com--2004-private,mail-filter--main--0.1--base-0
Frederic Jolliton [Thu, 28 Oct 2004 06:55:48 +0000 (06:55 +0000)]
Initital import of mail-filter

This is the inital import of mail-filter project. At this
point the filter should not be used in production !
git-archimport-id: frederic@jolliton.com--2004-private/mail-filter--main--0.1--base-0