Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Logparser "Prompts Press A Key" Exchange 2010 SMTP Send Log

Posted on 2015-02-05
2
Medium Priority
?
639 Views
Last Modified: 2015-02-05
Exchange Server 2010 Enterprise SP3 RU 8 64 bit
Windows 2008 R2 64 bit
Log Parser 2.2

create this logparser script

@echo off

del smtp2.txt

"C:\Program Files (x86)\Log Parser 2.2\logparser.exe" "SELECT CASE TO_INT( SUBSTR(DATA,0,3)) when NULL then 0 else TO_INT( SUBSTR(DATA,0,3)) END AS RemoteHostReturnCode, data, count (*) AS hits FROM D:\Progra~1\Microsoft\Exchan~1\V14\TransportRoles\Logs\ProtocolLog\SmtpSend\SEND*.log WHERE RemoteHostReturnCode > 400 AND context <> 'Certificate thumbprint' AND context <> 'sending message' GROUP BY RemoteHostReturnCode, data ORDER BY hits DESC" -i:CSV -nSkipLines:4 -o:w3c >c:\util\smtp2.txt

Exit

Open in new window



This was running on my exchange 2007 enterprise server and once in awhile I had this same issue.

The output show this

#Software: Microsoft Log Parser
#Version: 1.0
#Date: 2015-02-04 20:05:05
#Fields: RemoteHostReturnCode data hits
421 421 4.7.0 [TS01] Messages from zz.zz.zzz.z temporarily deferred due to user complaints - 4.16.55.1; see http://postmaster.yahoo.com/421-ts01.html 29460
550 550 Requested action not taken: mailbox unavailable 2734
451 451 Temporary local problem - please try later 1970
452 452-4.2.2 The email account that you tried to reach is over quota. Please direct 1655
452 452-4.2.2 the recipient to 1655
421 421-4.7.0 unsolicited mail originating from your IP address. To protect our 1103
421 421-4.7.0 rate limited. Please visit 1103
421 421-4.7.0 http://www.google.com/mail/help/bulk_mail.html to review our Bulk 1103
421 421-4.7.0 users from spam, mail sent from your IP address has been temporarily 1103
450 450 4.7.1 <SERV025.our.network.mydomain.com>: Helo command rejected: Host not found 921
Press a key...


This script is run automatically once a week vi task manager.

But it stops on "Press a key"   I have to Kill the Process in order for it to end.

It ran ok for about two weeks now it has not

It reads the SMTP SEND log file  

A bad record?

Anyway in logparser to bypass this?
0
Comment
Question by:Thomas Grassi
2 Comments
 
LVL 25

Accepted Solution

by:
NVIT earned 2000 total points
ID: 40591847
Try adding the -q:ON and / or -iw:ON switches. See the LogParser help for Global Switches:
@echo off

del smtp2.txt

"C:\Program Files (x86)\Log Parser 2.2\logparser.exe" "SELECT CASE TO_INT( SUBSTR(DATA,0,3)) when NULL then 0 else TO_INT( SUBSTR(DATA,0,3)) END AS RemoteHostReturnCode, data, count (*) AS hits FROM D:\Progra~1\Microsoft\Exchan~1\V14\TransportRoles\Logs\ProtocolLog\SmtpSend\SEND*.log WHERE RemoteHostReturnCode > 400 AND context <> 'Certificate thumbprint' AND context <> 'sending message' GROUP BY RemoteHostReturnCode, data ORDER BY hits DESC" -q:ON -iw:ON -i:CSV -nSkipLines:4 -o:w3c >c:\util\smtp2.txt

Exit

Open in new window

0
 
LVL 23

Author Closing Comment

by:Thomas Grassi
ID: 40592700
Added both

Ran successfully

Thanks for the help.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If something goes wrong with Exchange, your IT resources are in trouble.All Exchange server migration processes are not designed to be identical and though migrating email from on-premises Exchange mailbox to Cloud’s Office 365 is relatively simple…
Mailbox Corruption is a nightmare every Exchange DBA wishes he never has. Recovering from it can be super-hectic if not entirely futile. And though techniques like the New-MailboxRepairRequest cmdlet have been designed to help with fixing minor corr…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month8 days, 22 hours left to enroll

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question