Forum Discussion

Russell_77729's avatar
Russell_77729
Icon for Nimbostratus rankNimbostratus
Nov 28, 2012

get SMTP headers for logging/email

We are in the process of migrating from Exchange 2003 to 2010. When I decommission my 2003 box I plan to setup a VS to handle any mail for systems still pointing to the old server. I am looking for an iRule to extract the message headers of these messages and either email them to me (preferred) or log them (second choice). Any help would be greatly appreciated.

 

3 Replies

  • 
    when CLIENT_ACCEPTED {
    if { [IP::local_addr] equals ""} {
    log local2.error "*****Connection on [IP::local_addr] from [IP::client_addr] *****"
    }
    }
     
  • Is there maximum header size do you know? There are no iRule commands that can parse SMTP headers but perhaps we can just log the first nnn bytes of each message? Better yet, if you just need the source IP, servername or email address we could perhaps pick that out.