Allowing an IP to send email using my email server...
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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!
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.
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!
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.