Relay messages from remote client to anywhere with postfix
I'm connected to the internet at home with DSL and using Mozilla mail with IMAP. I'm trying to configure postfix on a machine in a different domain. Right now I can receive mail from anywhere, but I can only send it anywhere if I ssh to the mail server and send it from there. If I try to send a mail with Mozilla from here at home I can only send it to addresses under the domain that the mail server machine is on.
If I try to send from here at home with Mozilla to anywhere else in the world I get the message: "An error occurred while sending mail. The mail server responded: <joe@blow.com>: Recipient address rejected: Relay access denied. Please check the message recipients and try again." I've been reading posts for hours and I've tried playing with the files network_table, relay_domains , destinations, and main.cf. No luck so far. Can anyone tell me *specifically* how to make this work? All I can find in all the posts I've read are little pieces of this puzzle, and none of them seem to work. |
Take a look at:
http://www.postfix.org/basic.html#relaying More specificly: http://www.postfix.org/basic.html#mynetworks |
Thanks for the reply David. I read a lot of that stuff on postfix.org last night. Right now I have
main.cf:mynetworks = hash:/etc/postfix/network_table network_table:xxx.xxx.0.0/16 relay There are, of course, numbers instead of x's to identify my DSL ip. And I did that "postmap network_table" thing, which builds network_table.db. But none of that has fixed the problem. |
Okay, I fixed this one on accident. On a whim, I did an nslookup and replaced my home computer's IP with it's domain name in the network_table file. I don't know why it worked, but it did. So I guess under some conditions you have to use a domain name instead of an IP.
I still don't know how secure this is. I still have to log into IMAP with my password, so I believe this prevents other people on the same DSL domain from relaying through my mail server. Please correct me if I'm wrong about this. |
All times are GMT -5. The time now is 01:55 PM. |