Unfortunately there is no built-in method for logging the helo_data variable to the mainlog file.
The method I would probably use would either to be to add a hook somewhere within the message path to log the data I am looking for to another file with some reference to point back to the entries in the mainlog file (say the message ID), or I would set up a separate router & transport on a per-website basis. The transport used to send the mail is logged in the mainlog file as the T=my_transport value.
For the custom logging I have managed to do something similar for inserting of received email details into a database using the condition = value in the router. You could use the ${run{<command> <args>}} string expansion to achieve this:
condition = ${run{/path/to/interpreter /path/to/custom/logging/script $sender_domain $message_exim_id}{1}{0}}
(untested)
That little snippet in the router will execute the script /path/to/custom/logging/script using the interpreter /path/to/interpreter (/bin/sh, /usr/bin/perl, whatever) passing it the domain name of the sender and the Exim message ID.
It's fairly heavyweight, so wouldn't be ideal on a heavy usage server, but it might just work....
interface = ${extract{$sender_address_domain}{one.com=${extract{${eval:1 + ${randint:2}}}{:}{10.1.0.1:10.1.0.2}{$value}{10.0.0.0}} two.com=10.2.0.1 three.com=10.3.0.1}{$value}{10.0.0.0}}helo_data = ${extract{$sending_ip_address}{10.0.0.0=mail.default.com 10.1.0.1=mail1.one.com 10.1.0.2=mail2.one.com 10.2.0.1=mail.two.com 10.3.0.1=mail.three.com}{$value}{mail.default.com}}– Radmilla Mustafa Mar 27 '11 at 20:05