aox:aox.git
13 years agoUpdate VERSION. v2.13
Abhijit Menon-Sen [Wed, 19 Nov 2008 19:23:44 +0000 (00:53 +0530)]
Update VERSION.

13 years agoExpect to find idate in messages, not mailbox_messages.
Abhijit Menon-Sen [Wed, 19 Nov 2008 19:17:36 +0000 (00:47 +0530)]
Expect to find idate in messages, not mailbox_messages.

Picked by hand, with adaptations, from the current source in master.

13 years agoSchema #78: Move mailbox_messages.idate to messages.
Abhijit Menon-Sen [Tue, 4 Nov 2008 12:58:56 +0000 (18:28 +0530)]
Schema #78: Move mailbox_messages.idate to messages.

13 years agoMake sure we can upgrade from schema 77-as-76.
Abhijit Menon-Sen [Tue, 4 Nov 2008 12:29:40 +0000 (17:59 +0530)]
Make sure we can upgrade from schema 77-as-76.

13 years agoadd LDAP commit support to the schema
Arnt Gulbrandsen [Tue, 21 Oct 2008 08:40:14 +0000 (10:40 +0200)]
add LDAP commit support to the schema

not active yet

(Integrated with revision update. -- AMS)

13 years agoadd LDAP commit support to the schema
Arnt Gulbrandsen [Tue, 21 Oct 2008 08:40:14 +0000 (10:40 +0200)]
add LDAP commit support to the schema

not active yet

13 years agoSyntax. v2.12
Abhijit Menon-Sen [Mon, 3 Nov 2008 09:39:21 +0000 (15:09 +0530)]
Syntax.

13 years ago*OUCH* flush even if we don't have anything to write NOW
Arnt Gulbrandsen [Wed, 29 Oct 2008 12:13:45 +0000 (13:13 +0100)]
*OUCH* flush even if we don't have anything to write NOW

we might have written something earlier, that we want cryptlib to flush.

also log the exact error message as info, not error, since it isn't
necessarily an error. most commonly it's just a timeout.

13 years agologging the cryptlib error only when everything's okay makes little sense.
Arnt Gulbrandsen [Wed, 29 Oct 2008 11:05:54 +0000 (12:05 +0100)]
logging the cryptlib error only when everything's okay makes little sense.

I think that was what the code did. so let's try it differently.

13 years agothe dm_mm index may exist already when upgrade schema is run.
Arnt Gulbrandsen [Wed, 1 Oct 2008 19:37:03 +0000 (21:37 +0200)]
the dm_mm index may exist already when upgrade schema is run.

I chose to do it this way (create unless exists) because the three
alternatives seemed worse:

- requiring aox tune database after upgrade schema would suck
- automatically tuning would require that we store the desired tuning,
  which makes it hard for people to tune by hand
- we could support hand-tuning if we tried to classify the running
  database at upgrade schema time and adjusted the tuning in about the
  right way, but that task is MUCH too vague for me

(Edit: Integrated with some changes: 2.x has no Granter, and no DbSchema
support. -- AMS)

13 years agoRemove tried_at.
Abhijit Menon-Sen [Tue, 14 Oct 2008 11:04:56 +0000 (16:34 +0530)]
Remove tried_at.

13 years agoSchema #76: minor cleanups.
Abhijit Menon-Sen [Thu, 18 Sep 2008 06:00:11 +0000 (11:30 +0530)]
Schema #76: minor cleanups.

This means both the new threading code and the new spoolmanager code
must go into 2.12, which I think is fine.

13 years agoMake the DeliveryAgent work without tried_at.
Abhijit Menon-Sen [Mon, 3 Nov 2008 07:32:45 +0000 (13:02 +0530)]
Make the DeliveryAgent work without tried_at.

13 years agobe more careful about what looks like a boundary line and may need qping
Arnt Gulbrandsen [Wed, 17 Sep 2008 19:23:29 +0000 (21:23 +0200)]
be more careful about what looks like a boundary line and may need qping

this should prevent '---- BEGIN PGP BLAH ----' from matching, which is
good, because a certain (inexplicably) well-regarded mail client can't
handle qp'd PGP messages.

13 years agoq-p lines that start with "--" or "From "
Arnt Gulbrandsen [Tue, 9 Sep 2008 13:25:00 +0000 (15:25 +0200)]
q-p lines that start with "--" or "From "

If a string includes a line starting with From, but there's no other
reason to q-p it, then we don't q-p it.

13 years agosend \noselect when a client asks for the separator
Arnt Gulbrandsen [Tue, 26 Aug 2008 10:59:54 +0000 (12:59 +0200)]
send \noselect when a client asks for the separator

13 years agopattern a*b may match children of a/c.
Arnt Gulbrandsen [Tue, 26 Aug 2008 13:34:03 +0000 (15:34 +0200)]
pattern a*b may match children of a/c.

13 years agodo lsub correctly. 2.12 fodder, (assuming that anyone ever cares about odd
Arnt Gulbrandsen [Sun, 7 Sep 2008 15:22:08 +0000 (17:22 +0200)]
do lsub correctly. 2.12 fodder, (assuming that anyone ever cares about odd
lsub behaviour).

13 years agothat _is_ an error, so log it like that v2.11
Arnt Gulbrandsen [Sun, 24 Aug 2008 11:08:57 +0000 (13:08 +0200)]
that _is_ an error, so log it like that

13 years agoroll back a transaction if something throws Invariant while processing it
Arnt Gulbrandsen [Sun, 24 Aug 2008 10:48:59 +0000 (12:48 +0200)]
roll back a transaction if something throws Invariant while processing it

13 years agoBe careful to not hold locks and die.
Abhijit Menon-Sen [Sun, 24 Aug 2008 07:06:09 +0000 (12:36 +0530)]
Be careful to not hold locks and die.

13 years agoUse a faster query to see whether a mailbox is really empty.
Arnt Gulbrandsen [Thu, 31 Jul 2008 10:15:56 +0000 (12:15 +0200)]
Use a faster query to see whether a mailbox is really empty.

This also should evade a type problem: count(*) returned a bigint
for Simon Heimlicher in the previous version of this query, so I
cast it to bigint in case there's a version discrepancy and then
use getBigint() to retrieve it.

13 years agoSchema #75: Restore index on bodyparts.hash.
Abhijit Menon-Sen [Mon, 4 Aug 2008 12:24:52 +0000 (17:54 +0530)]
Schema #75: Restore index on bodyparts.hash.

Signed-off-by: Abhijit Menon-Sen <ams@oryx.com>
13 years agopermit two bodyparts to have the same MD5 hash.
Arnt Gulbrandsen [Tue, 15 Jul 2008 10:40:57 +0000 (12:40 +0200)]
permit two bodyparts to have the same MD5 hash.

the injector has accepted hash duplications for a few weeks, and we don't
use the hash for anything except speeding up injection, so this is now
okay.

13 years agoFix some URLs.
Abhijit Menon-Sen [Fri, 22 Aug 2008 12:55:41 +0000 (18:25 +0530)]
Fix some URLs.

13 years agoauthenticate can also contains passwords (base64-encoded, but still)
Arnt Gulbrandsen [Fri, 22 Aug 2008 10:34:30 +0000 (12:34 +0200)]
authenticate can also contains passwords (base64-encoded, but still)

13 years agothe code to not close listeners only caught one of the two instances. this
Arnt Gulbrandsen [Fri, 22 Aug 2008 10:15:12 +0000 (12:15 +0200)]
the code to not close listeners only caught one of the two instances. this
catches the other.

also closes the connection instead of just forgetting it.

also forgets about connections even if they're already closed.

13 years agoorder RCPT TO commands more comprehensibly
Arnt Gulbrandsen [Wed, 20 Aug 2008 08:36:27 +0000 (10:36 +0200)]
order RCPT TO commands more comprehensibly

the old order was stable, but that wasn't easy to see. now it orders them
by domain,localpart.

13 years agoaox delete alias would fail if there were several rows in the addresses
Arnt Gulbrandsen [Tue, 19 Aug 2008 19:39:48 +0000 (21:39 +0200)]
aox delete alias would fail if there were several rows in the addresses
table with that localpart and domain (e.g. blah@example.com and Boris Lah
<blah@example.com>).

13 years agoFix comment.
Abhijit Menon-Sen [Wed, 13 Aug 2008 09:37:21 +0000 (15:07 +0530)]
Fix comment.

13 years agoDon't close Listeners.
Abhijit Menon-Sen [Wed, 13 Aug 2008 09:33:45 +0000 (15:03 +0530)]
Don't close Listeners.

We have no good way to identify the Connection that originated a query
in Query::notify(), but we can be pretty sure that a Listener isn't it
while we're looking for parents of the query's owner's log.

13 years agoSpelling fix.
Abhijit Menon-Sen [Wed, 13 Aug 2008 08:56:08 +0000 (14:26 +0530)]
Spelling fix.

13 years agosupport MAIL FROM:<...> AUTH=<...>
Arnt Gulbrandsen [Mon, 11 Aug 2008 21:18:19 +0000 (23:18 +0200)]
support MAIL FROM:<...> AUTH=<...>

13 years agoAvoid writing plaintext LOGIN passwords to the log file.
Abhijit Menon-Sen [Fri, 8 Aug 2008 11:06:35 +0000 (16:36 +0530)]
Avoid writing plaintext LOGIN passwords to the log file.

Done this way on the basis that it fixes the obvious case (a login x y),
and that login is an unlikely source of problems that we'd desperately
need the first line to debug anyway. Suppressing the line seems better
than trying to find and obscure the password (cf. "a login x {7}").

Doesn't do anything about AUTHENTICATE initial-response etc.

13 years agoFix another warning.
Abhijit Menon-Sen [Thu, 7 Aug 2008 22:09:09 +0000 (03:39 +0530)]
Fix another warning.

A stupid one, this time. g++ doesn't realise that i cannot be > 5, and
it complains about the array subscript being out of bounds.

13 years agoAnother warning.
Abhijit Menon-Sen [Thu, 7 Aug 2008 21:48:07 +0000 (03:18 +0530)]
Another warning.

13 years agoFix g++ 4.3 warning reported by Simon.
Abhijit Menon-Sen [Thu, 7 Aug 2008 21:36:00 +0000 (03:06 +0530)]
Fix g++ 4.3 warning reported by Simon.

13 years agoif an IMAP command needs a session and doesn't have one, then something
Arnt Gulbrandsen [Mon, 4 Aug 2008 09:09:41 +0000 (11:09 +0200)]
if an IMAP command needs a session and doesn't have one, then something
really bad is happening. this can happen if the client closes the
connection abruptly and the close isn't quite handled.

this change adds code to throw an exception if that happens, which will
close the IMAP connection without deliberation. bang.

probably should go into 2.11.

13 years agonew function Address::lpdomain(), and caller updates.
Arnt Gulbrandsen [Tue, 6 May 2008 11:51:50 +0000 (13:51 +0200)]
new function Address::lpdomain(), and caller updates.

13 years agoString::replace(), untested and so on. both this and prepend() need
Arnt Gulbrandsen [Wed, 23 Apr 2008 12:31:04 +0000 (12:31 +0000)]
String::replace(), untested and so on. both this and prepend() need
unit tests.

p4raw-id: //oryx/src/main@55139

13 years agoimprove the error message; I think the new text is more likely to be
Arnt Gulbrandsen [Wed, 30 Jul 2008 12:07:20 +0000 (14:07 +0200)]
improve the error message; I think the new text is more likely to be
correctly interpreted by J. Clueful User.

13 years agoso how could this ever pass a single test? unsubscribe has to execute its
Arnt Gulbrandsen [Wed, 30 Jul 2008 11:57:13 +0000 (13:57 +0200)]
so how could this ever pass a single test? unsubscribe has to execute its
query, it can't just hope and pray that the query magically resolve
itself.

13 years agoaccept this:
Arnt Gulbrandsen [Tue, 29 Jul 2008 20:58:07 +0000 (22:58 +0200)]
accept this:

  From: a@b, c@d, e@f
  Sender: a@b, c@d

13 years agoaccept Sender which is a straight copy of From, even if From contains more
Arnt Gulbrandsen [Tue, 29 Jul 2008 20:13:13 +0000 (22:13 +0200)]
accept Sender which is a straight copy of From, even if From contains more
than one address.

13 years agorequire needs capability names to be quoted
Arnt Gulbrandsen [Tue, 29 Jul 2008 12:40:25 +0000 (14:40 +0200)]
require needs capability names to be quoted

13 years agotext/html; charset=iso-8859-1 has to have charset=
Arnt Gulbrandsen [Tue, 29 Jul 2008 11:56:16 +0000 (13:56 +0200)]
text/html; charset=iso-8859-1 has to have charset=

Yes, 8859-1 is the default for html, but we have to specify this. Not
doing it requires too much code to agree, and it WILL surprise someone who
uses ASCII as default, as the MIME RFC says to.

13 years agotext/html has a default charset of iso-8859-1. if we see a charsetless
Arnt Gulbrandsen [Mon, 28 Jul 2008 14:07:39 +0000 (16:07 +0200)]
text/html has a default charset of iso-8859-1. if we see a charsetless
text/html bodypart in the db, we'd better assume that it's 8895-1.

13 years agocalling List::count() where isEmpty() will do is sloooow
Arnt Gulbrandsen [Fri, 25 Jul 2008 13:47:47 +0000 (15:47 +0200)]
calling List::count() where isEmpty() will do is sloooow

13 years agodon't bother checking that a script actually uses the extensions it
Arnt Gulbrandsen [Thu, 24 Jul 2008 13:18:26 +0000 (15:18 +0200)]
don't bother checking that a script actually uses the extensions it
'requires'. noone else checks and the RFC doesn't ask us to (I think I
added the checking because of wording in a draft).

13 years agomove the From workaround that depends on this host's hostname so we try
Arnt Gulbrandsen [Thu, 24 Jul 2008 12:35:19 +0000 (14:35 +0200)]
move the From workaround that depends on this host's hostname so we try
everything else first.

move the Reply-To workaround that depends on From to after all the Froms.

13 years agocontent-type seems to suffer from more errors than other fields.
Arnt Gulbrandsen [Thu, 24 Jul 2008 11:58:43 +0000 (13:58 +0200)]
content-type seems to suffer from more errors than other fields.

there's some general code which works around from::::: a@example.org, but
it only does anything when the field can't be parsed as it should be.
since c-t is suffers from clueless spammers, c-t can parse almost
anything, and often doesn't fail.

therefore, c-t now gets its own colon-skipping code. feh.

13 years agobe properly case insensitive. thanks to simon heimlicher and the
Arnt Gulbrandsen [Thu, 24 Jul 2008 11:38:35 +0000 (13:38 +0200)]
be properly case insensitive. thanks to simon heimlicher and the
squirrelmail developers, who like upper case.

13 years agomake the reject and fileinto extensions magic, in that they can be used
Arnt Gulbrandsen [Thu, 24 Jul 2008 11:34:59 +0000 (13:34 +0200)]
make the reject and fileinto extensions magic, in that they can be used
without being declared.

13 years ago$#@$!. I commited the wrong thing.
Arnt Gulbrandsen [Thu, 24 Jul 2008 11:34:21 +0000 (13:34 +0200)]
$#@$!. I commited the wrong thing.

this allows empty scripts provided they have nonzero length.

13 years agoaccept empty scripts provided the length is nonzero
Arnt Gulbrandsen [Thu, 24 Jul 2008 11:32:16 +0000 (13:32 +0200)]
accept empty scripts provided the length is nonzero

13 years agoif we have to guess the content-type based on filename, then preserve the
Arnt Gulbrandsen [Thu, 24 Jul 2008 10:55:50 +0000 (12:55 +0200)]
if we have to guess the content-type based on filename, then preserve the
original garbage for possible human inspection.

13 years agoAccept garbage like this:
Arnt Gulbrandsen [Thu, 24 Jul 2008 10:47:25 +0000 (12:47 +0200)]
Accept garbage like this:

   Content-Type: multipart/mixed; boundary=\"asdf\"

Spammers must die.

13 years agobe kind to avelsieve, which wants the capabilities in a given order
Arnt Gulbrandsen [Thu, 24 Jul 2008 10:31:27 +0000 (12:31 +0200)]
be kind to avelsieve, which wants the capabilities in a given order

13 years agoaccept a whitespace-only script as valid
Arnt Gulbrandsen [Thu, 24 Jul 2008 09:44:20 +0000 (11:44 +0200)]
accept a whitespace-only script as valid

13 years agoAccept Sieve scripts containing bare LFs.
Arnt Gulbrandsen [Thu, 24 Jul 2008 09:40:37 +0000 (11:40 +0200)]
Accept Sieve scripts containing bare LFs.

The RFC demands CRLF, but smartsieve and avelsieve sometimes send LF.

13 years agoaccept a string argument to reject
Arnt Gulbrandsen [Thu, 24 Jul 2008 07:17:11 +0000 (09:17 +0200)]
accept a string argument to reject

13 years agotypo2
Arnt Gulbrandsen [Wed, 23 Jul 2008 10:47:11 +0000 (12:47 +0200)]
typo2

13 years agotypo
Arnt Gulbrandsen [Tue, 22 Jul 2008 19:10:31 +0000 (21:10 +0200)]
typo

13 years agowhen we add a Received field, wrap it properly
Arnt Gulbrandsen [Tue, 22 Jul 2008 12:24:57 +0000 (14:24 +0200)]
when we add a Received field, wrap it properly

and add a for clause if appropriate (or a comment)

13 years agouh, 'From ' should happen only for RFC822 headers, so handle only that
Arnt Gulbrandsen [Tue, 22 Jul 2008 11:09:03 +0000 (13:09 +0200)]
uh, 'From ' should happen only for RFC822 headers, so handle only that

13 years agohandle "From " lines correctly, even if they come in via SMTP.
Arnt Gulbrandsen [Tue, 22 Jul 2008 10:09:03 +0000 (12:09 +0200)]
handle "From " lines correctly, even if they come in via SMTP.

this is suboptimal; we could look for the address, store it, and use it to
salvage some From: fields. but it's OK.

this change also moves the " Mar " code to work around Courier into the
Courier-specific code, where it ought to have been all the time.

13 years agoaccept and ignore "To: Valued Customer <>"
Arnt Gulbrandsen [Mon, 21 Jul 2008 14:30:35 +0000 (16:30 +0200)]
accept and ignore "To: Valued Customer <>"

13 years agoMake jam clean and git status play nicely.
Abhijit Menon-Sen [Fri, 18 Jul 2008 02:05:22 +0000 (07:35 +0530)]
Make jam clean and git status play nicely.

13 years agoHeaderField::ContentBase has to go. this has been a bug for ages.
Arnt Gulbrandsen [Wed, 16 Jul 2008 12:23:12 +0000 (14:23 +0200)]
HeaderField::ContentBase has to go. this has been a bug for ages.

should go into 2.11.

13 years agolatest DNS TLD list. this goes into 2.11, woo hoo.
Arnt Gulbrandsen [Wed, 16 Jul 2008 09:59:26 +0000 (11:59 +0200)]
latest DNS TLD list. this goes into 2.11, woo hoo.

13 years agomutf7 MUST end in ascii mode. '&' is not legal, '&-' is (since - toggles
Arnt Gulbrandsen [Thu, 3 Jul 2008 19:51:45 +0000 (21:51 +0200)]
mutf7 MUST end in ascii mode. '&' is not legal, '&-' is (since - toggles
back to ascii mode)

13 years agoadd a plan b for malformed boundaries.
Arnt Gulbrandsen [Thu, 3 Jul 2008 13:25:26 +0000 (15:25 +0200)]
add a plan b for malformed boundaries.

if we can't parse the parameters but the boundary seems to be there and we
need it, then try _really_ hard to dig it out of the nonsense.

13 years agofetch the recipients for each delivery in a predictable, easily testable
Arnt Gulbrandsen [Thu, 3 Jul 2008 09:58:35 +0000 (11:58 +0200)]
fetch the recipients for each delivery in a predictable, easily testable
order.

13 years agotry again quickly (then slowly) if the smarthost doesn't answer
Arnt Gulbrandsen [Wed, 2 Jul 2008 20:58:15 +0000 (22:58 +0200)]
try again quickly (then slowly) if the smarthost doesn't answer

13 years agolock the mailbox before deleting it. fixes all races.
Arnt Gulbrandsen [Sat, 28 Jun 2008 17:03:27 +0000 (19:03 +0200)]
lock the mailbox before deleting it. fixes all races.

13 years agocall commit() instead of rollback() in expunge if we discover that we
Arnt Gulbrandsen [Fri, 27 Jun 2008 12:30:40 +0000 (14:30 +0200)]
call commit() instead of rollback() in expunge if we discover that we
don't need to do anything, and haven't done anything either.

the rollback would finish late sometimes and I'd check whether it was okay
or a timeout.

13 years agoFetch (use)names as text.
Abhijit Menon-Sen [Fri, 27 Jun 2008 07:34:31 +0000 (13:04 +0530)]
Fetch (use)names as text.

13 years agoname another possible error in a sensible way.
Abhijit Menon-Sen [Fri, 22 Aug 2008 04:07:50 +0000 (09:37 +0530)]
name another possible error in a sensible way.

maybe we could use the codes too. 23505 is always a UNIQUE violation.

13 years agoignore parse errors in mime field parameters silently and stop parsing the
Arnt Gulbrandsen [Thu, 26 Jun 2008 08:29:33 +0000 (10:29 +0200)]
ignore parse errors in mime field parameters silently and stop parsing the
parameters (with two exceptions - we keep looking for charset and
boundary).  the variety of errors in parameters is too great and the value
of the errant data is too low to care.

13 years agoI'm being stubborn. "any header contains ''" is true.
Arnt Gulbrandsen [Wed, 25 Jun 2008 13:39:46 +0000 (15:39 +0200)]
I'm being stubborn. "any header contains ''" is true.

13 years agochange the table comments so they'll read acceptably (not perfectly) in
Arnt Gulbrandsen [Wed, 25 Jun 2008 10:09:53 +0000 (12:09 +0200)]
change the table comments so they'll read acceptably (not perfectly) in
the table list on aox.org/db/

13 years agoFix typo.
Abhijit Menon-Sen [Wed, 25 Jun 2008 09:40:00 +0000 (15:10 +0530)]
Fix typo.

13 years agoActivate schema #73.
Abhijit Menon-Sen [Wed, 25 Jun 2008 08:35:50 +0000 (14:05 +0530)]
Activate schema #73.

13 years agoCode to upgrade to schema #73.
Abhijit Menon-Sen [Wed, 25 Jun 2008 08:35:34 +0000 (14:05 +0530)]
Code to upgrade to schema #73.

13 years agoRevision #73: Store client address and port separately.
Abhijit Menon-Sen [Wed, 25 Jun 2008 08:08:56 +0000 (13:38 +0530)]
Revision #73: Store client address and port separately.

13 years agoDon't listen on :: if use-ipv6 is false.
Abhijit Menon-Sen [Wed, 25 Jun 2008 03:35:58 +0000 (09:05 +0530)]
Don't listen on :: if use-ipv6 is false.

If no listen address was specified for a service, we would try to listen
first on :: and then on 0.0.0.0. Now we do the first only if use-ipv6 is
true. (We ignore use-ipv4 for this case, but it doesn't really matter.)

Thanks to Ron Peterson for reporting the problem.

13 years agoScope x( (Log*)0 ) should not overwrite parent's log.
Arnt Gulbrandsen [Tue, 17 Jun 2008 11:55:54 +0000 (13:55 +0200)]
Scope x( (Log*)0 ) should not overwrite parent's log.

13 years agoif we want to close, and the client closes, that's ok. no point in logging
Arnt Gulbrandsen [Mon, 16 Jun 2008 11:55:56 +0000 (13:55 +0200)]
if we want to close, and the client closes, that's ok. no point in logging
that.

13 years agoAccept (and throw away) To: @host.na.me
Arnt Gulbrandsen [Fri, 13 Jun 2008 14:02:50 +0000 (16:02 +0200)]
Accept (and throw away) To: @host.na.me

13 years agoparse content-type: charset=us-ascii
Arnt Gulbrandsen [Fri, 13 Jun 2008 13:55:51 +0000 (15:55 +0200)]
parse content-type: charset=us-ascii

13 years agoaccept c-t-e: 64bit, 9bit and various other deformed names spammers use
Arnt Gulbrandsen [Fri, 13 Jun 2008 13:38:58 +0000 (15:38 +0200)]
accept c-t-e: 64bit, 9bit and various other deformed names spammers use

13 years agotrim trailing whitespace from all subject fields
Arnt Gulbrandsen [Fri, 13 Jun 2008 13:35:59 +0000 (15:35 +0200)]
trim trailing whitespace from all subject fields

13 years agoaccept c-t-e: "quoted-printable" as well as quoted-printable. wrong, but
Arnt Gulbrandsen [Fri, 13 Jun 2008 13:35:25 +0000 (15:35 +0200)]
accept c-t-e: "quoted-printable" as well as quoted-printable. wrong, but
feh.

13 years agosome people place far too many '"' characters in their mime fields. skip
Arnt Gulbrandsen [Thu, 12 Jun 2008 13:48:45 +0000 (15:48 +0200)]
some people place far too many '"' characters in their mime fields. skip
some harmless ones.

13 years agothe previous commit could loop infinitely. oops.
Arnt Gulbrandsen [Thu, 12 Jun 2008 13:42:44 +0000 (15:42 +0200)]
the previous commit could loop infinitely. oops.

13 years agoparse 'Name: : : : value' as though it were 'Name: value' if that succeeds
Arnt Gulbrandsen [Thu, 12 Jun 2008 13:35:39 +0000 (15:35 +0200)]
parse 'Name: : : : value' as though it were 'Name: value' if that succeeds
and the original fails.

13 years agonow that ContentType does this, Header doesn't need to
Arnt Gulbrandsen [Thu, 12 Jun 2008 13:35:13 +0000 (15:35 +0200)]
now that ContentType does this, Header doesn't need to

13 years agostop parsing a mime field if there's a parse error, and it seems to be
Arnt Gulbrandsen [Thu, 12 Jun 2008 13:24:49 +0000 (15:24 +0200)]
stop parsing a mime field if there's a parse error, and it seems to be
because a second field is glued to the end of this, e.g.

  Content-Type: text/plain; charset=x; Subject: y

13 years agoremove the charset in "text/plain; charset=us-ascii" as part of parsing the
Arnt Gulbrandsen [Thu, 12 Jun 2008 12:59:54 +0000 (14:59 +0200)]
remove the charset in "text/plain; charset=us-ascii" as part of parsing the
field instead of as fixing the header. this makes a difference when the
message has more than one c-t fields.

do the same for html/latin1.

fix the charset's name if it differs from the correct name other than in
case (so iSO_8859_1 becomes iso-8859-1).

13 years agoif the message does not contain any sensible mime type, but does contains
Arnt Gulbrandsen [Thu, 12 Jun 2008 12:49:17 +0000 (14:49 +0200)]
if the message does not contain any sensible mime type, but does contains
a suggested file name, then we try to guess the mime type based on the
file name.