[rt-users] Retrieving the computer name automatically

Dirk Pape pape-rt at inf.fu-berlin.de
Tue Nov 11 02:45:59 EST 2008


Hello,

--Am 10. November 2008 14:15:08 +0000 schrieb Tony A <localzuk at gmail.com>:

> My thoughts were down the lines of using dns resolution based on the IP
> address. I can't really rely on the IP address itself, as this may well
> have changed by the time I get round to dealing with it.
>
> So ideally, it'd just be a case of retrieving the REMOTE_HOST variable,
> running dns resolution against it and using the result of that. But my
> perl/scrip/RT knowledge is not yet at that level.

I have coded such a solution on basis of my ExtractCustomFieldValues 
extension (ECFV). The solution works with the WebInterface by adding the 
value of REMOTE_HOST as an Email-Header. It works also with the 
Email-Interface provided your receiving SMTP-Server writes such a header 
like "SenderIP: xxx.xxx.xxx.xxx" into the Mail.

ECFV scans the mail for this header and adds two CustomFieldValues (Host-IP 
and HostName, you can name it like you wish). The latter is revealed by 
DNS-resolution. This worked well for years, but I did not test the patch 
against the 3.8 line of RT.

I can provide the patch and the configuration line in the template for ECFV 
later this day.

Regards,
Dirk.





More information about the rt-users mailing list