In the address2userdomain routine, $user and $domain seem to be reversed.. Was trying to write a custom function and after a little head scratching, and some debugging found that $message->{todomain} contained the username not the domain :) Reversed the two in the function and all worked well :) Anyway, just FYI Derek