How to drop a message

The correct syntax is

if [message] =~ /^# Time:/ {

but otherwise it should work. Of course, none of the messages in your example begin with "# Time:".