LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-31-2004, 06:16 AM   #1
svartrev
LQ Newbie
 
Registered: Mar 2004
Location: Cape Town, South Africa
Posts: 21

Rep: Reputation: 15
qmail open realy client problem


I have a slight problem. I have a qmail server on the local network. in /etc/tcp.smtp I have allowed relaying from localhost and the martian addresses on the LAN. However, some of the people at the office need to be able to use their accounts from home.

They can receive mail fine, as they log into the pop server using their username/passowrd pair. But they can't send email, getting an error stating that they aren't in the rcpthosts file. Now, /etc/tcp.smto overrides the rcpthosts file, but only allows localhost and LAN relaying. As the people at home are on dialup accounts, they don't have permanent IP addresses, so the only way to allow them would be by allowing everyone to relay through my server.

Wouldn't that be a dumb idea? How can I let only the people I want relay from the wild, while stopping everyone else?

Any ideas? What really little thing am I missing?
 
Old 03-31-2004, 09:22 AM   #2
mako747
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware
Posts: 92

Rep: Reputation: 15
Are they connecting from home through webmail? i.e. Horde, Squirrel?

And if not, why not?
 
Old 04-01-2004, 02:29 AM   #3
svartrev
LQ Newbie
 
Registered: Mar 2004
Location: Cape Town, South Africa
Posts: 21

Original Poster
Rep: Reputation: 15
No, actually, they are using Outlook both from the office and from home. I just haven't had time to set up SquirrelMail yet (plus my boss doesn't want it, he wants to use Outlook). I know SquirrelMail would be an ideal solution, but surely there must be one for the Outlook situation?
 
Old 04-01-2004, 09:48 AM   #4
mako747
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware
Posts: 92

Rep: Reputation: 15
I think that the boss will have to make a choice between convenience and security.

http://www.palomine.net/qmail/relaying.html
 
Old 04-02-2004, 01:31 AM   #5
svartrev
LQ Newbie
 
Registered: Mar 2004
Location: Cape Town, South Africa
Posts: 21

Original Poster
Rep: Reputation: 15
Yar, I think I'll have to go with Squirrelmail, but it just puzzles me, how do commercial ISPs offer email to all their cleints? Are they perhaps open relay clients?

I mean, you have to log on to pop servers, isn't there some way to require logon to smtp servers?

Perhaps a mangling rule on the firewall that might check the from line of the email? --Ok, ok, I'm reaching...

Thanks for the advice, mako747
 
Old 04-02-2004, 11:01 AM   #6
mako747
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware
Posts: 92

Rep: Reputation: 15
I suspect that when you connect to an ISP to get your mail you are on their netblock, that is you dial in and are assigned an ip.
Most ISP's provide webmail services as well for other situations.
 
Old 04-02-2004, 11:21 AM   #7
fariz83
LQ Newbie
 
Registered: Mar 2004
Posts: 10

Rep: Reputation: 0
Hi:

I have done this with vpopmail, it comes with and smtp after pop authentication, so first you check your mail (pop) using your username and password, and then you are able to send mail (smtp) because it puts your current IP address inside the valid relaying table for a predefined period of time.

Also you do not need to set up real users and it has a lot of other features that you can play with. http://www.inter7.com/vpopmail.html

Federico
 
Old 04-06-2004, 02:38 AM   #8
svartrev
LQ Newbie
 
Registered: Mar 2004
Location: Cape Town, South Africa
Posts: 21

Original Poster
Rep: Reputation: 15
Well, after some discussion with my brother, who KNOWS THESE THINGS, I have come to realise the error of my ways.

Sorry if much of what I say is obvious, but I repeat it purely for clarification to both myself, and anyone reading this who is confuzzed liek I was.

Firstly, when you dial in to an ISP you are essentially on their local network, even if you have a relatively slow (ie modem) connection instead of a nice UTP cable connection, just like mako747 said. That is why you are allowed to forward smtp, because you are on the LAN using one of their IP addresses.

When qmail receives an email, it can only do one of two things with it. One, deliver it to the destination if that is on the system, or two, forward it to another smtp server if the destination is not on the system. It will only do the first one if the domain of the address is in the rcpthosts file, and it will only do two if the RELAYCLIENT environment variable is set when it is run, which gets set by tcpserver based on source IP address. Unlike pop, there is no username/password authentication, so the only way to allow using the server to send mail onwards is by using an IP address that is allowed to relay. This means either being on the LAN, or allowing EVERYONE to relay, which is generally considered a VERY BAD THING, with good reason. I know so far this is all very obvious, but here come the solutions. Number one, use SquirrelMail. This is my brother's preffered option. It is the most secure, and allows you to have one copy of the mail accessable from anywhere, at any time, no hassles. Secondly, use smtp-auth, which is an extension to the smtp protocol that allows using a username/password pair to authenticate before connecting to the smtp server. Thirdly, like fariz83 is doing, use pop first to authenticate, and have a mechanism that sets RELAYCLIENT for that IP address, allowing smtp relay, and expire it on a set interval.

Well, the third option is the least secure, and a bit of a kludge, but hey, it works, and vpopmail comes with this ability almost built in, just compile with the --enable-roaming-users=y option.

Option two seems like an ideal solution, and simple to implement in theory. You simply patch the qmail smtpd, and supply a password check program. The smtpd program runs the password checker, which gets the username/password, validates it, and returns either success or failure, and smtpd only accepts relaying if the password checker returns success. However, I have been having a little trouble with this option. I'll need to hack away a bit more, but I'll post any results I get.

Option one is still the best, but at this stage requires the most work. I need to install an IMAP server, as I currently only have a POP3 server running. Also, https is required, which is not correctly configured at our site yet. Oh, well, at least I like a challenge...
 
  


Reply



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
qmail /service/qmail-send: unable to open supervise mangueJOE Linux - Networking 20 04-19-2016 11:27 PM
Open Webmail / Mailfront / smtpfront-qmail / qmail-smtpd Apollo77 Linux - Software 2 01-20-2009 03:33 AM
qmail +qmail-qfilter + qmail-scanner-queue+qmail-user-masq.pl problem countcobolt Linux - Networking 0 07-08-2004 11:29 AM
Realy Realy Need some basics Essay Slackware 7 04-26-2004 04:59 PM
Realy Stupid Login Problem linsa Linux - Networking 1 07-26-2003 10:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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