1. Introduction: The @Mail POP3/IMAP Server
@Mail POP3 and IMAP Services allows your @Mail ( server-mode ) users access their eMail with an IMAP Client such as Outlook, or a POP3 client such as Eudora. This provides Users with two methods to access their email messages, the Webmail via the Internet, and Email messages using their third party Email Clients.
2. Starting @Mail POP3/IMAP Services
/etc/init.d/atmailserver start
This script starts all @Mail services, including POP3 and IMAP.
3. Binary Locations and Configuration files
/usr/local/atmail/mailserver/
This is the path for POP3 and IMAP, the binaries for these services are located:
/usr/local/atmail/mailserver/bin/pop3d
/usr/local/atmail/mailserver/bin/imapdThe configuration files are located:
/usr/local/atmail/mailserver/etc/pop3d
/usr/local/atmail/mailserver/etc/imapdSettings in these files are automatically edited by the Webadmin. While it is possible to manually edit this files directly, we strongly recommend using the Webamin Interface to change any settings.
4. How the @Mail POP3 / IMAP Server works
Users access the @Mail Server remotely using a third party email client such as Outlook. Depending on the User's port access ( 110 for POP3 and 143 for IMAP ), the POP3 or IMAP Service will being authentication for the user and query the @Mail database for the User's Session, Mail Directory ( MailDir and Group Permissions ( to check for permissions for that user to access either the POP3 or the IMAP Services. The MailDir for a user contains the first character of their username, the second character of their username, their username and domain, these are located at /usr/local/atmail/users.
For example:
/usr/local/atmail/users/t/e/test0761@au.calacode.com
/usr/local/atmail/users/j/i/jim@au.calacode.comOnce authenticated the POP3 or IMAP Service will read this directory and provide messages to the User depending on their Email Client Settings. The MailDir is created automatically when an Account on the system is created.
Here we go into more detail on the authentication that takes place between the POP3 or IMAP service and the MySQL database:
SELECT distinct UserSession.Account, \
'', \
UserSession.Password, \
'3000',\
'3000',\
Users.MailDir,\
Users.MailDir,\
'',\
CONCAT("Users.FirstName", ',', 'Users.LastName'), CONCAT("allowimap=",Groups.IMAPSupport,", allowpop3=", Groups.POP3Support,",allowwebmail=",'1', ",sharedgroup=",'1') \
FROM UserSession, Users, Groups \
WHERE UserSession.Account = CONCAT('$(local_part)', '@', '$(domain)') \
AND Users.Account = UserSession.Account and (Users.Ugroup=Groups.GroupName or Groups.GroupName='Default' and ( Users.Ugroup='' or Users.Ugroup is null) and Users.Account=CONCAT('$(local_part)', '@', '$(domain)'))An Example of the result will return the user account details and location of the maildir directory for the account. The POP3/IMAP server will then match the password supplied to the client from the SQL database.
For the Permissions ( allowing / restricting POP3 or IMAP Access for the User ), the Default Group can be specified, or the User moved into another Group providing or restricting POP3 or IMAP Access. Please see the Webadmin -> Users -> Group Manager for more information
The User ID 3000 is created automatically by the install script which is the UID of the atmail username. The atmail user must have full read/write permissions over the /usr/local/atmail/users directory for mail-delivery and pop3/imap access to function.
/usr/local/atmail/mailserver/etc/authmysqlrc
This file contains the settings for the authentication between the POP3/IMAP server and mySQL . Each POP3/IMAP connection the mail-server will query the database if the selected user exists.The 'Users' table in the MySQL Database tells the POP3 or IMAP Service where the User's directory is ( MailDir field ), it does this by authenticating via the authdaemon, which accesses the MySQL database in turn.
The Authdaemon provides the following access to the MySQL database.MYSQL_SERVER localhost
MYSQL_USERNAME root
MYSQL_PASSWORD
These details are provided by the install script and by the Webadmin Interface if you change the Database Access details.
Here you can specify the configuration settings for the POP3 Service, this includes enabling the POP3 service, setting the maximum connections and the maximum connections per IP Address as well as optionally binding the POP3 Server to an IP Address on the server.
Please Note: If the POP3 Service is currently running, you will need to restart the atmailserver on the console:
# /etc/init.d/atmailserver restartHere you can specify the configuration settings for the IMAP Service, this includes enabling the IMAP Service, setting maximum limits on connections and connnections per IP Address and optionally setting IMAP Timeout and Purge Trash/Spam Folder.
Please Note: If the IMAP Service is currently running, you will need to restart the atmailserver on the console:
# /etc/init.d/atmailserver restartHere is where you can optionally add IP Addresses ( permanent and temporary ), that will allow Users accessing via that IP Address to Relay Mail through the SMTP Server.
Browse related articles from our online Knowledge-base regarding the language guide
- http://kb.atmail.com/view_article.php?num=318 - How to enable SSL for POP3 & IMAP server-mode
- http://kb.atmail.com/view_article.php?num=319 - How to turn on debugging mode for IMAP/POP3
- http://kb.atmail.com/view_article.php?num=558 - Increasing POP3/IMAP relay timeout
- http://kb.atmail.com/view_article.php?num=389 - Building Courier - POP3 / IMAP on Gentoo
For additional support, please visit our web site http://atmail.com/ - Or send us an Email : support@CalaCode.com