Skip to main content
Question

Sophos Antivirus - client relay script

  • November 22, 2011
  • 5 replies
  • 14 views

Forum|alt.badge.img+11

!/bin/bash

echo "<result>"$(cat /Library/Sophos Anti-Virus/RMS/MRInit.conf | grep -e "ParentRouterAddress" | cut -d"=" -f 2 | cut -d"," -f 3 | tail -1 | sed 's/.{2}$//')"</result>"

5 replies

rob_potvin
Forum|alt.badge.img+26
  • Employee
  • February 1, 2012

What does this do? I get the result bill

Thanks


Forum|alt.badge.img+10
  • Contributor
  • July 24, 2012

This returns the server that Sophos gets its policies from, correct?


Forum|alt.badge.img+11
  • Author
  • Contributor
  • August 21, 2012

This is only useful if you're in a large environment with Sophos Message Relay servers. This returns the Message Relay server the client is pointed to, which is kept in mrinit.conf. This is the server uses to send and receive it's status and policy updates


Forum|alt.badge.img+21
  • Honored Contributor
  • August 22, 2012

Yep it the mrinit.conf that's they key :)

Actually useful for all types of environments and not just large ones! I am in a small environment with many Windows and Mac laptop users and I need to know and see if there are threats on the machines.


Forum|alt.badge.img
  • New Contributor
  • February 25, 2013

I use this CLI in my scripts. It's a little simpler. The one above doesn't seem to work for me.

head -n 12 /Library/Sophos Anti-Virus/RMS/MRInit.conf | tail -n 1

I wouldn't say it's only useful for Message Relay Environments. Any SEC-managed environment might need to confirm this line is correct.