Current User: Guest Login Register
Please consider registering


Register? | Lost Your Password?

Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

[How to] – postfix

Reply to Post Add a New Topic
UserPost

4:15 pm
January 2, 2010


aluuu

belgium

Member

posts 7

From : http://www.linuxmail.info/mult…..-centos-5/

Till step 2 is working.

As you mention that, i should get as following:

$ postmap -q shamun@shamun.be mysql:/etc/postfix/mysql-users.cf

shamun.be/shamun/Maildir/

But i get nothing . One thing was also missing that is the mysql (table structure create structures) Where can i get that?

http://www.linuxmail.info/images/centos-5/postmap-mysql-users-cf.png

I used mySQL previous installation (can i have the dumped database table structure of "postfix database" like domain, mailbox, alias:

Create table mailbox (

 maildir varchar(200), username varchar(200) , additional_conditions varchar(200),

active varchar(200), result_format varchar(200)

) Engine = MyISAM;

insert into mailbox values ( 'shamun.be/' , 'shamun', '' , '1' , '%sMaildir/' );

$cat /etc/hosts   (i dont have the shamun.be yet, i want to virtually put here so that ping shamun.be  = 127.0.0.1 and i can work forward in my testing)

127.0.0.1  localhost.localdomain localhost shamun

::1  localhost6.localdomain6 localhost6 shamun

Cry

8:18 pm
January 2, 2010


consultant

Admin

posts 341

Hi shamun,

You missed out installing Postfix Admin.

This article will show you how to configure Postfix and Dovecot to handle multiple domains stored in MySQL. Postfix Admin is used to manage the domains, mailboxes and aliases in MySQL. See How to Install Postfix Admin to setup the MySQL database that will be used by Postfix and Dovecot.

2:44 pm
January 3, 2010


aluuu

belgium

Member

posts 7

Post edited 7:52 pm – January 3, 2010 by shamun


1. Postfixadmin is installed, created database talbes/etc.

http://imgur.com/reQfe.jpg

2. Postfix installed > postmap check getting failed. (i am using mysql/apache/php lampp from apachefriends which gets run as "/opt/lampp/lampp start" )

[root@shamun postfix]# postmap -q marie.be mysql:/etc/postfix/mysql-domains.cf
postmap: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

[root@shamun postfix]# mysql
Command not found. Install package 'mysql' to provide command 'mysql'? [N/y] [root@shamun postfix]#

[root@shamun postfix]# /opt/lampp/bin/mysql
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 106
Server version: 5.1.41 Source distribution

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql> show databases;
+——————–+
| Database           |
+——————–+
| information_schema |
| cdcol              |
| mysql              |
| phpmyadmin         |
| postfix            |
| test               |
+——————–+
6 rows in set (0.28 sec)

mysql> quit
Bye
[root@shamun postfix]# chkconfig –list
NetworkManager     0:off    1:off    2:on    3:on    4:on    5:on    6:off
abrtd              0:off    1:off    2:off    3:on    4:off    5:on    6:off
atd                0:off    1:off    2:off    3:on    4:on    5:on    6:off
auditd             0:off    1:off    2:on    3:on    4:on    5:on    6:off
avahi-daemon       0:off    1:off    2:off    3:on    4:on    5:on    6:off
bluetooth          0:off    1:off    2:off    3:on    4:on    5:on    6:off
cpuspeed           0:off    1:on    2:on    3:on    4:on    5:on    6:off
cups               0:off    1:off    2:on    3:on    4:on    5:on    6:off
dnsmasq            0:off    1:off    2:off    3:off    4:off    5:off    6:off
firstboot          0:off    1:off    2:off    3:off    4:off    5:off    6:off
haldaemon          0:off    1:off    2:off    3:on    4:on    5:on    6:off
httpd              0:off    1:off    2:off    3:off    4:off    5:off    6:off
ip6tables          0:off    1:off    2:on    3:on    4:on    5:on    6:off
iptables           0:off    1:off    2:on    3:on    4:on    5:on    6:off
irda               0:off    1:off    2:off    3:off    4:off    5:off    6:off
irqbalance         0:off    1:off    2:off    3:on    4:on    5:on    6:off
iscsi              0:off    1:off    2:off    3:on    4:on    5:on    6:off
iscsid             0:off    1:off    2:off    3:on    4:on    5:on    6:off
ksm                0:off    1:off    2:off    3:on    4:on    5:on    6:off
ksmtuned           0:off    1:off    2:off    3:on    4:on    5:on    6:off
livesys            0:off    1:off    2:off    3:on    4:on    5:on    6:off
livesys-late       0:off    1:off    2:off    3:on    4:on    5:on    6:off
lvm2-monitor       0:off    1:on    2:on    3:on    4:on    5:on    6:off
mdmonitor          0:off    1:off    2:on    3:on    4:on    5:on    6:off
messagebus         0:off    1:off    2:on    3:on    4:on    5:on    6:off
microcode_ctl      0:off    1:off    2:on    3:on    4:on    5:on    6:off
multipathd         0:off    1:off    2:off    3:off    4:off    5:off    6:off
named              0:off    1:off    2:off    3:off    4:off    5:off    6:off
netconsole         0:off    1:off    2:off    3:off    4:off    5:off    6:off
netfs              0:off    1:off    2:off    3:on    4:on    5:on    6:off
netplugd           0:off    1:off    2:off    3:off    4:off    5:off    6:off
network            0:off    1:off    2:off    3:off    4:off    5:off    6:off
nscd               0:off    1:off    2:off    3:off    4:off    5:off    6:off
ntpd               0:off    1:off    2:off    3:off    4:off    5:off    6:off
ntpdate            0:off    1:off    2:off    3:off    4:off    5:off    6:off
openvpn            0:off    1:off    2:off    3:off    4:off    5:off    6:off
portreserve        0:off    1:off    2:on    3:on    4:on    5:on    6:off
postfix            0:off    1:off    2:off    3:off    4:off    5:off    6:off
psacct             0:off    1:off    2:off    3:off    4:off    5:off    6:off
rdisc              0:off    1:off    2:off    3:off    4:off    5:off    6:off
restorecond        0:off    1:off    2:off    3:off    4:off    5:off    6:off
rsyslog            0:off    1:off    2:on    3:on    4:on    5:on    6:off
saslauthd          0:off    1:off    2:off    3:off    4:off    5:off    6:off
smolt              0:off    1:off    2:on    3:on    4:on    5:on    6:off
sshd               0:off    1:off    2:off    3:off    4:off    5:on    6:off
udev-post          0:off    1:on    2:on    3:on    4:on    5:on    6:off
vncserver          0:off    1:off    2:off    3:off    4:off    5:off    6:off
wpa_supplicant     0:off    1:off    2:off    3:off    4:off    5:off    6:off
xenconsoled        0:off    1:off    2:off    3:on    4:on    5:on    6:off
xend               0:off    1:off    2:off    3:on    4:on    5:on    6:off
xendomains         0:off    1:off    2:off    3:on    4:on    5:on    6:off
xenstored          0:off    1:off    2:off    3:on    4:on    5:on    6:off
xrdp               0:off    1:off    2:off    3:off    4:off    5:off    6:off
[root@shamun postfix]#

What can i do now?

Cry

3:58 pm
January 3, 2010


consultant

Admin

posts 341

I recommend you use the standard packages in RHEL/CentOS instead of XAMPP. Postfix is looking for the standard MySQL package.

6:25 pm
January 6, 2010


aluuu

belgium

Member

posts 7

After give up with XAMP according to your advice, finally postfix, postadmin works, test also works, many thanks for that.. But then i followed your guide for the Dovecot. I am getting this now:

A:

case /var/log/maillog

Jan  7 00:04:46 localhost dovecot: Dovecot v1.2.9 starting up (core dumps disabled)
Jan  7 00:04:46 localhost dovecot: Generating Diffie-Hellman parameters for the first time. This may take a while..
Jan  7 00:04:46 localhost dovecot: auth(default): Fatal: Unknown database driver 'mysql'
Jan  7 00:04:46 localhost dovecot: dovecot: Fatal: Auth process died too early – shutting down
Jan  7 00:07:02 localhost dovecot: Dovecot v1.2.9 starting up (core dumps disabled)
Jan  7 00:07:02 localhost dovecot: auth(default): Fatal: Unknown database driver 'mysql'
Jan  7 00:07:02 localhost dovecot: dovecot: Fatal: Auth process died too early – shutting down
Jan  7 00:11:03 localhost dovecot: Dovecot v1.2.9 starting up (core dumps disabled)
Jan  7 00:11:03 localhost dovecot: auth(default): Fatal: Unknown database driver 'mysql'
Jan  7 00:11:03 localhost dovecot: dovecot: Fatal: Auth process died too early – shutting down
Jan  7 00:11:34 localhost dovecot: Dovecot v1.2.9 starting up (core dumps disabled)
Jan  7 00:11:34 localhost dovecot: auth(default): Fatal: Unknown database driver 'mysql'
Jan  7 00:11:34 localhost dovecot: dovecot: Fatal: Auth process died too early – shutting down
Jan  7 00:14:16 localhost dovecot: Dovecot v1.2.9 starting up (core dumps disabled)
Jan  7 00:14:16 localhost dovecot: auth(default): Fatal: Unknown database driver 'mysql'
Jan  7 00:14:16 localhost dovecot: dovecot: Fatal: Auth process died too early – shutting down

[root@shamun log]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.1.41 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+——————–+
| Database           |
+——————–+
| information_schema |
| mysql              |
| postfix            |
| test               |
+——————–+
4 rows in set (0.31 sec)

mysql>

B:

[root@shamun log]# cat /etc/dovecot-mysql.conf
driver = mysql
connect = host = localhost dbname=postfix user=root password=
default_pass_scheme = PLAIN
password_query = SELECT password from mailbox where username = '%u'

[root@shamun log]#

C:

[root@shamun log]# service dovecot status
dovecot dead but pid file exists
[root@shamun log]#

Why dovecot mysql getting fail? what i did wrong?

Cry

6:23 pm
January 7, 2010


consultant

Admin

posts 341

What OS are you using because the MySQL feature is included in the Dovecot package that comes with RHEL/CentOS.

Reply to Post

Reply to Topic:
[How to] – postfix

Guest Name (Required):

Guest Email (Required):

Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
3 + 4
   


About the Linux Mail Server Setup and Howto Guide Forum

Forum Timezone: America/New_York

Most Users Ever Online: 60

Currently Online:
11 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 2
Forums: 5
Topics: 326
Posts: 1012

Membership:

There are 928 Members
There have been 84 Guests

There is 1 Admin

Top Posters:

shanmugasundaram s – 45
Kendermin – 15
Ginger – 14
bighorn – 14
iron_michael86 – 12
Raminda – 11

Recent New Members: RaHuL, bikesh, pappy_says, geos, boudi7, dara.hr

Administrators: consultant (341 Posts)