John, wouldn't that cause double-bandwidth-measuring in the case of a local catchall account? And also in the case of a local alias?
Yes, partly why I have not yet implemented it. I believe you might be able to create a function for the virtual_aliases_nostar, and just skip using it with the virtual_aliases function.. Either way, it will have to be very creatively written, which is why we currently only have the virtual user for incoming, and nothing else.
One option is to do the perl logging in the transport instead of the director. The only problem is that the user privileges have already been dropped... the data *can* be saved, but it would be in a log filed owned by the user, thus the user would be able to edit his username.bytes file however he wishes
. I don't personally like that one. Aliases don't work that way, because they're just "passing through", but again, it would have to know if it's a catch-all, or local domain, or local user, or external domain to be charged.. gets quite tricky to do.
I may play with another idea later.. create 1 unseen transport who's sole purpose is bandwidth logging. It only need to check the domain name. If the email comes in with that domain, bill it. Seems like a cleaner solution.
The test.txt file is for debugging. Thanks for pointing that out, I've removed the log_str entry in exim.pl now so it doesn't log into the test.txt. The test.txt is safe to delete, it's not used for anything.
John