I tried to use php in chroot jail. mail() function with normal postfix'es sendmail occasionally stop working. But busybox'es sendmail also doesn't work. It seems (but I'm not clearly sure) it's so because -f option is mandatory for busybox'es sendmail when mail() function specifies sender in message body using -t option without -f. By the way, mini_sendmail - http://www.acme.com/software/mini_sendmail/ works like a charm, but it's dead project. And sendmail in postfix also works without -f only with -t.