[Dovecot] sieve discard
Does the keyword/action discard work by default or is there something I have to do in the configuration to get to work... maybe I missed something on http://wiki.dovecot.org/LDA/Sieve
I have the following rule:
if anyof ( header :contains ["Subject"] ["Test Discard"] ) { discard; stop; }
but it delivers to INBOX with or w/o the "stop;". If I change the rule to
if anyof ( header :contains ["Subject"] ["Test Discard"] ) { fileinto "spam"; stop; }
the message will deliver into my spam folder which makes me think I am doing something wrong with "discard".
Using 1.0.2 sieve plug-in.
Thanks.
On Mon, 2007-07-23 at 00:52 -0400, Jim Horner wrote:
Does the keyword/action discard work by default or is there something I have to do in the configuration to get to work...
Sorry, looks like I broke this for Dovecot v1.0.2. Could you verify that this patch fixes it: http://hg.dovecot.org/dovecot-1.0/rev/be2c4dacae2c
I'll release v1.0.3 then.
On Monday 23 July 2007 01:13:37 Timo Sirainen wrote:
On Mon, 2007-07-23 at 00:52 -0400, Jim Horner wrote:
Does the keyword/action discard work by default or is there something I have to do in the configuration to get to work...
Sorry, looks like I broke this for Dovecot v1.0.2. Could you verify that this patch fixes it: http://hg.dovecot.org/dovecot-1.0/rev/be2c4dacae2c
I'll release v1.0.3 then.
appears to work...
Jul 23 13:12:29 giganta deliver(jhorner@arinbe.com): msgid=<200707231312.27879.jhorner@arinbe.com>: discarded
Timo,
Does the keyword/action discard work by default or is there something I have to do in the configuration to get to work... TS> Sorry, looks like I broke this for Dovecot v1.0.2.
Reject doesn't work for 1.0.2 too.
TS> Could you verify that TS> this patch fixes it: http://hg.dovecot.org/dovecot-1.0/rev/be2c4dacae2c TS> I'll release v1.0.3 then.
Yes it works, thank you.
p.s. I've just spent one hour trying to find out why my sieve script works so... hmm strange. Now I've got the answer. ;)
-- Eugene Gladchenko EVG15-RIPE
Hi Timo,
Timo Sirainen wrote on 23-7-2007 7:13:
On Mon, 2007-07-23 at 00:52 -0400, Jim Horner wrote:
Does the keyword/action discard work by default or is there something I have to do in the configuration to get to work...
Sorry, looks like I broke this for Dovecot v1.0.2. Could you verify that this patch fixes it: http://hg.dovecot.org/dovecot-1.0/rev/be2c4dacae2c
I'll release v1.0.3 then.
Any plans for releasing sieve 1.0.3?
I'm working on upgrading the FreeBSD port, but dont want to be caught in upgrading to an instantly old version :-)
Greets,
Nils
On Wed, 2007-08-01 at 08:25 +0200, Nils Vogels wrote:
Hi Timo,
Timo Sirainen wrote on 23-7-2007 7:13:
On Mon, 2007-07-23 at 00:52 -0400, Jim Horner wrote:
Does the keyword/action discard work by default or is there something I have to do in the configuration to get to work...
Sorry, looks like I broke this for Dovecot v1.0.2. Could you verify that this patch fixes it: http://hg.dovecot.org/dovecot-1.0/rev/be2c4dacae2c
I'll release v1.0.3 then.
Any plans for releasing sieve 1.0.3?
Since the last changes for http://hg.dovecot.org/dovecot-sieve-1.0/ are:
Added tag 1.0.2 for changeset 0afb958e7e71 Released v1.0.2.
There isn't really anything to be released as v1.0.3. :)
On Aug 1, 2007, at 6:29 AM, Timo Sirainen wrote:
Since the last changes for http://hg.dovecot.org/dovecot-sieve-1.0/
are:Added tag 1.0.2 for changeset 0afb958e7e71 Released v1.0.2.
There isn't really anything to be released as v1.0.3. :)
Timo,
This comment still remains in the dovecot-sieve "INSTALL"...
"It's also not a good idea to build the plugin against self-compiled
Dovecot sources,
but then actually use a prebuilt binary package of Dovecot. That
might work
if the Dovecot versions are the same, but it's not guaranteed."
Being a Mac System, I've ALWAYS built dovecot-sieve against self-
compiled Dovecot sources and have never had an issue with sieve (that
others also haven't had.) So maybe that comment is no longer
required? (For me, it's just confusing :-))
Thanks, B. Bodger
On Wed, 2007-08-01 at 06:51 -0400, Bruce Bodger wrote:
This comment still remains in the dovecot-sieve "INSTALL"...
"It's also not a good idea to build the plugin against self-compiled
Dovecot sources, but then actually use a prebuilt binary package of Dovecot. That
might work if the Dovecot versions are the same, but it's not guaranteed."Being a Mac System, I've ALWAYS built dovecot-sieve against self- compiled Dovecot sources and have never had an issue with sieve (that
others also haven't had.) So maybe that comment is no longer
required? (For me, it's just confusing :-))
I guess I could change "might work" -> "most likely works".
On Wed, 2007-08-01 at 14:46 +0300, Timo Sirainen wrote:
On Wed, 2007-08-01 at 06:51 -0400, Bruce Bodger wrote:
This comment still remains in the dovecot-sieve "INSTALL"...
"It's also not a good idea to build the plugin against self-compiled
Dovecot sources, but then actually use a prebuilt binary package of Dovecot. That
might work if the Dovecot versions are the same, but it's not guaranteed."Being a Mac System, I've ALWAYS built dovecot-sieve against self- compiled Dovecot sources and have never had an issue with sieve (that
others also haven't had.) So maybe that comment is no longer
required? (For me, it's just confusing :-))I guess I could change "might work" -> "most likely works".
Or I guess since this hasn't been a problem normally I could just remove it unless it becomes a common problem. Updated the text:
Use --with-dovecot=<path> to point to dovecot-config file's directory. There are two possibilities where this could exist:
If you configured Dovecot with --enable-header-install, you'll have dovecot-config installed in $prefix/lib/dovecot/ directory.
Compiled Dovecot sources' root directory.
So for example:
./configure --with-dovecot=/usr/local/lib/dovecot make sudo make install
sievec and sieved binaries are built only if you use 2) method, because they need to link with Dovecot's libraries. They can be used to compile and decompile Sieve scripts. You probably don't need these.
On Wed, Aug 01, 2007 at 03:02:38PM +0300, Timo Sirainen wrote:
Or I guess since this hasn't been a problem normally I could just remove it unless it becomes a common problem. Updated the text:
Use --with-dovecot=<path> to point to dovecot-config file's directory. There are two possibilities where this could exist:
If you configured Dovecot with --enable-header-install, you'll have dovecot-config installed in $prefix/lib/dovecot/ directory.
Compiled Dovecot sources' root directory.
So for example:
./configure --with-dovecot=/usr/local/lib/dovecot make sudo make install
sievec and sieved binaries are built only if you use 2) method, because they need to link with Dovecot's libraries. They can be used to compile and decompile Sieve scripts. You probably don't need these.
(1) is very interesting from a packager's point of view (allows me to package dovecot-sieve for pkgsrc much easier), but e.g. pysieved (the python managesieve server) needs "sievec" for verifying sieve scripts while uploading...
Geert
On Wed, 1 Aug 2007, Geert Hendrickx wrote:
On Wed, Aug 01, 2007 at 03:02:38PM +0300, Timo Sirainen wrote:
Or I guess since this hasn't been a problem normally I could just remove it unless it becomes a common problem. Updated the text:
Use --with-dovecot=<path> to point to dovecot-config file's directory. There are two possibilities where this could exist:
If you configured Dovecot with --enable-header-install, you'll have dovecot-config installed in $prefix/lib/dovecot/ directory.
Compiled Dovecot sources' root directory.
So for example:
./configure --with-dovecot=/usr/local/lib/dovecot make sudo make install
sievec and sieved binaries are built only if you use 2) method, because they need to link with Dovecot's libraries. They can be used to compile and decompile Sieve scripts. You probably don't need these.
(1) is very interesting from a packager's point of view (allows me to package dovecot-sieve for pkgsrc much easier), but e.g. pysieved (the python managesieve server) needs "sievec" for verifying sieve scripts while uploading...
I do not know what OS you are packaging for but if you are looking for rpms, fedora has released rpms that include seive in the same srpm as dovecot. I took their .src.rpm and rebuilt it on EL4/Centos4 and it spit out seperate dovecot and sieve binary rpms that so far work as advertised, at least for me.
Regards,
-- Tom Diehl tdiehl@rogueind.com Spamtrap address mtd123@rogueind.com
On Wed, Aug 01, 2007 at 10:52:18AM -0400, Tom Diehl wrote:
I do not know what OS you are packaging for but if you are looking for rpms, fedora has released rpms that include seive in the same srpm as dovecot. I took their .src.rpm and rebuilt it on EL4/Centos4 and it spit out seperate dovecot and sieve binary rpms that so far work as advertised, at least for me.
This is for pkgsrc (cross-platform, mainly NetBSD and Dragonfly BSD), which (currently) doesn't support creating multiple binary (sub-)packages from a single source package.
But I can include the headers in the main dovecot package and have a sieve package depending on that (without sievec/sieved, but that's better than having no sieve package at all).
Geert
On Wed, Aug 01, 2007 at 03:02:38PM +0300, Timo Sirainen wrote:
sievec and sieved binaries are built only if you use 2) method, because they need to link with Dovecot's libraries. They can be used to compile and decompile Sieve scripts. You probably don't need these.
According to the Makefile, they only need liblib.a to build. Can't this file be installed as well with --enable-header-install (you may want to rename this flag then), so that dovecot-sieve can fully be built against an installed dovecot package?
Geert
On Wed, Aug 01, 2007 at 10:17:32PM +0200, Geert Hendrickx wrote:
On Wed, Aug 01, 2007 at 03:02:38PM +0300, Timo Sirainen wrote:
sievec and sieved binaries are built only if you use 2) method, because they need to link with Dovecot's libraries. They can be used to compile and decompile Sieve scripts. You probably don't need these.
According to the Makefile, they only need liblib.a to build. Can't this file be installed as well with --enable-header-install (you may want to rename this flag then), so that dovecot-sieve can fully be built against an installed dovecot package?
If dovecot with --enable-header-install installs liblib.a in the same dir as dovecot-config, the following patch for dovecot-sieve makes this work: --- src/libsieve/Makefile.in.orig 2007-07-20 10:19:20.000000000 +0200 +++ src/libsieve/Makefile.in 2007-08-02 09:54:11.000000000 +0200 @@ -38,8 +38,8 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@HAVE_DOVECOT_LIBS_TRUE@pkglibexec_PROGRAMS = sievec$(EXEEXT) \ -@HAVE_DOVECOT_LIBS_TRUE@ sieved$(EXEEXT) +pkglibexec_PROGRAMS = sievec$(EXEEXT) \ + sieved$(EXEEXT) subdir = src/libsieve DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in AUTHORS COPYING ChangeLog NEWS \ @@ -62,17 +62,21 @@ pkglibexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(pkglibexec_PROGRAMS) am__sievec_SOURCES_DIST = sievec.c ../map.c ../imparse.c -@HAVE_DOVECOT_LIBS_TRUE@am_sievec_OBJECTS = sievec.$(OBJEXT) \ -@HAVE_DOVECOT_LIBS_TRUE@ map.$(OBJEXT) imparse.$(OBJEXT) +am_sievec_OBJECTS = sievec.$(OBJEXT) \ + map.$(OBJEXT) imparse.$(OBJEXT) sievec_OBJECTS = $(am_sievec_OBJECTS) @HAVE_DOVECOT_LIBS_TRUE@sievec_DEPENDENCIES = libsieve.la \ @HAVE_DOVECOT_LIBS_TRUE@ $(dovecotdir)/src/lib/liblib.a +@HAVE_DOVECOT_LIBS_FALSE@sievec_DEPENDENCIES = libsieve.la \ +@HAVE_DOVECOT_LIBS_FALSE@ $(dovecotdir)/liblib.a am__sieved_SOURCES_DIST = sieved.c ../map.c -@HAVE_DOVECOT_LIBS_TRUE@am_sieved_OBJECTS = sieved.$(OBJEXT) \ -@HAVE_DOVECOT_LIBS_TRUE@ map.$(OBJEXT) +am_sieved_OBJECTS = sieved.$(OBJEXT) \ + map.$(OBJEXT) sieved_OBJECTS = $(am_sieved_OBJECTS) @HAVE_DOVECOT_LIBS_TRUE@sieved_DEPENDENCIES = libsieve.la \ @HAVE_DOVECOT_LIBS_TRUE@ $(dovecotdir)/src/lib/liblib.a +@HAVE_DOVECOT_LIBS_FALSE@sieved_DEPENDENCIES = libsieve.la \ +@HAVE_DOVECOT_LIBS_FALSE@ $(dovecotdir)/liblib.a DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -266,10 +270,16 @@ @HAVE_DOVECOT_LIBS_TRUE@sievec_LDADD = \ @HAVE_DOVECOT_LIBS_TRUE@ libsieve.la \ @HAVE_DOVECOT_LIBS_TRUE@ $(dovecotdir)/src/lib/liblib.a +@HAVE_DOVECOT_LIBS_FALSE@sievec_LDADD = \ +@HAVE_DOVECOT_LIBS_FALSE@ libsieve.la \ +@HAVE_DOVECOT_LIBS_FALSE@ $(dovecotdir)/liblib.a @HAVE_DOVECOT_LIBS_TRUE@sieved_LDADD = \ @HAVE_DOVECOT_LIBS_TRUE@ libsieve.la \ @HAVE_DOVECOT_LIBS_TRUE@ $(dovecotdir)/src/lib/liblib.a +@HAVE_DOVECOT_LIBS_FALSE@sieved_LDADD = \ +@HAVE_DOVECOT_LIBS_FALSE@ libsieve.la \ +@HAVE_DOVECOT_LIBS_FALSE@ $(dovecotdir)/liblib.a @HAVE_DOVECOT_LIBS_FALSE@notbuilt_sources = sievec.c sieved.c @HAVE_DOVECOT_LIBS_TRUE@notbuilt_sources = This means a complete dovecot-sieve package (including sievec and sieved) can be compiled against either a built dovecot sourcetree or an installed dovecot package with --enable-header-install. I guess this will not be included in 1.0.x, but if it can be included in 1.1.x, I can add the patch to the pkgsrc package for now. Geert
Timo, is this ok with you? It allows building dovecot-sieve against an installed dovecot package (if --enable-header-install additionally installs liblib.a) including sievec and sieved (needed for pysieved). Geert On Thu, Aug 02, 2007 at 10:11:38AM +0200, Geert Hendrickx wrote:
On Wed, Aug 01, 2007 at 10:17:32PM +0200, Geert Hendrickx wrote:
On Wed, Aug 01, 2007 at 03:02:38PM +0300, Timo Sirainen wrote:
sievec and sieved binaries are built only if you use 2) method, because they need to link with Dovecot's libraries. They can be used to compile and decompile Sieve scripts. You probably don't need these.
According to the Makefile, they only need liblib.a to build. Can't this file be installed as well with --enable-header-install (you may want to rename this flag then), so that dovecot-sieve can fully be built against an installed dovecot package?
If dovecot with --enable-header-install installs liblib.a in the same dir as dovecot-config, the following patch for dovecot-sieve makes this work:
--- src/libsieve/Makefile.in.orig 2007-07-20 10:19:20.000000000 +0200 +++ src/libsieve/Makefile.in 2007-08-02 09:54:11.000000000 +0200 @@ -38,8 +38,8 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -@HAVE_DOVECOT_LIBS_TRUE@pkglibexec_PROGRAMS = sievec$(EXEEXT) \ -@HAVE_DOVECOT_LIBS_TRUE@ sieved$(EXEEXT) +pkglibexec_PROGRAMS = sievec$(EXEEXT) \ + sieved$(EXEEXT) subdir = src/libsieve DIST_COMMON = README $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in AUTHORS COPYING ChangeLog NEWS \ @@ -62,17 +62,21 @@ pkglibexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(pkglibexec_PROGRAMS) am__sievec_SOURCES_DIST = sievec.c ../map.c ../imparse.c -@HAVE_DOVECOT_LIBS_TRUE@am_sievec_OBJECTS = sievec.$(OBJEXT) \ -@HAVE_DOVECOT_LIBS_TRUE@ map.$(OBJEXT) imparse.$(OBJEXT) +am_sievec_OBJECTS = sievec.$(OBJEXT) \ + map.$(OBJEXT) imparse.$(OBJEXT) sievec_OBJECTS = $(am_sievec_OBJECTS) @HAVE_DOVECOT_LIBS_TRUE@sievec_DEPENDENCIES = libsieve.la \ @HAVE_DOVECOT_LIBS_TRUE@ $(dovecotdir)/src/lib/liblib.a +@HAVE_DOVECOT_LIBS_FALSE@sievec_DEPENDENCIES = libsieve.la \ +@HAVE_DOVECOT_LIBS_FALSE@ $(dovecotdir)/liblib.a am__sieved_SOURCES_DIST = sieved.c ../map.c -@HAVE_DOVECOT_LIBS_TRUE@am_sieved_OBJECTS = sieved.$(OBJEXT) \ -@HAVE_DOVECOT_LIBS_TRUE@ map.$(OBJEXT) +am_sieved_OBJECTS = sieved.$(OBJEXT) \ + map.$(OBJEXT) sieved_OBJECTS = $(am_sieved_OBJECTS) @HAVE_DOVECOT_LIBS_TRUE@sieved_DEPENDENCIES = libsieve.la \ @HAVE_DOVECOT_LIBS_TRUE@ $(dovecotdir)/src/lib/liblib.a +@HAVE_DOVECOT_LIBS_FALSE@sieved_DEPENDENCIES = libsieve.la \ +@HAVE_DOVECOT_LIBS_FALSE@ $(dovecotdir)/liblib.a DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -266,10 +270,16 @@ @HAVE_DOVECOT_LIBS_TRUE@sievec_LDADD = \ @HAVE_DOVECOT_LIBS_TRUE@ libsieve.la \ @HAVE_DOVECOT_LIBS_TRUE@ $(dovecotdir)/src/lib/liblib.a +@HAVE_DOVECOT_LIBS_FALSE@sievec_LDADD = \ +@HAVE_DOVECOT_LIBS_FALSE@ libsieve.la \ +@HAVE_DOVECOT_LIBS_FALSE@ $(dovecotdir)/liblib.a
@HAVE_DOVECOT_LIBS_TRUE@sieved_LDADD = \ @HAVE_DOVECOT_LIBS_TRUE@ libsieve.la \ @HAVE_DOVECOT_LIBS_TRUE@ $(dovecotdir)/src/lib/liblib.a +@HAVE_DOVECOT_LIBS_FALSE@sieved_LDADD = \ +@HAVE_DOVECOT_LIBS_FALSE@ libsieve.la \ +@HAVE_DOVECOT_LIBS_FALSE@ $(dovecotdir)/liblib.a
@HAVE_DOVECOT_LIBS_FALSE@notbuilt_sources = sievec.c sieved.c @HAVE_DOVECOT_LIBS_TRUE@notbuilt_sources =
This means a complete dovecot-sieve package (including sievec and sieved) can be compiled against either a built dovecot sourcetree or an installed dovecot package with --enable-header-install.
I guess this will not be included in 1.0.x, but if it can be included in 1.1.x, I can add the patch to the pkgsrc package for now.
Geert
On Thu, 2007-08-09 at 10:33 +0200, Geert Hendrickx wrote:
Timo,
is this ok with you? It allows building dovecot-sieve against an installed dovecot package (if --enable-header-install additionally installs liblib.a) including sievec and sieved (needed for pysieved).
I don't really like that idea. The next thing another package wants some other Dovecot libraries and soon we'll have all the .a libs installed somewhere.
I've been thinking about making liblib a separate .so library. And maybe the other Dovecot libs a libdovecot_mail.so. But I'm not sure if this is such a great idea either.
On Thu, Aug 09, 2007 at 01:49:32PM +0300, Timo Sirainen wrote:
I don't really like that idea. The next thing another package wants some other Dovecot libraries and soon we'll have all the .a libs installed somewhere.
liblib.a would be installed with --enable-header-install only, so for users who want to build _something_ upon Dovecot. :-)
And about those "other packages", dovecot-sieve is the most popular, if not the only, dovecot add-on at this moment, so the exception would be justified. :-)
Geert
I've been thinking about making liblib a separate .so library. And maybe the other Dovecot libs a libdovecot_mail.so. But I'm not sure if this is such a great idea either.
Timo Sirainen escribió:
On Thu, 2007-08-09 at 10:33 +0200, Geert Hendrickx wrote:
Timo,
is this ok with you? It allows building dovecot-sieve against an installed dovecot package (if --enable-header-install additionally installs liblib.a) including sievec and sieved (needed for pysieved).
I don't really like that idea. The next thing another package wants some other Dovecot libraries and soon we'll have all the .a libs installed somewhere.
To solve this once and for all (and make packagers' life easier), it'd be better getting dovecot-sieve build without the --with-dovecot option, and using the usual --includedir, --libdir and maybe a --with-dovecot-config one.
That way you can package all the .a (which are already installed to --prefix) and includes in a -devel package where you can point dovecot-sieve or any other plugin without playing scripting games while building packages.
Regards,
Angel Marin http://anmar.eu.org/
Jim,
July 23, 2007, Jim Horner wrote:
JH> Does the keyword/action discard work by default or is there something I have JH> to do in the configuration to get to work... maybe I missed something on JH> http://wiki.dovecot.org/LDA/Sieve JH> I have the following rule: JH> if anyof ( JH> header :contains ["Subject"] ["Test Discard"] JH> ) { JH> discard; JH> stop; JH> } JH> but it delivers to INBOX with or w/o the "stop;". JH> Using 1.0.2 sieve plug-in.
I remember it was fixed in 1.0.3 but I've got dovecot-sieve-1.1.5_1 and dovecot-1.1.3 (FreeBSD) right now and it seems to me I've encountered the similar problem.
My .dovecot.sieve is like the following:
# Reject all mail to webmaster@example.net if header :matches ["To", "Cc", "Bcc", "Reply-To", "In-Reply-To"] ["webmaster@example.net"] { discard; stop; }
I don't need e-mail spammers send to my webmaster@example.net and the above rules really discard the messages that I send to webmaster@example.net myself, see:
deliver(eugene): Sep 19 02:17:05 Info: cmusieve: Using sieve path: /home/eugene/.dovecot.sieve deliver(eugene): Sep 19 02:17:05 Info: cmusieve: Executing script /home/eugene/.dovecot.sievec deliver(eugene): Sep 19 02:17:05 Info: msgid=<367302207.20080919004558@example.net>: discarded
But spammers bypass the sieve with ease. I can see messages having the line "To: webmaster@example.net" in the header and still getting into my inbox though:
deliver(eugene): Sep 19 01:45:19 Info: cmusieve: Using sieve path: /home/eugene/.dovecot.sieve deliver(eugene): Sep 19 01:45:19 Info: cmusieve: Executing script /home/eugene/.dovecot.sievec deliver(eugene): Sep 19 01:45:19 Info: msgid=<01c919ad$ec09ed80$6c589fbe@|andreas>: saved mail to INBOX
Am I doing something wrong?
-- Eugene Gladchenko EVG15-RIPE
July 23, 2007, Jim Horner wrote:
wow a year ago...
I remember it was fixed in 1.0.3 but I've got dovecot-sieve-1.1.5_1 and
I'm still using the 1.0 series. But your sieve script looks fine to me. I usually use
if anyof ( address :contains ["to", "cc"] ["blah@foo.com"], address :contains ["to", "cc"] ["blahblah@foo.com"] ) { discard; stop; }
I seem to think I have encountered a similar problem where the Bcc header never exists so people who BCC'd, in your case webmaster, never got caught. This is easily tested. Anyway, I think I ended up creating a user, called webmaster and had a sieve script in webmaster's home directory forward everything to jhorner+webmaster. That way I could catch everything. Or I pushed it further upstream to postfix and made webmaster an alias which forwards to jhorner+webmaster, either way.
There are a lot of smart people on this list. Hopefully one will provide an answer a bit more useful.
Jim
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Fri, 19 Sep 2008, Eugene Gladchenko wrote:
if header :matches
Do you use regex's, if not :contains or :is may work, too, with less ressources.
["To", "Cc", "Bcc", "Reply-To", "In-Reply-To"] ["webmaster@example.net"] {
discard; stop; }
Do you have the headers of a mail, that got discarded, and and those, that did not?
Are there other rules above this one? I've seen someone adding something like a "*" wildcard in his whitelist ;-)
Bye,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFI00igVJMDrex4hCIRAhYcAJsEnO6jaMVBAjmp0reLK4ohofzN/ACfX99Z ElcjiGunkkIgp4pxt1TkgE4= =IIoo -----END PGP SIGNATURE-----
Steffen,
if header :matches
SK> Do you use regex's, if not :contains or :is may work, too, with less SK> ressources.
["To", "Cc", "Bcc", "Reply-To", "In-Reply-To"] ["webmaster@example.net"] {
discard; stop; }
SK> Do you have the headers of a mail, that got discarded, and and those, that SK> did not?
I think I managed to solve the problem, thanks to Steffen.
It turned out that "webmaster@example.net" :matches "webmaster@example.net" but "<webmaster@example.net>" does not.
In my tests, I always sent messages to webmaster@example.net address. But spammers used to use angle brackets so it fooled the script.
Now the sieve script looks as follows and it works:
if address :is :all ["To", "Cc", "Bcc", "Reply-To"] ["webmaster@example.net"] { discard; }
-- Eugene Gladchenko EVG15-RIPE
participants (9)
-
Angel Marin
-
Bruce Bodger
-
Eugene Gladchenko
-
Geert Hendrickx
-
Jim Horner
-
Nils Vogels
-
Steffen Kaiser
-
Timo Sirainen
-
Tom Diehl