Users' domain names on the webmail login page?

I’d like to display the user’s domain name on the webmail login page. I see how it’s done in Squirrelmail. But how can I grab that info for a simple ‘echo’ in the webmail template? I’ve searched for the variable Siteworx is using with no luck.

Similarly, if a user accesses the webmail page with an IP instead of a domain, can the server’s hostname or smtpgreeting be displayed (without a DNS lookup)?

Hy sysnop,

Did you ever get this figured out? An easy way doesn’t immediately jump to mind for me. How does/did squirrelmail do it?