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.
Dear friends, I'm not a guru and until now I had setup some small servers to provide internal only mail system (mail systems... seems huge but they where just 3 to 6 internal mails eheheh)
I have a nice issue to submit you. I think it is a classical application, but I can't find the right how to or documentation. So welcome if you have any.
The goal is to start a linux box that will allow them to:
- have JUST ONE AND ONLY MAIL ACCOUNT in each mail client
- make the mail traffic from/to theirself addresses to travel through their LAN only and not to go outside the LAN to the external.it server to next come back.
My first question is: if the linux server will be linux.box and linux users may be joe, james (just the name) while the provider is external.it with mailboxes joe.smith@external.it, james.iron@external.it... are (with postfix) the virtual and sender_canonical files the right tools to manage this?
If yes, what will be changed in the whole system to make it work?
I suppose that LAN mail clients would be changed according to linux box configuration like joe@linux.box, james@linux.box and later the linux box will be the one that manages the mail between inside or outside doing appropriate changes to the mail. Isn't it?
Which part will or would be done by fetchmail and procmail?
Anyway, thank you for reading and much more thank you if you give me the direction on what to work on. Better than better thank you very much if you have a link with a documentation for such configuration.
Regards
Robert
.
Last edited by Corsari; 09-29-2007 at 04:15 AM.
Reason: nothing changed
... postfix site has excellent documentation. This one describes running postfix in various situations. This is a good place to start.
Hi Berhanie, thank you for your suggestion, sometime we forget about official websites.
But allow me to remind you I'm not a guru and so, I'm searching for something that sounds much more like an help or some tutorials that points out my described situation, that I believe is a classical one.
I'm not good in english expecially in this technical english. As example, how do you call the configuration I prospected?
Do you think is available on the postfix documentation you kindly linked to me? As example i have found this, but is this my situation?. Thank you for any help and suggestion.
Robert
.
Last edited by Corsari; 09-29-2007 at 08:41 AM.
Reason: grammatic
fetchmail is the kind of program you'd use to download mail from your ISP and store it on your local machine.
Regarding the Postfix variables you mentioned, the generic maps is what you'd use to translate sender addresses in outgoing mail from the local form (user@linux.box) to the external form, as you can see by reading the link. For the reverse direction, to translate external addresses to internal ones, you have a choice: You could have Postfix do the translation with virtual maps (virtual_alias_maps), or you could configure fetchmail to do it. The situation may be more complicated if all your external email addresses are stored in a single mailbox by your ISP.
Thank you Berhanie, now the scenario became more sharper to me.
I'm still confused about what I understand is called the relaying from my server to the ISP server just 'cause I don't have much clear "what" is that logins to the ISP server and forwards the to-be-sent-to-the-internet emails to it
Anyway, reading what you kindly linked seems to confirm my supposition:
all the office clients must be changed from isp_Account_Name@external.it to linux_box_login(or alias)@linux.box. Isn't it? This will force internal mail to travel inside the LAN and only foreign addresses to be delivered through the internet. About your opinion, does it exist a more professional solution to overcome all this outlook/thunderbird accounts swapping? Let say playing with configuration files and linux box name and domain name? I think not, but thank you if you confirm it to me.
Quote:
Originally Posted by Berhanie
fetchmail is the kind of program you'd use to download mail from your ISP and store it on your local machine...
Maybe it is better me to start playing a bit on/with a real server, but please, as asked above... I have clear where I have to setup mail account login and password for mail downloading: fetchmail. But what about mail sending? Or better to say, mail relaying?
I mean that we have postfix that can delivery in various method. For many reasons I'd like postfix to send mail through the ISP's smtp server and not to deliver directly the mails. this mainly because I've seen some antispam systems that compares domain's IP with real sender IP and if don't matching, they mark it as spam. What do you think about this?
Anyway thank you for your time, your answers and help, and thank you in advance for any other.
dear Ber, I really thank you for your support and suggestions.
Only one question for you.
Quote:
preface: I'm using a user which name is test3. So, local mail is test3@linux.box, my external account is robert.c@provider.it, relayhost has been setup with provider.it smtp ip address between [], like [xxx.yyy.zzz.jjj]
About your opinion: why I've got it working only with generic and not with canonical file/db?
now main.cf content has been added of the following lines
You'll have to track this thing down step-by-step.
First thing you need to read and understand is how addresses are rewritten here.
Here's how to procede:
I. Address rewriting when mail is received:
When you submit mail to user test3, the address is rewritten as test3@$myorigin. After that, it hits canonical (make sure virtual doesn't undo later what canonical does now). Our canonical table says to do this: test3 -> robert.c@provider.it, which according to the canonical man page ("man 5 canonical") and after some simplification, is equivalent to: test3@$myorigin -> robert.c@provider.it. This means the address gets rewritten to robert.c@provider.it. Finally, virtual aliasing takes place; so, our case, unfortunately, the address is written back to the test3 which ("man 5 virtual") ends up as test3@myorigin. At this point the mail enters the incoming queue.
II. Address rewriting when mail is delivered:
At this point, the mail is classified into local or remote. Local domains are listed under $mydestination, and are delivered locally. The value of $myorigin is a local address (probably), so test3@$myorigin is delivered locally. If the address were not local, and if it the mail were to leave the machine for its destination via smtp, then it would be subject to the generic mapping.
You'll have to track this thing down step-by-step.
First thing you need to read and understand is how addresses are rewritten here.
Here's how to procede:
I. Address rewriting when mail is received:
...
II. Address rewriting when mail is delivered:
...
I supposed canonical to be involved in delivery... I must read with more attention.
As said above, with generic it does work fine.
One question about generic DB itself. In this way it gets populated by my manual entries. But, one curiosity, what if I were in a company with 100 users... 100 manual entries? Or do we have one more professional approach available?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.