How to print the "To:" address in virus reports?

Jason Summers jason at MED-WEB.COM
Tue Apr 23 18:13:27 IST 2002

Maybe I'm doing something wrong, but the $to variable in files like does not seem to expand to the "To:" SMTP header
as I would have expected. Is there another variable that I can use that
expands to the actual "To:" header?

Suppose tech-support at is an alias that gets forwarded to
joe at If someone then sends a virus to
tech-support at, the warning message that the sender receives
from MailScanner (running on internal-server) will assert that they sent
a message "To: <joe at>". That's not correct,
and could even inappropriately leak information about your internal

Jason Summers

More information about the MailScanner mailing list