This is small SMTP wrapper designed to be used in chroot-ed environment
as a sendmail command-line tool replacement. e.g. warpper can be used
by php ( by function mail ) instead of using SMTP client written in php.
To build static binary uncoment line "LDFLAGS = -s -static" in Makefile.
Otherwise leave it as is (builds dynamic binary)
To compile just type in 'make'
Now, there is file 'bbsendmail', which you should copy where you like.
./bbsendmail [options] [recipient_address] ...
./bbsendmail [options] [recipients ...]
-h this help
-i just for compatibility
-d increase debug level
-s do not generate 'received' headers
-p do not generate X-HTTP headers
-f emial set sender email
-t parse header for destinations (To, Cc, Bcc) instead
of using command line arguments [recipients]
-r force to search sender (from) in header and use it if found
recipient_address : List of recipients
When PHP_MAIL environment is set, this is used as sender address.
Option '-f' has precedence.
To test if everything work as expected try it:
echo "test" | ./bbsendmail -f source@address destination@address
brano (at) zilina (dot) net