Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
89 | magnus | 1 | Description: Delete carriage returns from header lines. |
2 | When spamd gets a message with CRLF line endings, which it will when |
||
3 | the spool file is in wire format, it will return a message with CRLF |
||
4 | line endings, including the header. We will need to strip out the |
||
5 | CRs. |
||
6 | |||
7 | --- a/sa-exim.c |
||
8 | +++ b/sa-exim.c |
||
9 | @@ -406,6 +406,11 @@ int parsemlheader(char *buffer, FILE *re |
||
10 | if (buffer[strlen(buffer)-1] == '\n') |
||
11 | { |
||
12 | buffer[strlen(buffer)-1]=0; |
||
13 | + /* and any carriage return */ |
||
14 | + if (buffer[strlen(buffer)-1] == '\r') |
||
15 | + { |
||
16 | + buffer[strlen(buffer)-1]=0; |
||
17 | + } |
||
18 | } |
||
19 | if (SAEximDebug > 5) |
||
20 | { |
||
21 | @@ -1078,6 +1083,11 @@ int local_scan(volatile int fd, uschar * |
||
22 | if (buffer[strlen(buffer)-1] == '\n') |
||
23 | { |
||
24 | buffer[strlen(buffer)-1]=0; |
||
25 | + /* and any carriage return */ |
||
26 | + if (buffer[strlen(buffer)-1] == '\r') |
||
27 | + { |
||
28 | + buffer[strlen(buffer)-1]=0; |
||
29 | + } |
||
30 | } |
||
31 | restart: |
||
32 | if (SAEximDebug > 5) |