When you are setting up Sendmail or any other standard SMTP server, it is important to remember that this is the only means of transferring information between your Linux host and other mail servers. In order for your users to retrieve their information, you need to set up a POP3 or IMAP service. Qpopper is a versatile POP3 implementation that you can install and set up services quickly and easily. Just follow these simple steps.
Install Qpopper with Sendmail
In this article describing the installation steps for Qpopper, I will assume that you already have Sendmail installed. However, Qpopper will be compatible with any other standard SMTP server.
First, download the latest resource package qpopper4.0.3.tar.gz from the Qpopper website. You'll also find extensive documentation and software documentation on this site. After downloading this version, you need to unzip it using the tar xpfz command. Create a new directory qpopper4.0.3 and execute ./configure, and then you can start the installation.
If you've used it before, maybe you have needs beyond the default installation, be sure to read the documentation to find all editable options. For example, you may prefer to run Qpopper as a standalone background mailer rather than from within inetd or xinetd. To do this, you need to run ./configure with the option --enable-standalone.
When using Qpopper as a standalone daemon, you need to create a script in order to start the correct service on import. Qpopper is installed by default in /usr/local/lib unless you are installing from a specific version archive such as RPM or DEB. If installing from source, you will also need to add the following lines to the /etc/inetd.conf file:
pop3 stream tcp nowait root /usr/local/lib/popper qpopper -s
Alternatively, if you are using xinetd.conf, which is the default installation in recent Red Hat 7.x, be sure to create a file named pop3 in the /etc/xinetd.d/ directory with the following content:
service pop3
{
socket_type = stream
protocol=tcp
wait=no
user=root
server = /usr/local/lib/popper
server_args = qpopper -s
port=110
}
When adding a new service, first check your firewall filtering rules and /etc/hosts.allow file. Your firewall should allow TCP requests to be accepted directly on port 110, which is the port for the POP3 service, and your hosts.allow file should have the ALL line. Likewise, if using Red Hat, check /etc/xinetd.d/ and make sure there is no existing POP3 server. Preconfiguration is made possible through a standard installation option, so if you add Qpopper later, be sure to remove all directives such as /etc/xinetd.d/ipop3 from the xinetd daemon.
Author: postnew Release date: 2007-10-18
Build Qpopper
Once Qpopper is installed, you need to start the service. If you are using inetd or xinetd, you can simply restart the inetd or xinetd daemon by executing kill –HUP. You can determine the process ID (PID) by running ps aux | grep inet.
If you have installed Qpopper in standalone mode, you need to execute the script you have created by placing the parameter -S in the /etc/init.d/pop3 file. For example, the -S flag tells Qpopper to run in server mode, which can help improve the server's input/output performance. If not in server mode, Qpopper will copy the mail file based on priority access and copy it back after making appropriate adjustments, such as email deletion. In server mode, Qpopper scans the queue instead of copying and processes it directly in the user's task. This is especially important for POP3 servers that need to support a large number of users.
Table 1 lists all the command options you can use when running a POP3 server. For example, you can log in to your server remotely from port 110 and delete large information manually. Having a thorough understanding of these options will help resolve your users' email glitches quickly.
USER Enter your user ID after this command, for example USER webmaster.
PASS Enter the password for this account in the form PASS password.
QUIT This command ends the current task and deletes the marked messages.
LIST Use this command to list information and size.
RETR Recovers a specific message with a message number.
DELE This command deletes a specific message with a message number.
TOP displays the first N lines of a specific email (TOP <# lines>).
Qpopper relies on standard system authentication mechanisms being applied via /etc/passwd and /etc/shadow. Therefore, in order for users to use the POP3 service, adding it on the local system is necessary. Since you probably already run a mail agent such as Sendmail, this is actually done.
Discover and resolve Qpopper failures
There may always be some problems the first time you run any service you install. A good way is for the server to respond to POP3 requests that land on its port 110. You can try logging in from local and remote sites. You'll see command line examples in these labs.
If you have a large number of users connecting to your server to get email, you may need to increase the inetd timeout value by changing the maximum wait value. You can do this:
pop3 stream tcp nowait.400 root /usr/local/lib/popper qpopper -s
This can prevent Qpopper from entering an infinite loop when a large number of tasks are running at the same time. When the login starts, your log file starts recording the service, at which point you can change the timeout value I mentioned above.
Another problem is that mail lockups often occur on larger sites. The mail lock file is created when a client opens a POP3 session to the server. It prevents other joins from modifying the mailbox. Sometimes, a user disconnects abnormally and Qpopper cannot delete the temporary file queue created at the beginning of the task. This often appears as .user.pop in the /var/spool directory. Servers usually detect outdated mail locks and delete them; however, in rare cases, administrators may need to manually delete these files in order to allow access to the POP3 server again.
Summarize
If you want to provide users with full email functionality, adding POP3 service to your Sendmail server is an important step. With Qpopper, this task becomes quite simple. Quickly download, install, and get back up and running. It can also run with other standard SMTP servers.