Operating System - Linux
1748171 Members
4084 Online
108758 Solutions
New Discussion юеВ

Re: Howto set up mailserver with ISP domain

 
hylke hogewind
Occasional Contributor

Howto set up mailserver with ISP domain

I like to setup a mail server for a small company ( 5 mail users)They have a domain that recieves all mail send to that domain at their ISP.
I have sendmail and fetchmail running and working with windows outlook clients.
How do I route the mail for user A to his mail spool on the linux server?
Which took should I use?
6 REPLIES 6
Bill Thorsteinson
Honored Contributor

Re: Howto set up mailserver with ISP domain

I generally use Exim rather
than sendmail. Your question
is not clear so I will answer a
few questions.

The outlook clients should use
the sendmail server as their
SMTP server. Local mail will
be delivered on this server.

To deliver a users mail to
another server use the
/etc/aliases file.

user: user@server.company.com

will forward mail to server.
benoit Bruckert
Honored Contributor

Re: Howto set up mailserver with ISP domain

From your question,
I think you mean that mailboxes are stored on a pop3 ISP server.
What you have to do is getting the mails from these boxes with fetchmail.
You will store these mails by the way to a local mailbox or to another server in the network trough sendmail.
YOu have to install also a pop3 server on your linux server, and configure outlook to reach this pop3 server...
To send messages : 2 ways :
1- You are using directly the smtp ISP server from all the outlook clients.
2 - You configure a relay (sendmail) to receive email from outlook and sending them to the world....

In fact you can work without sendmail !
But to tranfer mails between these 5 users, if you don't want to use the Internet line, then you need sendmail or any other mta.

To be clear, we need to know how many servers you are using, is there a firewall ? nat ? masquerading ? how is the access to internet ?

hth
Benoit
Une application mal pans├йe aboutit ├а une usine ├а gaze (GHG)
hylke hogewind
Occasional Contributor

Re: Howto set up mailserver with ISP domain

I have sendmail, fetchmail, pop3 and the outlook clients working fine at my test environment at home.
I user outlook to send mail directly to the ISP and use one linux RH 8.0 mail server to fetch the mail from the server. Since i am behind a 'coyote' firewall, i didn't bother about another firewall at the mail server.
Since my own ISP account has
two pop3 accounts with one user each, I can fetchmail and for each account. I can route it to the matching mail account on the linux box, from which i can download the messages to outlook.

In the new situation where the small company, where this project is intended for, has it's own internet domain. It has just one pop3 box where all mail is send to *@fbw.architecten.nl.
I have to configure fetchmail to route all the messages to the right person. so if fetchmail recieves hylke@fbw.architecten.nl from the ISP, it has to route it to hylke@fbw.mailserver.nl (the mailserver account hylke or hylke@fbw.mailserver.nl)
.fetchmailrc contains
<-
poll pop.cablewanadoo.nl proto3 localdomains fbw.architecten.nl
user 'hylke.hogewind' there with password 'abcde' is * fetchall
->

I did set the virtusertable like this
<-
hylke.hogewind@wanadoo.nl hylke
->

and added the local host to 'local-host-names'
<-
fbw.architecten.nl
->

i used sendmail -bt to check
>/map virtuser hylke.hogewind@wanadoo.nl
returned: map-lookup: virtuser(hylke.hogewind@wanadoo.nl) returns hylke(0)
>

mail send to hylke.hogewind@wanadoo.nl is fetched but routed to root(mailmaster)
with the following message in the var/spool/root
....
....
X-Fetchmail-Warning: recipient address hylke.hogewind@wanadoo.nl didn't match any local name.
...
...

Do i have to use 'aka' or mda in combination with mailproc to solve the problem?

hylke hogewind
Occasional Contributor

Re: Howto set up mailserver with ISP domain

Sorry, some corrections

.....
poll pop.cablewanadoo.nl proto3 localdomains fbw.mailserver.nl
user 'hylke.hogewind' there with password 'abcde' is * fetchall
->

I did set the virtusertable like this
<-
hylke.hogewind@wanadoo.nl hylke
->

and added the local host to 'local-host-names'
<-
fbw.mailserver.nl
->
....
benoit Bruckert
Honored Contributor

Re: Howto set up mailserver with ISP domain

Well,
I didn't know that it was possible to separate messages for several user from 1 pop3 account ! If this is the case, then I don't know enough fetchmail to help you.

In my opinion, the solution is on the ISP side.
1- If you have a static ip address, then change the MX of the domain to route messages to your smtp (sendmail) server (you will have to open SMTP tcp port on your firewall). You don't need fetchmail.
2- If you have a dynamic ip, then ask for your ISP to keep messages on their relay servers to send them once the line is open !! (I already did it with an isdn line). For this case, you have again an smtp server. You don't need fetchmail for this case.
3- You create as many pop3 account on the ISP server that you have users, and you catch these messages with fetchmail. For this case you don't need sendmail (to receive from outside)...

hth
Benoit
Une application mal pans├йe aboutit ├а une usine ├а gaze (GHG)
hylke hogewind
Occasional Contributor

Re: Howto set up mailserver with ISP domain

I will check at the ISP,
thanks.