Advertisment

Intranet Mail Server on PCQLinux

author-image
PCQ Bureau
New Update

We assume the following settings



That you have a mail server on the Internet, and that you are setting up a local mail server on the Intranet to route local mail. That si mail to a user on the network will remain local, and will not reach the Internet mail server.

Advertisment

Intranet Network: 192.168.1.0



IP address of local Email Server running PCQLinux 8.0: 192.168.1.4


Hostname of the local Email Server: intranetmail.pcqlabs.net


Internet mail server: mail.pcqlabs.net


Email domain: pcqlabs.net


FAQ

How do I backup data?



The easiest way of taking backup in Linux is to create a tar.gz file of your important folders. To do so, issue the following command in a terminal


#tar -cvf .tar


It will create a single .tar file of your directory. Now to zip this file use gzip 


#gzip .tar


It will create a file called .tar.gz which will be the backup of your folder. To retrieve your data issue the following command


#tar -zxvf .tar.gz





What is core dump?


Core dump allows the state of a machine to be saved at crash time for later analysis. After rebooting the system, the crash information can be recovered.





How do I change the screen saver?


To change the screen saver, click start /preference /screen 


saver. It will launch a window from where you can set your 


screen saver.












Change the above to suit your network. 



We setup Sendmail such that mails to local users - users having account on the 192.168.1.4 - remain on the local Email server. All users will have email address in the form @pcqlabs.net (in our case). While mails destined to non-local users such as foo@hotmail.com are delivered to the Internet mail server. 

Advertisment

Note: Your Internet mail server must allow mail relaying. In case it does not, you can setup an SMTP server on the gateway machine of your Intranet that allows relaying. 

Before proceeding further substitute the settings in your case. 

Create user accounts for email users on your private network on the PCQLinux machine (192.168.1.4), if you have not already done so during installation.You can create user accoundts using the useradd command as:

Advertisment

useradd

Subsequently, you can assign password to the user as:

passwd

Advertisment

Alternatively, you can do it graphically through Webmin. Launch Webmin. Browse to Sytem>User and Groups. Click on “Create a new user”. For Username, fill in the name of the user account say Edit. Select the option “normal password” and fill in a password for the account. Optionally, fill in the Real name of the user. For Shell, select /bin/bash from the drop down menu 

Setup Sendmail



Launch webmin. Login and browse to Servers>Sendmail Configuration. Click on Sendmail Options. For the option „send outgoing mail via host“ click on the radio button next to the text box and fill in mail.pcqlabs.net. For SMTP port options, append the following line separated by a space after the existing text. :

Port=smtp, Addr=192.168.1.4, Name=MTA

Advertisment

Click on Save and Apply. Next, in the Sendmail Configuration screen click on Local Domains. In the text area append the name of the email domain:

pcqlabs.net and click on save. Now click on Spam Control. For the mail source, select Network from the drop down menu, fill in 192.168.1 in the text box and select the option Allow relaying. Click on create. Our mail server is ready to send email using Sendmail to local as well as external accounts.

Setting up POP3



If not already installed, install the RPM imap-2001a-15.i386.rpm from PCQLinux 8.0 CD2. Open a terminal window within X and issue the command 

Advertisment

#ntsysv. 

From the listed services, select ipop3. Subsequently, issue the command:

#service xinetd restart

Advertisment

Fetching mail from the Internet 

server 



When people from outside your network email or reply back to mail from local users, they will be stored on the Internet email server. This is because we haven’t hosted our local mail server on the Internet -which will need to have a public Internet IP and DNS MX entry. Hence we need to fetch mail from the Internet email server to the local email server, so that when local users connect to the Intranet server using their email clients they get email from the Internet as well. This is done using Fetchmail. If not already installed, install the RPM named fetchmail-5.9.0-21.8.0.rpm from PCQLinux CD1. 

In Webmin, browse to Servers>Fetchmail Mail Retrieval. Suppose we want to fetch mail for a user named billing. Click on the button labelled “...”. This will pop-up a window showing all user accounts. 

Click on billing. Click on “Add Fetchmail Server for user”. For “Mail server to contact” click on the radio button near the empty text box. Fill in the following details:

Server Name: intranetmail.pcqlabs.net



Mail Server to contact: mail.pcqlabs.net


Remote user: billing


Remote password: xxxxx

Local user: billing



The remote user and password are the login and password of the user on the Internet mail server. 

Click on create. Similarly, key in details for other email users. 

Setting up the clients



Setting up the email clients like MS Outlook, Eudora, Kmail, Ximian Evolution etc. to use the Intranet email server is same as using them with Internet Email servers. You just need to replace the server name for SMTP and POP to the IP address of the local email server (192.168.1.4 in our case).

Shekhar Govindarajan

Advertisment