Question

How to Postfix dovecot mysql

Asked by: D_wathi

Dear Sir/Madm:

Can anybody tell me how to configure postfix mailserver using dovecot and mysql for authentication , iam looking the authentication from mysql but using dovecot , i seached in the internet iam getting courier imap with mysql but my squirement is dovecot with mysql , please help
Thanks in advance.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2008-11-27 at 22:38:36ID23941535
Topics

Postfix

,

Dovecot

,

MySQL Server

Participating Experts
2
Points
500
Comments
6

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. postfix & courier-imap - canno connect
    I have been at this for hours, and am going boss-eyed. I have (through the help of mburdick) got postfix working, and am trying to get courier-imap working too. I'm running Mandrake 9.1. I dowloaded courier-imap-2.2.0 and built the rpm using rpmbuild (I had to install a ...
  2. delivery error in mailboxes with postfix + mysql + courier…
    Hey everybody, I thought I'd ask here because I've already gotten some excellent help here on experts exchange and all i could find on google was guys asking the same question, with nobody answering (which is the exact strength of experts-exchange right?) So, I've recently s...
  3. courier-imap
    Hello all, Im just trying to set up my courier-imap with mysql authentication. Everything is working when I use 'authpam'. I can send and receive emails with help of postfix. My only problem is user authentication for imap using mysql database so users can access they email....
  4. Postfix mysql lookup not working
    Hi, I did the configuration of postfix , courier imap with mysql lookup. When I invoke /usr/sbiin/postfix start" , it said post started. But the log file gives the below message May 30 19:51:02 localhost postfix/postfix-script[10890]: starting the Postfix mail syste...
  5. Postfix / Courier / MySQL cannot send email
    I am using Slackware 10.2 using the default 2.4.31 kernel. I have postfix 2.3 and courier-imap and courier-pop3 and MySQL 5.0 setup and working. I can currently receive emails with no problems. I cannot send emails with postfix when i connect directly to my mail server. ...
  6. Postfix/Courier/MySQL Error
    I have installed postfix, courier-imap, and saslauthd with mysql authentication based on this tutorial: http://www.howtoforge.com/virtual-users-and-domains-postfix-courier-mysql-centos5.1 My system is CENTOs 5.2 and I get this error when I try to authenticate with SMTP: Nov ...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: ravenplPosted on 2008-11-28 at 04:48:29ID: 23055165

 

by: ravenplPosted on 2008-11-28 at 04:49:39ID: 23055168

Oh, You rather looking for http://wiki.dovecot.org/AuthDatabase/SQL

 

by: vimalmsPosted on 2008-12-10 at 20:10:27ID: 23145663

Pre-Configuration Requirements:
1. Hostname cnode1.rnd.pk with IP address (172.16.4.80) to eth0. (You can assign an IP address and hostname of your choice.)
2. Create an alias eth0:0. Assign IP address (172.16.4.81). (You can assign an IP address of your choice.)
3. Make entries of your hostname and IP in /etc/hosts . In my case my /etc/hosts file shows
127.0.0.1       localhost.localdomain   localhost
172.16.4.80     cnode1.rnd              cnode1
172.16.4.81     mail.rnd                mail
Installation Of Required Packages:
We need the following packages for our mail server to be installed:
dovecot-0.99.11-8.EL4 (with database support), postfix-2.2.10-1.1.el4.centos.mysql (with database support) and squirrelmail.
1. First install dovecot. If you install postfix before dovecot, then dovecot will not be installed on your system because of packages conflicts.
yum install -y dovecot
This will install dovecot along with dependencies (mysql and postgresql).
2. Then install postfix (with mysql support) and and mysql-server-5 from centosplus repos.
yum --enablerepo=centosplus install postfix mysql-server
yum install -y squirrelmail
This will install postfix along with dependencies mysql-5 and postgresql. Our installation section is complete now. Moving to our next section i.e. Configuration.
Configuration:
SMTP-AUTH/TLS
First we configure SMTP-AUTH and TLS. For this edit /usr/lib/sasl2/smtpd.conf with your favorite editor.
vi /usr/lib/sasl2/smtpd.conf
and make changes as given below.
pwcheck_method: saslauthd
mech_list: plain login
Create directories, then private key and lastly the certificate.
mkdir -p /etc/ssl/mycompany/mailserver/
cd /etc/ssl/mycompany/mailserver/
openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024
chmod 600 smtpd.key
openssl req -new -key smtpd.key -out smtpd.csr
openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt
openssl rsa -in smtpd.key -out smtpd.key.unencrypted
mv -f smtpd.key.unencrypted smtpd.key
openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650
Private keys and certificates have been created. Later on we will tell postfix to use them.
 
MySQL:
We will now create a database named mail, for this we will issue commands given below; our first step will be to set a password for the administrative user.
mysqladmin -u root password newpassword
Replace newpassword phrase with your password. We will use user "mail" in our case for all database related operations. (Select Update and Insert into Database.)
mysql -u root -p
Enter the password and you will be at the MySQL prompt (mysql>)
CREATE DATABASE mail;
Give all privileges on mail to user mail.
GRANT ALL PRIVILEGES ON mail.* TO 'mail'@'localhost' IDENTIFIED BY 'mail';
FLUSH PRIVILEGES;
quit
Set password for mail user. This will be done by the following statement.
msqladmin -u mail password newpassword
Then we will create the necessary tables for our new database (mail) that contains domains, users, aliases and mailboxes information.
mysql -u mail -p
After giving the password you will be at the MySQL prompt.
show databases;
It will show all databases, including our "mail" database. We will use "mail".
USE mail;
1. Create the domain table.
CREATE TABLE domain ( domain varchar(255) NOT NULL default '', description varchar(255) NOT NULL default '', aliases int(10) NOT NULL default '0', mailboxes int(10) NOT NULL default '0', maxquota int(10) NOT NULL default '0', transport varchar(255) default NULL, backupmx tinyint(1) NOT NULL default '0', created datetime NOT NULL default '0000-00-00 00:00:00', modified datetime NOT NULL default '0000-00-00 00:00:00', active tinyint(1) NOT NULL default '1', PRIMARY KEY (domain), KEY domain (domain) ) TYPE=MyISAM COMMENT=' Virtual Domains';
2. Second most important table is mailbox, so create mailbox.
CREATE TABLE mailbox ( username varchar(255) NOT NULL default '', password varchar(255) NOT NULL default '', name varchar(255) NOT NULL default '', maildir varchar(255) NOT NULL default '', quota int(10) NOT NULL default '0', domain varchar(255) NOT NULL default '', created datetime NOT NULL default '0000-00-00 00:00:00', modified datetime NOT NULL default '0000-00-00 00:00:00', active tinyint(1) NOT NULL default '1', PRIMARY KEY (username), KEY username (username) ) TYPE=MyISAM COMMENT='Virtual Mailboxes';
3. Create the alias table.
CREATE TABLE alias ( address varchar(255) NOT NULL default '', goto text NOT NULL, domain varchar(255) NOT NULL default '', created datetime NOT NULL default '0000-00-00 00:00:00', modified datetime NOT NULL default '0000-00-00 00:00:00', active tinyint(1) NOT NULL default '1', PRIMARY KEY (address), KEY address (address) ) TYPE=MyISAM COMMENT='Virtual Aliases';
We have created the necessary tables, so quit MySQL.
quit
 
Postfix MySQL:
Postfix needs to know where and how it can look up all mailbox related information. For this purpose we will create the following files under /etc/postfix. Recent versions of Postfix may use that instead of the other statements, and in that case, just comment all lines out, and un-comment the last one.
1. Create file mysql_virtual_alias_maps.cf for forwarding emails from one email address to another
vi /etc/postfix/mysql_virtual_alias_maps.cf
 
user = mail
password = mail
hosts = localhost
dbname = mail
table = alias
select_field = goto
where_field = address
additional_conditions = and active = '1'
#query = SELECT goto FROM alias WHERE address='%s' AND active = '1'
2. Create file mysql_virtual_domains_maps.cf, for the virtual domains mapping. Virtual domains are queried using information provided in this file.
vi /etc/postfix/mysql_virtual_domains_maps.cf
user = mail
password = mail
hosts = localhost
dbname = mail
table = domain
select_field = domain
where_field = domain
additional_conditions = and backupmx = '0' and active = '1'
#query = SELECT domain FROM domain WHERE domain='%s' AND backupmx = '0' AND active = '1'
3. Create the file mysql_virtual_mailbox_maps.cf. Which is usually the mapping of email addresses to the location of the user's mailbox on your hard disk. If you saved incoming email to the hard disk using Postfix' built-in virtual delivery agent then it would be queried to find out the mailbox path.
vi /etc/postfix/mysql_virtual_mailbox_maps.cf
user = mail
password = mail
hosts = localhost
dbname = mail
table = mailbox
select_field = CONCAT(domain,'/',maildir)
where_field = username
additional_conditions = and active = '1'
#query = SELECT CONCAT(domain,'/',maildir) FROM mailbox WHERE username='%s' AND active = '1'
4. Lastly create file mysql_virtual_mailbox_limit_maps.cf which will be used for mapping users mailboxes quota limit.
vi /etc/postfix/mysql_virtual_mailbox_limit_maps.cf
user = mail
password = mail
hosts = localhost
dbname = mail
table = mailbox
select_field = quota
where_field = username
additional_conditions = and active = '1'
#query = SELECT quota FROM mailbox WHERE username='%s' AND active = '1'
 
Postfix:
In the Postfix configuration section we will edit the main.cf file located in configuration directory of postfix (/etc/postfix), to enter some basic information necessary for Postfix.
mv /etc/postfix/main.cf /etc/postfix/main.cf.orig
vi /etc/postfix/main.cf
############## Postfix###############
smtpd_banner = $myhostname
biff = no
append_dot_mydomain = no
relayhost =
mynetworks = 172.16.4.81
inet_interfaces = 172.16.4.81
mailbox_size_limit = 0
recipient_delimiter = +
alias_database = hash:/etc/postfix/aliases
alias_maps = $alias_database
myhostname = cnode1.rnd
mydomain = rnd
myorigin = $myhostname
mydestination = $myhostname, localhost.$mydomain, $transport_maps
mail_spool_directory = /var/spool/mail
debug_peer_level = 2
debugger_command =
  PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
  xxgdb  $daemon_directory/$process_name $process_id & sleep 5
disable_vrfy_command = no
readme_directory = /usr/share/doc/postfix-2.2.10/README_FILES
sample_directory = /usr/share/doc/postfix-2.2.10/samples
sendmail_path = /usr/sbin/sendmail
html_directory = no
setgid_group = postdrop
command_directory = /usr/sbin
manpage_directory = /usr/share/man
daemon_directory = /usr/libexec/postfix
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
queue_directory = /var/spool/postfix
mail_owner = postfix
unknown_local_recipient_reject_code = 450
####################postfix section ends here###############
 
Postfix Virtual user information:
Again we will edit main.cf file to add support for virtual users. The virtual_minimum_uid and virtual_uid_maps point to user id 150 in my case, which is a user I created specifically for handling virtual mail. It uses the standard mail group with the default gid 12. So first create the user by issuing the useradd command or adduser.
useradd -r -u 150 -g mail -d /var/vmail -s /sbin/nologin -c Virtual mailbox vmail
chmod 770 /var/vmail/
chown vmail:mail /var/vmail
vi /etc/postfix/main.cf
#######################Virtual Domains Users and mailboxes###############
virtual_mailbox_domains = mysql:$config_directory/mysql_virtual_domains_maps.cf
virtual_mailbox_base = /var/vmail
virtual_mailbox_maps = mysql:$config_directory/mysql_virtual_mailbox_maps.cf
virtual_alias_maps = mysql:$config_directory/mysql_virtual_alias_maps.cf
virtual_minimum_uid = 150
virtual_uid_maps = static:150
virtual_gid_maps = static:12
##############################Virtual section of main.cf ends##############
 
Postfix SASL/TLS authentication:
Finally we will again edit main.cf file to enable SASL/TLS authentication. Previously we created some certificates, we will use them here to secure mail server.
vi /etc/postfix.main.cf
#################### SASL/TLS Authentication###########################
######SASL PART#########
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_local_domain =
smtpd_recipient_restriction = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
######TLS PART###########
smptpd_tls_cert_file = /etc/ssl/rnd/mailserver/smtpd.crt
smtpd_tls_key_file = /etc/ssl/rnd/mailserver/smtpd.key
smtpd_tls_CAfile = /etc/ssl/rnd/mailserver/cacert.pem
smtp_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtpd_tls_received_header = no
smtp_tls_note_starttls_offer = yes
smtpd_tls_loglevel = 1
tls_random_source = dev:/dev/urandom
smtpd_tls_session_cache_timeout = 3600s
smtpd_tls_recieved_header = yes
###########################SASL/TLS Authentication ends here#############
For my convenience I have divided main.cf in three sections { Postfix, virtual-Domains-Users-and-mailboxes, SASL/TLS-Authentication}. SASL/TLS-Authentication is further divided into ( SASL-PART and TLS-PART). To show you each section and their parameters I have edited the same file thrice. Now copy the /etc/aliases and /etc/aliases.db to /etc/postfix/ and run newaliases.
cp /etc/aliases* /etc/postfix/
newaliases
 
Dovecot IMAP and POP:
Let us configure Dovecot which provides both a POP3 and an IMAP service. The configuration file for Dovecot is /etc/dovecot.conf. We will rename it to dovecot.conf.orig, and create our own. To handle virtual users with dovecot we will create the file /etc/dovecot-mysql.conf
vi /etc/dovecot-mysql.conf
######dove-mysql.conf should look like this##########
db_host = 127.0.0.1
db_port = 3306
db      = mail
db_user = mail
db_passwd = mail
db_client_flags = 0
default_pass_scheme = PLAIN
password_query = SELECT password FROM mailbox WHERE username = '%u'
user_query = SELECT '/var/vmail/%d/%n' as home,
'maildir:/var/vmail/%d/%n' as mail, 150 AS uid, 12 AS gid, concat('dirsize:storage=',quota) AS quota FROM mailbox WHERE username ='%u' AND active ='1'
####################ends here####################
Now moving to configure dovecot.conf, to authenticate virtual user using mysql_auth method. Keep this thing in mind that normal Linux users can't login to mail-server. Because we haven't enabled Pam-authentication method in our dovecot configuration. Also first_valid_uid and last_valid_uid are set to 150, which means only the user with uid 150 will be able to log in. Pop3 and pop3s protocols are made available.
mv /etc/dovecot.conf /etc/dovecot.conf.orig
vi /etc/dovecot.conf
##############dovecot configured to work with virtual users############
base_dir = /var/run/dovecot/
protocols = imap pop3 imaps pop3s
imap_listen = [::]
pop3_listen = [::]
login_dir = /var/run/dovecot-login
login = imap
login = pop3
default_mail_env = mbox:/var/vmail/%d/%n
mbox_locks = fcntl
log_timestamp = "%Y-%m-%d %H:%M:%S "
log_path = /var/log/maillog
mail_extra_groups = mail
first_valid_uid = 150
last_valid_uid = 150
maildir_copy_with_hardlinks = yes
auth = mysql_auth
auth_userdb = mysql /etc/dovecot-mysql.conf
auth_passdb = mysql /etc/dovecot-mysql.conf
####################################ends here######################
After this we will set the ownership and access rights on /etc/dovecot-mysql.conf.
chmod 600 /etc/dovecot/*.conf
chown vmail /etc/dovecot/*.conf
 
Squirrelmail configuration:
Go to squirrelmail config directory and run config.pl.
cd /usr/share/squirrelmail/config/
/conf.pl
It will show some selection like this:
SquirrelMail Configuration : Read: config.php (1.4.0) ---------------------------------------------------------
Main Menu --
1. Organization Preferences
2. Server Settings
3. Folder Defaults
4. General Options
5. Themes
6. Address Books
7. Message of the Day (MOTD)
8. Plugins
9. Database
10. Languages
D. Set pre-defined settings for specific IMAP servers
C.Turn color on
S Save data
Q Quit Command >> 
At the command prompt type 1 and set Organization Preferences. Here my settings are shown. You can choose your own.
1. Organization Name : R&D Dept.
2. Organization Logo : ../images/sm_logo.png
3. Org. Logo Width/Height : (308/111)
4. Organization Title : Research & Developement
5. Signout Page : http://mail.rnd
6. Top Frame : _top
7. Provider link : http://mail.rnd
8. Provider name : R&D
Save your settings and return to the main menu. Now at the command prompt type 2, and in server settings menu provide information.
>>Command 2 mine is shown below.
1. Domain : mail.rnd
2. Invert Time : false
3. Sendmail or SMTP : SMTP
A. Update IMAP Settings : mail.rnd:143 (uw)
B. Update SMTP Settings : mail.rnd:25
Configuring squirrelmail is very easy as it is menu driven. Hope you will do it yourself.
 
 HTTP Section:
To start using the mailserver web front end we will edit file /etc/httpd/conf/httpd.conf.
vi /etc/httpd/conf/httpd.conf
And append the statements given below to it.
<VirtualHost 172.16.4.81:80>
DocumentRoot /usr/share/squirrelmail
ServerName mail.rnd
</VirtualHost>
Save the configuration and exit.
 Creating Virtual users and domains:
Now we will create virtual domains and virtual users in our mail database.
mysql -u mail -p
Enter the password and you will be at the mysql> prompt.
USE mail;
First create a virtual domain in the domain table (mail.rnd) using the command given below.
INSERT INTO domain (domain,description,aliases,mailboxes,maxquota,transport,backupmx,active) VALUES ('mail.rnd','Virtual domain','10','10', '0','virtual', '0','1');
Now create two virtual users in the mailbox table. I have created (mike@mail.rnd & john@mail.rnd) as usernames for mike and john.
INSERT INTO mailbox (username,password,name,maildir,quota,domain,active) VALUES ('john@mail.rnd','mypassword', 'John Smith ','john/', '0','mail.rnd','1');
INSERT INTO mailbox (username,password,name,maildir,quota,domain,active) VALUES ('mike@mail.rnd','mypassword', 'Mike Tyson','mike/', '0','mail.rnd','1');
quit
Now that we have created virtual users and virtual domain, we want to test our mail server by logging in and sending mail from one user account to another. So let's start Dovecot, Postfix, MySQL and webserver daemons. Also we want that they should start themselves on next reboot. For this we issue following commands.
chkconfig level 235 mysqld on
chkconfig level 235 saslauthd on
chkconfig level 235 postfix on
chkconfig level 235 dovecot on
chkconfig level 235 httpd on
/etc/init.d/saslauthd start
/etc/init.d/mysqld start
/etc/init.d/postfix start
/etc/init.d/dovecot start
/etc/init.d/httpd start
Finally fire-up the browser and go to http://mail.rnd and enter the username and password and then click on Login. And enjoy playing with your mailserver.
phpMyAdmin:
phpMyAdmin is a powerful and easy to use frontend for MySQL. The rpm of phpMyAdmin exists in the DAG repository. Go and add DAG repository. And install phpmyadmin and php-mysql if not already installed.
yum install -y phpmyadmin php-mysql
After this fire up a browser and enter http://127.0.0.1 in the address bar. Enter the user name and password and start using it. /etc/httpd/conf.d/phpmyadmin.conf has the information to locate phpmyadmin. If it fails you can create a virual alias in /etc/httpd/conf/httpd.conf file by editing it.
vi /etc/httpd/conf/httpd.conf
<VirtualHost 127.0.0.1>
DocumentRoot /usr/share/phpmyadmin
ServerName localhost.localdomin
</VirtualHost>
Enjoy using phpMyAdmin for creating users, domain and aliases.

Please let me know
Best of luck

 

by: D_wathiPosted on 2009-01-26 at 03:42:25ID: 23465693

Thank you very much will try this and update you if any problems , thanks again.

 

by: D_wathiPosted on 2009-01-27 at 00:09:19ID: 23474379

I followed your instructions
CREATE DATABASE mail;
GRANT ALL PRIVILEGES ON mail.* TO 'mail'@'localhost' IDENTIFIED BY 'mail';
FLUSH PRIVILEGES;
then quit
and when execute the command :
mysqladmin -u mail password newpassword
Iam getting the following message:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'mail'@'localhost' (using password: NO)'
Please help me on this.




 

by: D_wathiPosted on 2009-01-28 at 02:32:24ID: 23485102

I  managed to set the password for database mail  IN MYSQL,  my postfix version is postfix-2.3.3-2.1.el5_2 , and also
created following files under /etc/postfix
1.mysql_virtual_alias_maps.cf  
2.mysql_virtual_domains_maps.cf
3.mysql_virtual_mailbox_maps.cf
1. in your post you have commented the following in /etc/postfix/ mysql_virtual_alias_maps.cf
query = SELECT goto FROM alias WHERE address='%s' AND active = '1'
2.and commented the following in /etc/postfix/mysql_virtual_domains_maps.cf
#query = SELECT domain FROM domain WHERE domain='%s' AND backupmx = '0' AND active = '1'
3. and also commented the following in /etc/postfix/mysql_virtual_mailbox_maps.cf
please tell me should I do the same or should I uncomment all these in my postfix , iam confused here

please help me on this.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...