Originally posted by SkYzOpReNiCk
The idea is the following:
I have installed postfix with qpopper, the server is for hosting and e-mail services. the problem that I got is that I could receive e-mail from anyone. The problem is sending, If I try to send e-mail from a dialup account or diferent network that is not from the server, it always send me the error of relaying denied.
How I could chance it?
Okay you need to tell postfix that the machine you are sending from is allowed to be a relay. To do this, postfix needs to know your IP address so it will allow your IP address to relay.
Now, there are a few ways of accomplishing this. The most common one is the so called pop-before-relay scheme, where you first download your email. The pop3 server you authenticate with stores your IP address in a database that postfix reads. If somebody tries to relay that database is accessed to see if it's an allowed IP address.
I developed a slightly different scheme called scp-before-relay. pop-before-relay doesn't work for me because I use ssh tunneling to get my email (port forwarding) as I don't like sending my password in plain text. With port forwarding the pop3 server thinks I'm logging in from the server itself (localhost) so it doesn't know my ip address still.
So how does my method work: every few minutes my machine sends a file by scp to the server into my home directory over there that contains my workstation's IP address. The server will check if a new file exists every few minutes and updates the postfix database accordingly if the IP address was changed. If my workstation doesn't upload a new file for more than 10 minutes, the relay authorization is removed (it means that my workstation can't reach the server, probably disconnected or network disruption, so we don't want somebody else being able to take my IP and take over. Those chances are slim, but better safe than sorry).
The full explanation + how to set it up can be read at http://hints.linuxfromscratch.org/hi...fore-relay.txt