Search code examples
proxyoutlookpac

Outlook through .PAC file


I'm trying to get my head around a PAC file and apply it to Outlook. All traffice is sent through proxy "A" but Outlook can not get through that and has to go through proxy "B" I have no control over any rule set (government org) so can not make changes to said proxies. I have been told that it MUST be through a PAC file.

As it stands users have everything set through proxy "A" and can only access mail through outlook.office.com, not ideal for mobile users who need mail offline.

My own attempt has (obviously) not worked, below, but is there a way to isolate Outlook like I am proposing?

function FindProxyForURL(url, host) {
  if (shExpMatch(url, "*.office.com") || shExpMatch(url, "*.office365.com") || shExpMatch(url, "*.mail.protection.outlook.com") || shExpMatch(url, "*.protection.outlook.com")) {
    return "PROXY xx.xx.xx.B:8080";
  } else {
    return "PROXY xx.xx.xx.A:8080; DIRECT";
  }
}


Solution

  • Was placing the PAC file on the local client. It must be on a web server now. I tested it on a local WAMP installation and further on an actual web server and all worked as expected.