Outlook Safe Senders List via GPO not deploying

Hi All

Im trying to add mydomain.com to the safe senders list, ive made all the appropiate amendments to the GPO in question

it seems to load the path of the safe list which is \\domaincontroller\netlogon\safelist.txt to the registry of the computers in question but when I load outlook and look in the safe senders lists its not in there and the emails are still going to junk mail.

Im not sure what to try now

Exchange 2007 and outlook 2007
DavidAsked:
Who is Participating?
 
cyberlopez6Commented:
This code works with both Outlook 2003 & Outlook 2007 and can be run from a login script.

Place the 3 files in your NETLOGON folder on a Domain Controller (or you can add the VBScript to an existing login script).

Modify the VBScript to replace the reference to "mydomain.com" with a valid path in line 63

Modify the SafeSenders.txt file with the domains you want to whitelist.

The Tag File is just a place-holder that is copied to the local workstation and used to prevent the script from running multiple times for the same user/workstation.  To reset this, in the event you add to the SafeSenders.txt file in the future, modify the VBScript and increment Version number in line 7 (Const Tag_File = "SafeSenders-Version-1.txt").

Sounds complicated, but its really not, and it works great  ;)

Call SetSafeSenders()

Sub SetSafeSenders

	DIM objFSO, objFolder, username, shell, pcname
	Const HKEY_CURRENT_USER = &H80000001
	Const Tag_File = "SafeSenders-Version-1.txt"

	set shell = WScript.CreateObject( "WScript.Shell" )
	inst_folder = shell.ExpandEnvironmentStrings("%ALLUSERSPROFILE%")
	userprofile = shell.ExpandEnvironmentStrings("%USERPROFILE%")

	' if already deployed, skip & goto end
	set objFSO = CreateObject("scripting.FileSystemObject")
	IF objFSO.FileExists(USERPROFILE & "\TagFiles\" & Tag_File) THEN
	   Exit SUB
	END IF

	strComputer = "."

	Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")

	strKeyPath = "Software\Policies\Microsoft\Office\11.0\Outlook\Options\Mail\"
	objReg.CreateKey HKEY_CURRENT_USER,strKeyPath
	strEntryName = "JunkMailSafeSendersFile"
	strValue = "\\lefdomain.com\netlogon\safesenders\safesenders.txt"
	objReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,strEntryName, strValue

	strKeyPath = "Software\Policies\Microsoft\Office\11.0\Outlook\Options\Mail\"
	strEntryName = "JunkMailImportAppend"
	strValue = 1
	objReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strEntryName, strValue

	strKeyPath = "Software\Policies\Microsoft\Office\11.0\Outlook\Options\Mail\"
	objReg.CreateKey HKEY_CURRENT_USER,strKeyPath
	strEntryName = "JunkMailImportLists"
	strValue = 1
	objReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strEntryName, strValue

	strKeyPath = "Software\Policies\Microsoft\Office\12.0\Outlook\Options\Mail\"
	objReg.CreateKey HKEY_CURRENT_USER,strKeyPath
	strEntryName = "JunkMailSafeSendersFile"
	strValue = "\\lefdomain.com\netlogon\safesenders.txt"
	objReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,strEntryName, strValue

	strKeyPath = "Software\Policies\Microsoft\Office\12.0\Outlook\Options\Mail\"
	strEntryName = "JunkMailImportAppend"
	strValue = 1
	objReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strEntryName, strValue

	strKeyPath = "Software\Policies\Microsoft\Office\12.0\Outlook\Options\Mail\"
	objReg.CreateKey HKEY_CURRENT_USER,strKeyPath
	strEntryName = "JunkMailImportLists"
	strValue = 1
	objReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strEntryName, strValue

	' create TagFiles folder if not already there.
	set objFSO = CreateObject("scripting.FileSystemObject")
	IF objFSO.FolderExists(USERPROFILE & "\TagFiles")=FALSE THEN
	   set objFolder = objFSO.CreateFolder(USERPROFILE & "\TagFiles")
	END IF

	objFSO.CopyFile "\\yourdomain.com\netlogon\safesenders-tag-file.txt", USERPROFILE & "\TagFiles\" & Tag_File, OverwriteExisting

END SUB

Open in new window

SafeSenders.txt
SafeSenders-Tag-File.txt
0
 
Nenad RajsicCommented:
do you have this key in your registry?

HKey_Current_User\Software\Microsoft\Office\12.0\Outlook\Options\Mail
DWORD = JunkMailImportLists
Value = 1
0
 
DavidAuthor Commented:
Yes Ive tried this but no luck
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 
Nenad RajsicCommented:
I used this on 2003 before and never had any problems. Maybe this article will help
http://social.technet.microsoft.com/Forums/en/exchangesvrclients/thread/3d3abee5-ebf2-4dae-9f48-300b93af07c8
0
 
DavidAuthor Commented:
We have tried that manually in regedit but not in the custom template method,

I have just turned off junk mail protects so we dont have any problems for now, but still cant see why the safe senders list wont appear in outlook even though it has been read i guess?
0
 
cyberlopez6Commented:
Oops.. forgot 2 references...

You also need to modify Lines 26 & 43 with a valid path.
0
 
DavidAuthor Commented:
Thanks that seems to have done the trick!! Im just in the position now whether to put junk mail filter protection back to low or keep it on none. Only time will tell i guess

Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.