Having trouble configuring postfix relaying
I currently have a web server configured with Apache, BIND, Postfix, VM-Pop3d and all that wizzwozz and have just successfully got Postfix working correctly with pop-before-smtp (PERL), i'm having trouble with relaying though.
I have a list of IP Addresses and domain names which I need to allow access to the SMTP server (Postfix) for them to send E-mails to wherever they please (Any other E-mail address on the Internet, not just internal network).
I have read the Postfix FAQ and MAN Pages repeatedly and they've provided me with no clarity. I eventually got pop-before-smtp working using some scripts I found after a heavy search on Google which gave contrary information to the Postfix man pages. But that's besides the point =)
My question; What information do I need to place in main.cf etc. to allow people who have an E-mail address which is '*@domain1.com' or '*@domain2.com' to use the SMTP element of Postfix on my server. Note; domain1.com and domain2.com have nothing to do with my server, they'll be external addresses hosted elsewhere on the Internet. And they'll be sending to somewhere else in the world which also will have nothing to do with my server. I'm guessing that's why they call it relaying.
At the moment I have tried putting the below line in main.cf:
relay_domains = $mydestination, $mynetworks, hash:/etc/postfix/relay-domains
and in /etc/postfix/relay-domains (pre-postmap) I have:
This doesn't work.
Any other info needed let me know, thanks.