Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
To clarify my.internal.domain.com is a virtual domain in my smtp server. my.external.domain.com is something we have hosted in an external server. So, should it still work?
The idea is to divert all the outgoing mails addressed to people in-house to the internal mail server. So, am I doing the right thing here?
The logs are under /var/log/qmail. The logfile is called current and there are a couple of them under the various subdirectories (this depends on the way you've installed qmail)
Quote:
To clarify my.internal.domain.com is a virtual domain in my smtp server. my.external.domain.com is something we have hosted in an external server. So, should it still work?
The idea is to divert all the outgoing mails addressed to people in-house to the internal mail server. So, am I doing the right thing here?
Huh, don't get what exactly you want to do.
If you want mail for my.internal.domain.com delivered locally to my.external.domain.com, you need to use setup the usual .qmail files for the virtual domain
Thanks for that link. It clarifies things. But the virtual domain applies to all the incoming mails.
Quote:
Huh, don't get what exactly you want to do.
I shall try to explain that better here. We have an email system hosted on a third party server, say external.com. I have just created this internal email system, say internal.com, which is not available outside the intranet. What I am doing here is when I send an email to my colleague who is also in the intranet, it should not go through the internet. For example if an email from myself@internal.com is sent to mycolleague@externel.com, mycolleague@external.com should automatically be converted to mycolleague@internal.com and delivered to the virtual domain in our local email server.
I already have found a way to perform this - by creating an alias in my smtp server. ie creating external.com as an alias for internal.com. This way, anything that is sent to external.com through the local smtp server will automatically be diverted to internal.com.
So it's working now.
You could do the same by adding external.com in /var/qmail/control/rcpthosts, so mail for external.com would be delivered locally.
My understanding of rcpthosts is to restrict the domains to send emails through the concerned smtp server. So if I have listed internal.com in the rcpthosts only people from internal.com can send emails through that smtp server. Is that (I mean my understanding) not correct?
No, it's a list of domains that qmail accepts mail for. So if external.com is listed there, the mail will be delivered locally.
See this about the various config files.
Yes your are correct. That's my misunderstanding. But in this particular case, if I include external.com, but it does not exist in the server, will it still be delivered?
In actual fact I have only one (virtual)domain in my mail server - with internal.com. As I have mentioned in one of the previous posts, the external.com is living outside our network. I guess, I should create an internal domain called 'external.com' and then add it to the rcpthosts for the server to deliver it locally. Am I correct?
You are right. It is not advisable to mess up with the live system. But I am just trying to understand the concept to have a better visibility of the system.
Anyway, I mark this thread as solved for now and open a new thread if I have questions in this regard.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.