LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 09-08-2003, 10:00 AM   #1
culprit
LQ Newbie
 
Registered: Sep 2003
Posts: 3

Rep: Reputation: 0
Allowing an IP to send email using my email server...


I feel like such a newbie, but I gotta ask... I've got a Linux box acting as our work email server. I have a home user with a static IP address. This home user cannot open his email client and send email using my email server as the SMTP server because his connection to the Internet is an IP address that my server will not accept. I thought this was a hosts.allow issue, but cannot seem to get it working no matter what I do. I know it's got to be something simple, but I'm obviously missing it. Please give me some direction. Thx!
 
Old 09-08-2003, 12:54 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Welcome to LQ.

It could be a firewall issue:
iptables -L

If the machine itself isn't connected to the net you amy need to forward port 25 from the device with the public ip to the address of the mail server.
 
Old 09-08-2003, 01:48 PM   #3
mychl
Member
 
Registered: Jul 2001
Location: Earth
Posts: 164

Rep: Reputation: 30
what you can do is in /etc/mail/access

put the ip, and relay, or accept

Then do makemap hash /etc/mail/access.db < /etc/mail/access

Then your mail server will know what to do when it gets mail from him..... THIS ONLY WORKS IF YOUR USERS EMAIL ADDRESS IS NOT FROM YOUR DOMAIN.....

I think you need to have your remote user go over his email settings.... as long as he has an account on your mail server, then sendmail really shouldn't care what IP he is connecting with, its the user name and authentication that'll let him in.
 
Old 09-08-2003, 02:14 PM   #4
culprit
LQ Newbie
 
Registered: Sep 2003
Posts: 3

Original Poster
Rep: Reputation: 0
Reading over the replies I discovered my original post was not a thourough description of the problem. My home user has an Internet connection through COMCAST.NET. He takes his work laptop home and checks his work email fine (ex. work email = WORKEMAIL.COM) and he can reply to anyone within that same domain (ex. joe@workemail.com & susan@workemail.com) using his normal work email settings. The problem arises when he recieves and email from someone outside of the work domain and tries to reply to them (ex. jim@somewhereelse.com) because our email server does not allow relaying. Hope that makes better sense. I've not quite worked through the first replies, but I hope I made the question clearer for future replies. Thx again!
 
Old 09-08-2003, 02:18 PM   #5
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Take a look at:
/etc/mail/access

You can setup a relay for the users IP in there.
 
Old 09-09-2003, 09:55 AM   #6
culprit
LQ Newbie
 
Registered: Sep 2003
Posts: 3

Original Poster
Rep: Reputation: 0
Looks like /etc/mail/access was the fix. I did, however, run into another problem. His IP is not static, it's "persistent"... meaning it stays the same for a few months. So, rather than changing the relayed IP in the future can I just place his email address in the file with RELAY next to it? I planned to try this, but is that going to work?
 
Old 09-09-2003, 10:08 AM   #7
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
We accidentally did the same, and it worked. We had a line:
foo.bar RELAY
in /etc/mail/access, and some notebooks configured to be in domain foo.bar can send mail from here and from home, too.

Strangely enough, so far no spammers tried to relay though our mail server pretending he sends his mail from our domain - though that would be a handy idea.

Based on my experiences, I think one can allow relaying based on domain name, but things may change...

I wonder if it is possible to specify an IP address range in /etc/mail/access? It would be still better.

Last edited by J_Szucs; 09-09-2003 at 10:12 AM.
 
Old 09-09-2003, 12:24 PM   #8
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Yes you can use ip addresses. Although I haven't tried it I would anticipate dynamic dns addresess working equally well too.
 
  


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
Need to set up personal SMTP server to send email Whiskers Linux - General 3 08-29-2004 02:33 PM
Can't send email outside my server with sendmail rocketman3245 Mandriva 1 07-28-2004 10:01 PM
spammer using my mail server send spam email pd5c18 Linux - Networking 2 07-14-2004 01:32 AM
Best way to send server messages via email? swiftnet Linux - Software 0 07-08-2004 11:04 AM
Using Postfix the send email via another smtp server - to anyone. scarstens Linux - Newbie 1 01-27-2004 03:31 PM


All times are GMT -5. The time now is 11:36 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration