LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   trying to set up a mail relay (I think that's what I want at least) (https://www.linuxquestions.org/questions/linux-server-73/trying-to-set-up-a-mail-relay-i-think-thats-what-i-want-at-least-857355/)

temlehdrol 01-19-2011 02:21 PM

trying to set up a mail relay (I think that's what I want at least)
 
Hopefully this is the right spot for this. I'm using centOS and Atmail for my mail server. What I would like to do is to route mail through the mail server for external accounts. I'll try to explain what I mean.
Lets say that jon@abc.com is an account "attached" to the atmail server (internal mail only) and bill@roadrunner.com is obviously from a "outside" account. What I would like is to route the mail for bill@roadrunner.com through the atmail server so he can send jon a email. The setting in outlook for example would be something along the lines of:
popserver: the roadrunner address
smtp: atmail ip address

As of now Jon can send Bill email but Bill can't respond since abc.com isn't being directed to the atmail server from the outside world.
Before I forget, if I change the smtp server to the atmail account for Bill he can email Jon but not anyone on the outside, even though Jon can email Bill and people on the outside.
Am I being clear enough? I know reading it, it seems kinda convoluted.

kbp 01-19-2011 03:49 PM

It does seem a bit convoluted :) ... sounds like your mail server isn't relaying. Assuming that bill@roadrunner.com is an internal user (on your lan), you will need to configure your mail server to allow relaying for local networks. I haven't used Atmail so I can't give you a step by step .. but please don't allow relaying based on the senders address, the spammers will find you. Bills email program needs to be configured to send via your Atmail server, the mail flow is bit kludgy but will look something like :-

[email Bill->Jon]--<smtp>--[Atmail server]--<pop3>--[Jon]
[email Bill->Cindi]--<smtp>--[Atmail server]--<smtp>--[uknown mail server]--pop3--[Cindi]
[email Jon->Bill]--<smtp>--[Atmail server]--<smtp>--[roadrunner server]--pop3--[Bill]

Note: You may find that other peoples mail servers will reject your email as spam because you don't have a valid MX record for your server

hth

Berhanie 01-19-2011 09:47 PM

for bill to send mail to jon, abc.com should have an MX record pointing to your mail server. changing the outgoing mail server on bill's outlook is not the way to do it.

temlehdrol 01-20-2011 06:17 AM

Let me answer the questions the best I can ( still really new to this, obviously).
Yes the users for both addresses are all local, there is technically a 3rd email that will eventually be global vs internal only (abc.com will always be internal only). However in order to get approval to move forward with this "project" I need to be able to have all 3 send mail to all 3. Yet again, the two internal ones are still working fine as would be expected.
So I'm guessing some where buried in the config file is something about relaying and I want to set that up based on the lan domain and not the address which makes sense. I'll see what I can find.
As far as the MX Record goes, I'll need to look that one up (not sure what it is). Though I believe that is what tells mail to go to "this ip address"?

kbp 01-20-2011 06:37 AM

An MX record is a dns entry that advertises your mail server to the world and is what you need if you want to accept email from anyone that isn't internal.

cheers

temlehdrol 01-20-2011 09:38 AM

Great news, and no it's not working yet.
So I was doing some more digging around and reading through the config file. I believe I have figured out why the relay isn't working. It appers that the DNS server is hosed, so when it (the mail server) goes to check if this is a local host it gets a response of no and looks some place else (still not 100% sure how this works) of which then decides that I shouldn't allow this through and stops it.
I'm going to contact Atmail again with this new find and see if they have any ideas.
Thanks for the help so far.

temlehdrol 01-21-2011 06:16 AM

Ok well the Linux network/mail fairy has done something because it is now working. Just not sure if I'm doing it the best way. I've got it working by IP Address with the relay. We use terminal services, so there aren't a lot of different IP Addresses being used. I found out DNS is basically hosed, which is why I'm not able to get it to work based on allow by local domain. Hopefully when we get our new network up and running that will be fixed. But for now it seems to work with my account, I'm going to give it a day or two and then move a few other people over, and then a few more to be sure everything works (the server is about 9 years old and hasn't had much of a load on it since moving to CentOS).
Thanks for all the input though, at least moving forward I have a little bit more knowledge.


All times are GMT -5. The time now is 12:25 PM.