Phillip,
| Shouldn't be hard, I think you could even write it as a courierfilter.
| I would say a courierfilter would work as that gets the whole message
| and can alter it, either that or it'd be in submit.c I think. I'm not
| familiar with the courier source.
Don't want to beat a dead horse here, but I did consider writing this into my
current filter. I have a spam/virus filter that I wrote that works with
courierfilter. However, when I began thinking about the necessary steps
to "fix" a message when it's malformatted, here's the problem:
1. The message could just be deleted. If that's the case then its easy - just
mark the message as delivered and you're done. However, it makes a decision
for the end user who will undoubtedly be upset that you've dropped any message.
2. The better way to do this would be to fix the error - not with any intense
logic, but just by adding a "\r\n" to the end of the message. However, if you
modify the message from a courier filter, it won't stay modified. You are
allowed to modify the control file, not the message. This means I'd have to
relay the message back through the system, deleting the original. That seems
like a lot of extra CPU cycles for nothing.
So, what I've done is added two lines of code (one might consider it actually
one line) to the imap/pop3dserver.c file:
on line 654, add the following:
if ( inheader )
print( "\r\n" );
Big logic check there! Sam is already keeping track of whether or not the
message header has been parsed. If inheader == 1 to this point in the code,
then the message has completely passed and no header was detected. So its
simple to just add a blank line.
Granted, this doesn't fix the message really - nor does it guarantee anything,
except that those MUA's that are looking for that blank line after the header
will now be happy. And so am I - case closed, thank you very much, Sam, for
your help!
Thanks,
D
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users