Hi all,

I think I've discoverd a bug in the forward.c code. I've only reproduced
it on a dbmail 1.2 system, but the bug may very well be present in the 2.x 
code.

If an alias is configured to forward the mail to an external email
address and the original sender addresss contains an ampersand (e.g.,
foo&[EMAIL PROTECTED]), the forward failes. I think this is because the 
ampersand causes a fork in the pipe command.

This is (part of) a level 5 trace log of such an external forward:

pipe_forward(): opening pipe to command /usr/sbin/sendmail -f
foo&[EMAIL PROTECTED] [EMAIL PROTECTED]
Sep 23 14:42:47 elnino dbmail/smtp[20562]: pipe_forward(): call to
popen() successfull opened descriptor 6
Sep 23 14:42:47 elnino dbmail/smtp[20562]: pipe_forward(): writing to
pipe using dbmessage 11300828
Sep 23 14:42:47 elnino dbmail/smtp[20562]: pipe_forward(): ferror
reports 0, feof reports 0 on descriptor 6

Soon after this, a bounce is sent to <foo>, stating "<unknown>: No
recipients specified"

I am not a C programmer, but as far as I can tell, there were no changes
in the code since version 1.2 that would have made this bug disappear.
The bug may very well also be triggered if the recipient contains special
characters. I haven't tested that however. Maybe this can easily be fixed 
by placing single quotes around the sender and recipient addresses, so we 
don't need to escape every possible special character in the addresses?

Leander

Reply via email to