LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   PostFix Mail Relay... (https://www.linuxquestions.org/questions/linux-networking-3/postfix-mail-relay-219535/)

CRCool75 08-18-2004 10:53 PM

PostFix Mail Relay...
 
Does anybody know how to get post fix to relay mail for only one user? I quite often use my email outside of the office, but am unable to send mail to anybody outside of our network.

Thanks!

djbanaan 08-19-2004 05:22 AM

If you have a static IP, you could add that to "mynetworks" in main.cf.

Since static IP's are rare and most of my users also had the desire to be able to access e-mail from outside the office, I setup VPN using PoPToP. This way they get an IP from inside the office subnet, so no changes to the relay setup required. The connection to PopToP is easy to setup on any Windows or Linux client.

bastard23 08-19-2004 01:33 PM

Use SMTP AUTH. Take a look at sample-auth.cf on how to enable SASL (system used by smtp auth). It'll take some configuration, but SuSE should have it installed. It's the way everybody should be doing it, and it isn't too hard to setup. Modern email clients support this.

Another way is to use "POP before SMTP". It ain't the best way, but it's been used for years. This is a start for postfix http://www.stahl.bau.tu-bs.de/~hilde...-smtp_en.shtml.

There is a way to use the "MAIL FROM:" address to allow relaying, but it is bad etiquette to do so (once a spammer/abuser finds it, your MTA will spew mail everywhere). Quoting Ralf above in fact this restriction is used only by administrators who have no grasp of how SMTP actually works.. But now I'll point out the rope and tree. You'll have to tie your own noose ;). Take a look at sample-smtpd.cf, specifially the check_sender_access restriction and smtpd_recipient_restrictions. (and if it don't work, don't ask, I've never done it.)

Don't hang yourself,
chris

CRCool75 08-20-2004 01:28 AM

Quote:

Originally posted by bastard23
Use SMTP AUTH. Take a look at sample-auth.cf on how to enable SASL (system used by smtp auth). It'll take some configuration, but SuSE should have it installed. It's the way everybody should be doing it, and it isn't too hard to setup. Modern email clients support this.

Another way is to use "POP before SMTP". It ain't the best way, but it's been used for years. This is a start for postfix http://www.stahl.bau.tu-bs.de/~hilde...-smtp_en.shtml.

There is a way to use the "MAIL FROM:" address to allow relaying, but it is bad etiquette to do so (once a spammer/abuser finds it, your MTA will spew mail everywhere). Quoting Ralf above in fact this restriction is used only by administrators who have no grasp of how SMTP actually works.. But now I'll point out the rope and tree. You'll have to tie your own noose ;). Take a look at sample-smtpd.cf, specifially the check_sender_access restriction and smtpd_recipient_restrictions. (and if it don't work, don't ask, I've never done it.)

Don't hang yourself,
chris

Where would the sample-auth.cf file be?

bastard23 08-20-2004 04:07 AM

It's in /etc/postfix or /usr/share/doc/packages/postfix/sample depending on what version of postfix and SuSE packaging. There is also a SASL_README included with the postfix distribution. You should be able to skip over the cyrus sasl (a specific implemntation of sasl (Simple Authentication and Security Layer)) compilation as SuSE should already have it packaged and postfix linked against it. Take a look at /usr/share/doc/cyrus-sasl/doc for the nitty gritty of SASL. The readme should get you running. If not feel free to post some specific problems here or in a new thread.

Good Luck,
chris


All times are GMT -5. The time now is 01:33 AM.