Limiting matches SMTP template rules to envelope and headers

Limiting matches SMTP template rules to envelope and headers
Partial fix for issue #32