I am currently writing a simple filter and forward script. Essentially when an email comes to a certain domain it is passed to the script. The script checks a database to see where the email should be forwarded to and then it also does a lookup against a filter table to see if the body of email should be stored. (This is for a research project in the university) The script does work fine except for one problem. Lets says that an email sent to test@test.com is supposed to forward to tertullian@hotmail.com. Well if I send an email from tertullian@hotmail.com to test@test.com the script does match all of the searches correctly and in the messages that I write to a log file it even says that it successfully forwards the email but the email never arrives. Unfortunately I am not on my own server and I don't have access to the logs to see if any error messages are being written. If I send the email from any other address it works without a problem but it seems that if the from address and the forward address are the same then the email is lost in a big black hole. I am using Mail::Audit and doing a simple resend(). Have any ideas?
: I am still having this same problem. I have made all of the changes that have been suggested unless otherwise noted in one of my responses. Everything seems to work fine but the email never arrives. Does anyone have any good ideas?