LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-21-2002, 09:46 AM   #1
SkYzOpReNiCk
Member
 
Registered: Feb 2001
Location: Costa Rica
Distribution: SuSE
Posts: 47

Rep: Reputation: 15
Unhappy relay postfix


Can someone could tell me how to relay with postfix?

Thanks
 
Old 01-21-2002, 02:09 PM   #2
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
Re: relay postfix

Quote:
Originally posted by SkYzOpReNiCk
Can someone could tell me how to relay with postfix?

Thanks
What kidn of relaying are you talking about exactly? There are a few different ways to interpret it.
 
Old 01-21-2002, 09:32 PM   #3
SkYzOpReNiCk
Member
 
Registered: Feb 2001
Location: Costa Rica
Distribution: SuSE
Posts: 47

Original Poster
Rep: Reputation: 15
Unhappy

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?

Thanks

 
Old 01-21-2002, 09:49 PM   #4
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
Quote:
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?

Thanks

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
 
Old 01-22-2002, 10:16 AM   #5
SkYzOpReNiCk
Member
 
Registered: Feb 2001
Location: Costa Rica
Distribution: SuSE
Posts: 47

Original Poster
Rep: Reputation: 15
Unhappy

Well Thanks for the help, but this is not going to work. Because all the users are going to access by Dialup to another ISP, so I need to give them to relay all those guys, how I'm going to know which ip address they came from.
 
Old 01-22-2002, 10:32 AM   #6
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
Quote:
Originally posted by SkYzOpReNiCk
Well Thanks for the help, but this is not going to work. Because all the users are going to access by Dialup to another ISP, so I need to give them to relay all those guys, how I'm going to know which ip address they came from.
Make sure they don't try to use ssh tunneling, port forwarding and so on, then you can simply use the pop-before-relay scheme. The server will know which IP they come from as long as they "check for new mail" before they try to send it. The pop3 server needs to be patched (qpopper patch available, see links at bottom of this post) to log IP addresses of people who login to the server. Qpopper will save this IP address in a file, and this file is read by postfix when a relay attempt is made.

If the person attempting to relay has his/her IP address in that file, he'll be allowed to use postfix as a relay server.

That really is the best way for this kind of dynamic IP allocation.

Start reading http://www.postfix.org/faq.html#mobile

and
http://mail.cc.umanitoba.ca/drac/

Oh, I totally forgot: you can try working with SMTP authorization. It works quite simple as long as people's email clients support this. Before they send mail to your server they login to the smtp server first. If the username and password are accepted, they'll be authorized to use the server as a relay.

Postfix has support for this. Read the HOWTO at
http://www.thecabal.org/~devin/postfix/smtp-auth.txt
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[postfix] allow relay from 1 ip narmida Linux - Software 3 12-01-2005 12:20 PM
postfix and relay host mozilla Linux - Networking 1 11-23-2005 08:42 PM
Postfix as a mail relay (getting relay access denied) hypexr Linux - Software 3 09-13-2005 07:15 PM
Postfix Relay eeades Linux - Software 0 02-01-2005 03:44 PM
Postfix relay problem txtoolman Linux - Software 0 12-16-2003 01:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration