Re: [courier-users] Courier::Filter 0.16

2005-01-27 Thread Gordon Messmer
Sam Varshavchik wrote:
I think that ctlfile should be opened for append mode.
...capital idea.  Am I wrong to assume that all of the calls to open() 
in the openctl() function should have the same flags?


--- courier/submit2.C.orig  Wed Jan 26 18:38:43 2005
+++ courier/submit2.C   Wed Jan 26 18:42:17 2005
@@ -309,7 +309,7 @@
current_submit_file=this;
 
int nfd=open(filename,
-O_WRONLY | O_TRUNC | O_CREAT | O_EXCL,
+O_WRONLY | O_TRUNC | O_CREAT | O_EXCL | 
O_APPEND,
 PERMISSION);
 
if (nfd = 0)
@@ -349,7 +349,7 @@
if (w == -1  errno == ECHILD) break;
 
int nfd=open(filename,
-O_WRONLY | O_TRUNC | O_CREAT,
+O_WRONLY | O_TRUNC | O_CREAT | O_EXCL | 
O_APPEND,
 PERMISSION);
 
if (nfd = 0)
@@ -362,7 +362,7 @@
filename=namefile(C, num_control_files_created);
 
int nfd=open(filename,
-O_WRONLY | O_TRUNC | O_CREAT,
+O_WRONLY | O_TRUNC | O_CREAT | O_EXCL | O_APPEND,
 PERMISSION);
 
if (nfd = 0)


Re: [courier-users] Courier::Filter 0.16

2005-01-26 Thread Gordon Messmer
Sam Varshavchik wrote:
It's always safe to append more stuff to the control file.  Whether it's 
safe to rewrite it from scratch is something I need to think about.
At the time submit calls run_filter, that's not true.  ctlfile is open 
and the write pointer will indicate the end of the file.  If a filter 
adds data to the control file, that pointer does not change, so anything 
that submit writes to the file will overwrite the records that were 
added by the filter.

I've tried calling closectl() and openctl(), but that causes submit to 
create a new control file, which is messy (and may crash submit; 
submitting a new message didn't work and I didn't spend a lot of time 
tracking down the problem I'd created).

ctlfile doesn't seem to support a seekp() method that can jump to the 
end of the file.

Do you have any suggestions regarding what sort of change you'd be most 
willing to accept which would allow me to make changes to the ctlfile 
from a filter program?

---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag--drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Courier::Filter 0.16

2005-01-26 Thread Gordon Messmer
Gordon Messmer wrote:
ctlfile doesn't seem to support a seekp() method that can jump to the 
end of the file.
Attached is a patch which adds and uses such a method.  I can now modify 
the control file from a courierfilter without corrupting the file.
diff -ru courier-0.48.2.orig/afx/afx.h courier-0.48.2/afx/afx.h
--- courier-0.48.2.orig/afx/afx.h	2001-08-07 17:53:30.0 -0700
+++ courier-0.48.2/afx/afx.h	2005-01-26 11:18:46.019909831 -0800
@@ -375,6 +375,7 @@
 	void close();
 	void seekg(std::streampos);
 	void seekp(std::streampos);
+	void seekp(std::streamoff off, std::ios::seekdir dir);
 	int handle() { return (fd); }
 	void handle(int f);
 	int sync();
@@ -392,6 +393,7 @@
 	void close() { fd_.close(); }
 	void seekg(std::streampos p) { fd_.seekg(p); }
 	void seekp(std::streampos p) { fd_.seekp(p); }
+	void seekp(std::streamoff off, std::ios::seekdir dir) { fd_.seekp(off, dir); }
 	int fd() { return (fd_.handle()); }
 	void fd(int f) { fd_.handle(f); }
 	void sync() { fd_.sync(); }
@@ -405,6 +407,7 @@
 	void close() { fd_.close(); }
 	void seekg(std::streampos p) { fd_.seekg(p); }
 	void seekp(std::streampos p) { fd_.seekp(p); }
+	void seekp(std::streamoff off, std::ios::seekdir dir) { fd_.seekp(off, dir); }
 	int fd() { return (fd_.handle()); }
 	void fd(int f) { fd_.handle(f); }
 	void sync() { fd_.sync(); }
@@ -418,6 +421,7 @@
 	void close() { fd_.close(); }
 	void seekg(std::streampos p) { fd_.seekg(p); }
 	void seekp(std::streampos p) { fd_.seekp(p); }
+	void seekp(std::streamoff off, std::ios::seekdir dir) { fd_.seekp(off, dir); }
 	int fd() { return (fd_.handle()); }
 	void fd(int f) { fd_.handle(f); }
 	void sync() { fd_.sync(); }
diff -ru courier-0.48.2.orig/afx/afxpipe.C courier-0.48.2/afx/afxpipe.C
--- courier-0.48.2.orig/afx/afxpipe.C	2001-08-05 13:00:33.0 -0700
+++ courier-0.48.2/afx/afxpipe.C	2005-01-26 11:19:40.829108003 -0800
@@ -56,6 +56,17 @@
 		setg(buffer, buffer+sizeof(buffer), buffer+sizeof(buffer));
 }
 
+void afxpipestreambuf::seekp(std::streamoff off, std::ios::seekdir dir)
+{
+	if (sync())
+		return;
+
+	if (lseek(fd, off, dir)  0  iosp)
+		iosp-setstate(std::ios::badbit);
+	else
+		setg(buffer, buffer+sizeof(buffer), buffer+sizeof(buffer));
+}
+
 int afxpipestreambuf::sync()
 {
 	if (fd  0)
diff -ru courier-0.48.2.orig/courier/submit2.C courier-0.48.2/courier/submit2.C
--- courier-0.48.2.orig/courier/submit2.C	2005-01-26 10:03:49.318271000 -0800
+++ courier-0.48.2/courier/submit2.C	2005-01-26 11:24:10.878229077 -0800
@@ -945,6 +945,9 @@
 		   SubmitFile::get_msgid_for_filtering, voidp))
 		return (1);
 
+	/* seek to end of file in case file was modified. */
+	ctlfile.seekp(0, std::ios::end);
+
 	if (!mime || strcmp(mime, none))
 	{
 		if (mime  strcmp(mime, 7bit) == 0)


Re: [courier-users] Courier::Filter 0.16

2005-01-26 Thread Sam Varshavchik
Gordon Messmer writes:
Sam Varshavchik wrote:
It's always safe to append more stuff to the control file.  Whether it's 
safe to rewrite it from scratch is something I need to think about.
At the time submit calls run_filter, that's not true.  ctlfile is open 
and the write pointer will indicate the end of the file.  If a filter 
adds data to the control file, that pointer does not change, so anything 
that submit writes to the file will overwrite the records that were 
added by the filter.
I think that ctlfile should be opened for append mode.


pgpkZRb6Q29IC.pgp
Description: PGP signature


RE: [courier-users] Courier::Filter 0.16

2005-01-24 Thread Julian Mehnle
Mark Bucciarelli wrote:
 [taking off list, as I think I have borked my setup.]

No, unfortunately this is a general issue with IO::InnerFile.  See below.

 Julian Mehnle wrote:
  Try 0.11 as soon as it appears
  on CPAN (which should be within the next few hours).
 
 That got me futher, but I'm still having some trouble.
 
 Jan 24 08:27:48 dev courierfilter: Starting pureperlfilter
 Jan 24 08:28:08 dev courieresmtpd: started,ip=[::: ...]
 Jan 24 08:28:09 dev courierfilter: Courier::Filter::Module::ClamAVd: 
 MIME::Parser: can't seek: Bad file descriptor at
   /usr/local/share/perl/5.8.4/MIME/Parser.pm line 790, GEN3 line 38.
 Jan 24 08:28:09 dev courierfilter: Rejected message sent from [EMAIL 
 PROTECTED] to [EMAIL PROTECTED] through::: ... (host-...)
 Jan 24 08:28:09 dev courierfilter: Reason: Mail filters temporarily
 unavailable. 
 
 Running install Courier::Filter completes cleanly in CPAN.

The problem is that IO::InnerFile, which is used by MIME::Parser, does not
return true on success.  Old versions of MIME::Parser (up to 5.413) did
not care about that.

(
  Detailed explanation:

  The MIME-tools and IO-stringy packages were initially written and
  maintained by the same author who now has not been maintaining his CPAN
  packages for over three years.  MIME-tools has since been taken over by
  a new maintainer, and starting with version 5.414, MIME::Parser checks
  the result of the seek() call and thus always fails when working with
  IO::InnerFile.

  I filed a bug report on IO::InnerFile[1] a while ago, but nothing has
  happened so far.  I am trying to resolve the issue with MIME-tools' new
  maintainer and IO-stringy's current maintainer.
)

Now what all this essentially means is that either a version of
MIME-tools/MIME::Parser = 5.413 must be installed on the system, or the
installed version of IO::InnerFile must be patched manually until a fixed
version is officially available.  You can get the patch here[2].

References:
 1. http://rt.cpan.org/NoAuth/Bug.html?id=8605
 2. http://files.mehnle.net/software/perl/io-innerfile-seek-return-value.diff



---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag--drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


RE: [courier-users] Courier::Filter 0.16

2005-01-21 Thread Julian Mehnle
Mark Bucciarelli [EMAIL PROTECTED] wrote:
 On Tuesday 18 January 2005 15:03, Julian Mehnle wrote:
* Added the ClamAVd filter module for malware filtering using a
  ClamAV `clamd` dameon.

 Looks like this modules required ClamAV::Client?  I was not able to
 retrieve it using CPAN.

 Below is the tail end of the cpan install ClamAV::Client output--any
 pointers?

 Removing previously used /root/.cpan/build/ClamAV-Client-0.10
 Package seems to come without Makefile.PL.
   (The test -f
 /root/.cpan/build/ClamAV-Client-0.10/Makefile.PL returned false.)
   Writing one on our own (setting NAME to ClamAVClient)
 [...]

Oops, I accidentally did not include Makefile.PL in the distribution;
don't know how that could have happened.  Try 0.11 as soon as it appears
on CPAN (which should be within the next few hours).

Thanks for the hint.



---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag--drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Courier::Filter 0.16

2005-01-20 Thread Alexander Lazic
On Mit 19.01.2005 21:17, Sam Varshavchik wrote:
It's always safe to append more stuff to the control file.  Whether it's 
safe to rewrite it from scratch is something I need to think about.
Cool, thanx for your great work on courier and i'am looking, very
positive, forward to have these feature in the far future ;-))
al ;-)
---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag--drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Courier::Filter 0.16

2005-01-20 Thread Alessandro Vesely
Gordon Messmer wrote:
 
 Sam Varshavchik wrote:
 
 
  It's always safe to append more stuff to the control file.  Whether
  it's safe to rewrite it from scratch is something I need to think about.
 
 I thought it was, too.  However, when I started actually testing that
 theory, I found that it's not the case at the time that a courierfilter
 runs.  If a courierfilter appends data to a control file, Courier may
 then add a COMCTLFILE_8BIT record.  The write pointer for the ctlfile
 hasn't changed, so that record overwrites a portion of what data the
 courierfilter added.

submit2.C does not flush the control file before filtering.
As a workaround, to modify the control file I do something like

   fp = fopen(cfc-fname, r+);
   fseek(fp, 0, SEEK_END);
   fprintf(fp, %254s\n, );

before adding I or S records as needed. I reckon about 32 bytes
per record is enough (possible records may be U, V, w, E, p,
W, and A, in addition to 8.)


---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag--drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


RE: [courier-users] Courier::Filter 0.16

2005-01-19 Thread Julian Mehnle
Scott [EMAIL PROTECTED] wrote:
 Julian Mehnle wrote:
  Courier::Filter 0.16 has been released on CPAN[1].
 
  The most important changes are:
 
* Added the ClamAVd filter module for malware filtering using a
  ClamAV `clamd` dameon.

 Before I dive into this new release, does that mean that I can quit
 using amavis and instead use courier perl-filter to call clamd instead?

Yes.

Frederik Dannemare [EMAIL PROTECTED] wrote:
 Not that this answers your question, but you could also quit using
 amavis and instead head for ClamCour [...]

The point of using Courier::Filter is that it is very flexible and
supports arbitrary filter modules and complex filter module
configurations, not just ClamAV scanning.



---
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Courier::Filter 0.16

2005-01-19 Thread Alexander Lazic
Hi,
On Mit 19.01.2005 12:59, Julian Mehnle wrote:
The point of using Courier::Filter is that it is very flexible and
supports arbitrary filter modules and complex filter module
configurations, not just ClamAV scanning.
But at the moment the quequefile can't still be modified by any filter,
isn't it?
al ;-)
---
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


RE: [courier-users] Courier::Filter 0.16

2005-01-19 Thread Julian Mehnle
Alexander Lazic [EMAIL PROTECTED] wrote:
 On Mit 19.01.2005 12:59, Julian Mehnle wrote:
  The point of using Courier::Filter is that it is very flexible and
  supports arbitrary filter modules and complex filter module
  configurations, not just ClamAV scanning.

 But at the moment the quequefile can't still be modified by any filter,
 isn't it?

True.  But that means ClamCour and Amavis can't do it either.
Courierfilters can do SMTP-time message rejection only.



---
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Courier::Filter 0.16

2005-01-19 Thread Alexander Lazic
On Mit 19.01.2005 16:49, Julian Mehnle wrote:
True.  But that means ClamCour and Amavis can't do it either.
Courierfilters can do SMTP-time message rejection only.
Yeah :-(
I like courier but these is a really bad limitation, imho :-(
al ;-)
---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag--drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Courier::Filter 0.16

2005-01-19 Thread Jay Lee
Alexander Lazic said:
 On Mit 19.01.2005 16:49, Julian Mehnle wrote:

True.  But that means ClamCour and Amavis can't do it either.
Courierfilters can do SMTP-time message rejection only.

 Yeah :-(

 I like courier but these is a really bad limitation, imho :-(

To be fair, very few mail servers I know of or have used have this
feature.  So I'd instead just call it a really cool feature of Postfix
that Sam might one day have the time to add.  :)  I was thinking the other
day that it'd be incredibly awesome if the delivery time filtering worked
much like maildrop filtering, allowing for a simple scripting language to
control the acceptance/modification/denial of SMTP mail.  Still, Courier
is pretty terrific though.

Jay
--
Jay Lee
Network / Systems Administrator
Information Technology Dept.
Philadelphia Biblical University
--


---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag--drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Courier::Filter 0.16

2005-01-19 Thread Gordon Messmer
Jay Lee wrote:
To be fair, very few mail servers I know of or have used have this
feature.
At least Postfix and Sendmail have it.  It's not that exotic.  It should 
be fairly simple to add to Courier.

About all that needs to be done, AFAIK, is add a seek() to line 947 of 
submit2.C, or close the control files before run_filter and reopen them 
afterward.  It doesn't look like the afx lib in use has a suitable 
seekp() function, so the latter may be easier than the former.

---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag--drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Courier::Filter 0.16

2005-01-19 Thread Sam Varshavchik
Gordon Messmer writes:
Jay Lee wrote:
To be fair, very few mail servers I know of or have used have this
feature.
At least Postfix and Sendmail have it.  It's not that exotic.  It should 
be fairly simple to add to Courier.

About all that needs to be done, AFAIK, is add a seek() to line 947 of 
submit2.C, or close the control files before run_filter and reopen them 
afterward.  It doesn't look like the afx lib in use has a suitable 
seekp() function, so the latter may be easier than the former.
No -- the problem that prevents this from working is that by that time the 
message's MIME structure is already parsed.  If, suddenly the message's 
contents change, the pre-parsed offsets of various MIME entities in the 
message will result in a corrupted message, should Courier choose to rewrite 
it.




pgp5cu7LYKUqj.pgp
Description: PGP signature


RE: [courier-users] Courier::Filter 0.16

2005-01-19 Thread Julian Mehnle
Sam Varshavchik [EMAIL PROTECTED] wrote:
 No -- the problem that prevents this from working is that by that time
 the message's MIME structure is already parsed.  If, suddenly the
 message's contents change, the pre-parsed offsets of various MIME
 entities in the message will result in a corrupted message, should
 Courier choose to rewrite it.

Can't Courier just determine whether the message file was modified, and if
so, re-read and re-parse the message?  That should avoid any performance
problems for backward compatible behavior (i.e. for non-modifying
filters).



---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag--drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Courier::Filter 0.16

2005-01-19 Thread Gordon Messmer
Sam Varshavchik wrote:
Gordon Messmer writes:
About all that needs to be done, AFAIK, is add a seek() to line 947 of 
submit2.C, or close the control files before run_filter and reopen 
them afterward.  It doesn't look like the afx lib in use has a 
suitable seekp() function, so the latter may be easier than the former.

No -- the problem that prevents this from working is that by that time 
the message's MIME structure is already parsed.  If, suddenly the 
message's contents change, the pre-parsed offsets of various MIME 
entities in the message will result in a corrupted message, should 
Courier choose to rewrite it.
For the control file?
---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag--drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Courier::Filter 0.16

2005-01-19 Thread Sam Varshavchik
Gordon Messmer writes:
Sam Varshavchik wrote:
Gordon Messmer writes:
About all that needs to be done, AFAIK, is add a seek() to line 947 of 
submit2.C, or close the control files before run_filter and reopen 
them afterward.  It doesn't look like the afx lib in use has a 
suitable seekp() function, so the latter may be easier than the former.

No -- the problem that prevents this from working is that by that time 
the message's MIME structure is already parsed.  If, suddenly the 
message's contents change, the pre-parsed offsets of various MIME 
entities in the message will result in a corrupted message, should 
Courier choose to rewrite it.
For the control file?
No, the message file.


pgpXQo9gv6XKW.pgp
Description: PGP signature


RE: [courier-users] Courier::Filter 0.16

2005-01-19 Thread Mitch (WebCob)

Can't Courier just determine whether the message file was modified, and if
so, re-read and re-parse the message?  That should avoid any performance
problems for backward compatible behavior (i.e. for non-modifying
filters).


[Mitch says:] That's been kicked around before - it would seem to be a lot
more efficient than resubmitting all the time, but the fact that it hasn't
happened yet makes me wonder how much of a bear that option must be...

If it's not that BAD, but just a low priority , maybe Sam could provide a
few helpful hints to people who want to take that on - would there be an
objection to including the feature if it were made?

m/



---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag--drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


RE: [courier-users] Courier::Filter 0.16

2005-01-19 Thread Mitch (WebCob)

Sam Varshavchik [EMAIL PROTECTED] wrote:
 No -- the problem that prevents this from working is that by that time
 the message's MIME structure is already parsed.  If, suddenly the
 message's contents change, the pre-parsed offsets of various MIME
 entities in the message will result in a corrupted message, should
 Courier choose to rewrite it.

Can't Courier just determine whether the message file was modified, and if
so, re-read and re-parse the message?  That should avoid any performance
problems for backward compatible behavior (i.e. for non-modifying
filters).


[Mitch says:] Another hack I played with a while back (which may still work
on current versions was to edit a PREEXISTING header - thereby preserving
the structure... that is sometimes enough for people - you make sure all
messages are created with a header X-My-Header: XXX and then as needed you
rewrite it to X-My-Header: No_ or X-My-Header: Yes - note they are the
same length, so it doesn't screw up the structure byte offsets...

Just in case that helps...

m/



---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag--drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Courier::Filter 0.16

2005-01-19 Thread Sam Varshavchik
Mitch (WebCob) writes:
Can't Courier just determine whether the message file was modified, and if
so, re-read and re-parse the message?  That should avoid any performance
problems for backward compatible behavior (i.e. for non-modifying
filters).
[Mitch says:] That's been kicked around before - it would seem to be a lot
more efficient than resubmitting all the time, but the fact that it hasn't
happened yet makes me wonder how much of a bear that option must be...
If it's not that BAD, but just a low priority , maybe Sam could provide a
few helpful hints to people who want to take that on - would there be an
objection to including the feature if it were made?
No -- no objections.


pgpw4Mi9Z9FDx.pgp
Description: PGP signature


Re: [courier-users] Courier::Filter 0.16

2005-01-19 Thread Gordon Messmer
Sam Varshavchik wrote:
Gordon Messmer writes:
Sam Varshavchik wrote:
No -- the problem that prevents this from working is that by that 
time the message's MIME structure is already parsed.  If, suddenly 
the message's contents change, the pre-parsed offsets of various 
MIME entities in the message will result in a corrupted message, 
should Courier choose to rewrite it.

For the control file?

No, the message file.

Yeah, but I was talking about the changes required to allow filters to 
modify the control file, which also allows for interesting possibilities.


---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag--drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Courier::Filter 0.16

2005-01-19 Thread Sam Varshavchik
Gordon Messmer writes:
Sam Varshavchik wrote:
Gordon Messmer writes:
Sam Varshavchik wrote:
No -- the problem that prevents this from working is that by that 
time the message's MIME structure is already parsed.  If, suddenly 
the message's contents change, the pre-parsed offsets of various 
MIME entities in the message will result in a corrupted message, 
should Courier choose to rewrite it.

For the control file?

No, the message file.

Yeah, but I was talking about the changes required to allow filters to 
modify the control file, which also allows for interesting possibilities.
It's always safe to append more stuff to the control file.  Whether it's 
safe to rewrite it from scratch is something I need to think about.




pgpz3Tr6l5xrk.pgp
Description: PGP signature


Re: [courier-users] Courier::Filter 0.16

2005-01-19 Thread Gordon Messmer
Sam Varshavchik wrote:
It's always safe to append more stuff to the control file.  Whether 
it's safe to rewrite it from scratch is something I need to think about.

I thought it was, too.  However, when I started actually testing that 
theory, I found that it's not the case at the time that a courierfilter 
runs.  If a courierfilter appends data to a control file, Courier may 
then add a COMCTLFILE_8BIT record.  The write pointer for the ctlfile 
hasn't changed, so that record overwrites a portion of what data the 
courierfilter added.


---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag--drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Courier::Filter 0.16

2005-01-18 Thread Scott
Julian Mehnle wrote:
Courier::Filter 0.16 has been released on CPAN[1].
The most important changes are:
  * Added the ClamAVd filter module for malware filtering using a ClamAV
`clamd` dameon.
Before I dive into this new release, does that mean that I can quit 
using amavis and instead use courier perl-filter to call clamd instead?

-Scott
---
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Re: [courier-users] Courier::Filter 0.16

2005-01-18 Thread Frederik Dannemare
On Wednesday 19 January 2005 03:56, Scott wrote:
 Julian Mehnle wrote:
  Courier::Filter 0.16 has been released on CPAN[1].
 
  The most important changes are:
 
* Added the ClamAVd filter module for malware filtering using a
  ClamAV `clamd` dameon.

 Before I dive into this new release, does that mean that I can quit
 using amavis and instead use courier perl-filter to call clamd
 instead?

Not that this answers your question, but you could also quit using 
amavis and instead head for ClamCour 
http://www.becrux.com/index.php?page=projectsname=clamcour.

I discovered ClamCour myself only a couple of weeks ago and I have been 
very happy with it as a replacement for amavisd-new. On my Pentium 
166MHz with only 32 MB RAM it really makes a difference as ClamCour is 
more light on CPU and memory usage.
-- 
Frederik Dannemare | mailto:[EMAIL PROTECTED]
http://qa.debian.org/developer.php?login=Frederik+Dannemare
http://frederik.dannemare.net | http://www.linuxworlddomination.dk


---
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almosthttp://www.thinkgeek.com/sfshirt
___
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users