The title says it all. Today, we will know how we can install and configure Qmail (a mailing agent) on our OpenSUSE 42.1 Linux distribution so that our server act like a mail server.
Hey,
I have a machine running fedora core2 and i am planning on installing qmail...part of the qmail installation requires to have certian ports open: Outbound ports (tcp) 25 - SMTP 110 - POP services 143 - IMAP 783 - Spamassassin 993 - IMAPS Inbound Ports (tcp) 25 - SMTP 80 - HTTP 110 - POP services 143 - IMAP 443 - HTTPS 783 - Spamassassin 993 - IMAPS I ran nmap on my ip and got these results: Starting nmap 3.50 at 2004-10-03 02:20 CDT sendto in send_tcp_raw: sendto(3, packet, 40, 0, xxx.xxx.xxx.xxx, 16) => Operation not permitted Interesting ports on xxx.xxx.xxx.xxx.lem-bsr1.chi-lem.il.cable.rcn.com (xxx.xxx.xxx.xxx): (The 1654 ports scanned but not shown below are in state: closed) PORT STATE SERVICE 20/tcp filtered ftp-data 21/tcp open ftp 22/tcp open ssh 53/tcp open domain 80/tcp open http FIrst of all what does this mean: sendto in send_tcp_raw: sendto(3, packet, 40, 0, xxx.xxx.xxx.xxx, 16) => Operation not permitted its repeats about 30 times and then finally displays the open ports.... I tried to run the follow command: iptables -A INPUT -p tcp --dport 25 -j ACCEPT and ran service iptables save then ran nmap again to see if port 25 would show but it doesnt.. and i missing something? THanks, Lenny
Mail server based on Linux platform is the best choice due to many reasons like security, maintenance, less troubleshooting etc etc.Let’s start then. What is Qmail?Qmail is one of the best mail transfer agent (MTA) in Linux driven platforms. In December 1995, Qmail was written by Daniel J. It gets it’s popularity due to security. It is the first security-aware mail transport agent. After Qmail, few other MTAs have been published with the same feature. Qmail is based on modular architecture where each major function is separated from the other major functions.Performance wise, Qmail is significantly faster than Sendmail (Another famous MTA ) specially when used for bulk mail tasks such as large mailing list servers.
Qmail is much simpler to configure and deploy rather than other MTAs.You can download and install Qmail for almost all popular Linux distribution like Redhat, Debian, Cent OS, Ubuntu etc etc. Why OpenSUSE?OpenSUSE is a very famous Linux distribution. It is widely used by System Admins now a days and too good for software development purposes.
Many enterprise grade application production environment runs on OpemSUSE. You can install this on your Laptop and enjoy the beauty of OpenSUSE.
Beyond the distribution, the openSUSE Project provides a web portal for community involvement. It is built for software developers and system administrators, also has a user-friendly desktop, and feature-rich server environment. Also, It has both KDE & GNOME Desktop environment. Installing QmailBefore installing Qmail on to your server, we have to check our checklists so that we can make sure our that our server works perfectly. Checklists are as follows.
Purchasing your domain from a domain register like, or from others. Setting up host name / server name properly. Something like mail.yourdomain.com. This is good practice to do. You must have a public / real IP address set yo your NIC / LAN card set statically / manually. Name server entry in your DNS Server for resolving your mail server host name (mail.yourdomain.com). This is for resolving your host name against your Public / Real IP address.
I will not cover this over here. Implementing DomainKeys Identified Mail (DKIM) system so that mail send from your mail server is not treated as spam or junk mail by others. Though, I will not cover this over here. You need to Google for that in order to implement it. Its not that hard though.
Before install postfix, remove sendmail from the server. Because sendmail is the default MTA in Redhat/CentOS. email protected # yum remove sendmail.
Make sure you don’t have any other MTA installed on your system except Qmail. If you found other MTA, then you must remove / uninstall those. Make sure your firewall / iptables is not blocking 25 & 110 port.Setting Host nameTo set your server host name like mail.yourdomain.com, open a terminal and issue the following command. Sudo vim /etc/hostnameHere, I am using vim as a editor. You can use your own favorite editor. Type the host name like mail.yourdomain.com and save & exit from the file.Then, issue the following command. Sudo vim /etc/hostsAnd then just type it like the below image.Note: You can see that I am using 192.168.1.13 for my IP address.
But here, you need to use your own public / real IP address instead of using mine. Please make sure of it. After doing this, you may need to reboot your system so that the changes made by you can take place. Stay up to dateBefore starting, make sure all the packages / software that you have on your system is up to date.
This is a good practice to stay up to date. To do so, issue the below command on your terminal. Sudo zypper updateIt may take a while depending on the internet speed of yours. After successful update, you must reboot your system as well. Remove / Uninstall other MTATo remove or uninstall other MTA on your system, let’s search is first and then uninstall it from the system.
To do so, issue the following on a terminal sudo zypper search sendmail sudo zypper search postfixNow, if you found something from the above command, then you need to remove it from your system. Let’s revome it by doiing the followings sudo zypper remove sendmail sudo zypper remove postfixNow, download the latest source of Qmail from. As this is the source file of Qmail in tar archive file format, we need to extract the contents of it and need to compile it to install.OrYou can open a terminal and issue the following command to install it directly. But we need to add the repository first for his.
Let’s add the Qmail repository. Sudo zypper addrepo will add the repo of qmail or netqmail.Let’s install it now. Sudo zypper install make automake gcc netqmail netqmail-pop3d netqmail-skel ucspi-tcp daemontools libsrs2-devel spamdykeThe above command will download and will install netqmail on your system. Starting Qmail serviceTo start Qmail service onto your server, do the following one by one and one after another. Sudo svscanbootqmailctl startThis will start Qmail on your system. Now, to verify whether it is really running on your system or not, issue the following command on your terminal. Sudo qmailctl statusNow, you will see something like this below page which will indicate that Qmail is up and running on your system.Doing the restType the following one by one and one after another on your terminal sudo echo '127.0.0.1:allow,RELAYCLIENT=',RBLSMTPD=' /etc/tcp.smtpsudo echo '192.168.:allow,MFDNSCHECK=',RELAYCLIENT=',DATABYTES='7340032',RBLSMTPD=',LOCALMFCHECK=' /etc/tcp.smtpsudo echo ':allow,SMTPAUTH=',DATABYTES='6815744' /etc/tcp.smtpNow, we need to create the database by doing the following.
Sudo /etc/init.d/qmail cdborsudo qmailctl cdbsudo ln -s /var/qmail/alias/.qmail-root /var/qmail/alias/.qmail-anonymoussudo ln -s /var/log/qmail/qmail-send/current /var/log/qmailNow, type the following sudo rm /usr/sbin/sendmail ln -s /var/qmail/bin/sendmail /usr/lib/sendmailln -s /var/qmail/bin/sendmail /usr/sbin/sendmailWe are almost done.Now, open the file located /etc/spamdyke/spamdyke.conf with any file editor and put # or commented out line 4 & 44.Now, restart Qmail. If everything goes well and if you don’t encounter any error, then we are done with it. Testing QmailLet’s testing Qmail whether it is really working or not. Open a terminal and issue the below command.
Sudo telnet localhost 25If it is succesfull then you will see something like below image.As you can see that, it is 220 and with a welcome message indicating that its listening to port 25 and your server is ready to send mail.I didn’t cover many other things which are related to mail server like spam-filtering, web mail etc etc as I want to stay with the basics without diving deep onto it. But I hope that you will enjoy this and it will help you a lot.Thanks for viewing.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |