[Exim] API bug in exim-4.04?

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Marc MERLIN
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [Exim] API bug in exim-4.04?
I think I found a problem, or at least a non documented limitation in
header_add, which I'm using in local_scan

See the following code in local_scan:
log_write(0, LOG_MAIN, "Bar");
printf("Going to add %s\n", *header);
printf("Going to add2 %s\n", string_sprintf("%s", *header));
header_add(' ', *header);
log_write(0, LOG_MAIN, "Baz");


It outputs:
Going to add Subject: SPAM: 16.60: SPAM: 15.00: Human Growth Hormone Supplementation Save 50%
Going to add2 Subject: SPAM: 16.60: SPAM: 15.00: Human Growth Hormone Supplementation Save 50%
2002-05-13 09:00:17 177IFE-00024W-00 string_format: unsupported type in "%"

and logs:
2002-05-13 09:00:17 177IFE-00024W-00 Bar
2002-05-13 09:00:17 177IFE-00024W-00 string_format: unsupported type in "%"


Exim gets apparently upset because *header points to
"Subject: SPAM: 16.60: SPAM: 15.00: Human Growth Hormone Supplementation Save 50%"
If there is no '%', it's happy.
string_sprintf seems happy with having '%' in *header though (as shown by
the second printf)

I further found that if I quote '%' by adding a second '%', header_add seems
happy, although it's inconvenient in C, because I need to scan my string and
add characters in the middle.

Anyone seen this before?
Am I doing something wrong or is this supposed to be that way?

Thanks,
Marc
--
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking


Home page: http://marc.merlins.org/ | Finger marc_f@??? for PGP key