Reply to: Bob McGregor
Re: [IMail Forum] Who's Forwarding? on Tuesday 11:05:51 AM
Thanks for both batch files. We will try them.
--
Roger Heath
[EMAIL PROTECTED]
www.rleeheath.com
----- Copy of Original Message(s): -----
B> here's a bat file that will list the forwards and where they are forwarding...
B> watch the wrap on the for line. also, you'll need to specify your imail directory
B> and location for saving... bob
B> @echo off
B> echo.
B> echo This batch looks for the file named forward.ima in each users
B> echo directory. It can be used to determine the accounts that have a
B> echo forward setup. It writes out a file of userids (folders) that have
B> echo the forward.ima file set. Resulting file is named forwards.log
B> echo I currenly have it writing out the new forward.ima entry for the user.
B> echo .
B> rem pause
B> d:
B> cd \imail
B> del GFPSAdmin\forwards.log
B> rem building userlist based on directory only
dir /B /AD users>>GFPSAdmin\dirlist.txt
echo.>>GFPSAdmin\forwards.log
B> echo Please wait while we create the file ...
B> rem This for loop loops through the dirlist.txt file looking for the filename
B> rem forward.ima in each folder in the file. If it finds it, it writes the
B> rem folder(userid) to the forwards.log file.
B> rem Note that this command must all be on one single line:
B> FOR /F "eol= tokens=1,* delims=/" %%i in (GFPSAdmin\dirlist.txt) do for %%i in
(.\users\%%i\forward.ima) do if exist %%i echo %%i forwards to >>
GFPSAdmin\forwards.log |type %%i >>
B> GFPSAdmin\forwards.log|echo. >> GFPSAdmin\forwards.log
B> rem echo Check file GFPSAdmin\forwards.log for details.
B> rem echo.
B> rem end
B> On Tuesday, May 27, 2003 9:47 AM, John Carter <[EMAIL PROTECTED]> wrote:
>>Roger:
>>I have created a "not ready for prime time" process to get the
>>forwarding information. In a batch file (or could run it as command
>>line), I run the following to get the directories containing forward.ima
>>files.
>>
>>cd\users
>>dir forward.ima /s >i:forwardingreport.txt
>>
>>Then I use a little VB program to read this file. It picks up the users
>>directory names, opens their forwarding file, and gets the forwarding
>>address. All this is dumped to another text file for use. It isn't
>>pretty, but it works.
>>
>>John
>>
>>====== VB code ===========
>>Private Sub Form_Load()
>>Open "i:\forwardreport.txt" For Input As #1
>>Open "i:\forwarding.txt" For Output As #2
>>While Not EOF(1)
>>Line Input #1, dataline
>>If InStr(dataline, "Directory of ") Then
>> dirname = Right(dataline, Len(dataline) - 16)
>> Open "i:" + dirname + "\forward.ima" For Input As #3
>> Line Input #3, forwardaddress
>> Close 3
>> user = Right(dirname, Len(dirname) - 7)
>> Print #2, user; Tab(40); forwardaddress
>> End If
>>Wend
>>Close
>>End
>>End Sub
>>====== end of code ====
>>
>>
>>Roger Heath wrote:
>>
>>>Is there an Imail utility any where that enables an Administrator
>>>to make a list of who is forwarding mail and to what addresses?
>>>
>>>I do not recall such a thing,
>>>
>>>--
>>>Roger Heath
>>>[EMAIL PROTECTED]
>>>www.rleeheath.com
>>>
>>>--
>>>ActivatorMail(tm) ver.0518031 Scanned for all viruses by
>>>www.activatormail.com intelligent anti-virus anti-spam service
>>>
>>>
>>>To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
>>>List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
>>>Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/
>>>
>>>
>>>
>>>
>>
>>
>>
>>To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
>>List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
>>Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/
>>
B> To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
B> List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
B> Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/
B> --
B> ActivatorMail(tm) ver.0518031 Scanned for all viruses by
B> www.activatormail.com intelligent anti-virus anti-spam service
--
ActivatorMail(tm) ver.0518031 Scanned for all viruses by
www.activatormail.com intelligent anti-virus anti-spam service
To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/