I need to check for 'invalid' From and To headers in our inbound email
(primarily to catch spam that inserts '[EMAIL PROTECTED]' into
either header.)  Does anyone have an example of how they did this or
pointers on where to wedge it in?

open FH, "<HEADERS" or md_syslog("warning","couldn't open headers file");
my($from);
while(<FH>){
if($_ =~ /^from:/i){
$from=substr($_,5);
last;
}
}
$from contains the from address including name, similarly you can to for To header
_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to