Postfix in Mac OS X 10.5 not working

I'm currently working on a project that would need to send email from my list of users.

Based on the search I've done, I could send formatted email from my server using Postfix.

I setup my mac adding a few lines below:

/etc/hostconfig
MAILSERVER=-YES-

/etc/postfix/main.cf

$myhostname = localhost
$mydomain = localhost

I try to send to my local using the command below.

mailx -s "test" user@localhost
the body
.

I can successfully send an email to my local mail.

Howerver, I could not send an email to gmail.com.

How can i setup my postfix to allow me to send email to gmail?

Your help will be greatly appreciated.

Regards

Rolly

First of all you need a real dns name ( not a localhost ), because google com not provide a mail service delivery for localhost or some else domain without normally name, such as mymailserver.com, mail.myserver.com with MX DNS record.

Next, you need check your ip in consist of spammer black list (PBL, XBL). This can check on spamhaus resource.

And the last, You need reconfigure your server for sending and delivery mail.