You may use the script below in the Exchange Management Shell to list all mailboxes that are forwarding in Microsoft Exchange Server 2007.

<#
.SYNOPSIS
This script will provide a list of all Microsoft Exchange 2007 email addresses that are forwarding emails.
.DESCRIPTION
This script will automate the process of creating a list of all Microsoft Exchange 2007 email addresses that are forwarding emails.
.EXAMPLE
N/A.
.AUTHOR
Written by Noel Enrique Alvarez on Thursday, March 24, 2016.
#>

#Request the name of the output file
$File = Read-Host “What would you like to name the file?”

#Provide a list of all email addresses that are forwarding emails
Get-Mailbox | Where {$_.ForwardingAddress -ne $null} | Select Name, SamAccountName, PrimarySmtpAddress, ForwardingAddress, DeliverToMailboxAndForward | Out-File -filepath “<<<INSERT PATH>>>\$File.txt”