First, mailservers are not a toy. If your mailserver is always connected to the net, you should be aware of what you're doing. O'Reilly offers an excellent Sendmail book, that should help you learn. Next, if the mailserver is on the same machine as the script engine, it shouldn't be a problem. I can't tell from here, why you get 550s, but what does your /etc/mail/access say? Something like "127.0.0.1 relay"? That would be the correct entry for localhost.