By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,617 Members | 1,896 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,617 IT Pros & Developers. It's quick & easy.

Postfix-mysql-courier not making a conection

P: n/a
I am a relative newbie to MySQL. I had a Postfix+Courier+MySQL mail
server running for several months. It took me a week or so to get it up
and running in September. Now, I did a clean upgrade to Mandrake 9.2
and am reinstalling everything. This thing is kicking my ass and I
can't seem to get past it. I could really use some help if anybody has any.

Just for reference, this was my primary source for information on
installation and setup, though I've been scouring Google for help:
http://high5.net/howto/

Of course, there's also the MySQL manual:
http://www.mysql.com/doc/en/index.html

I have Postfix/Courier-IMAP installed and I can start all of it. If I
start the MySQL server through Webmin or at the command line
(/etc/rc.d/init.d/mysql start), the process runs away -- I get a series
of instances of mysqld and mysqld_safe in the process tables that take
turns spawning and dying, and constantly soak up processor cycles
thrashing around. It's very hard to kill this process. I have to
execute "/usr/sbin/mysqld stop" repeatedly and rapidly at the command
line as root to shut it down.

If I start the server at the command line as root with "mysqld_safe
--skip-grant-tables &" I get a polite set of 3 instances of mysql and
one mysqld_safe. They appear to function normally, but webmin reports
that mysql server is not running and can't start it -- reports no error,
just that it isn't running and database list can not be retrieved. I
assume that for whatever reason, Webmin can't see the process running.

Stopping this server is also next to impossible. When I issue "mysqld
stop" at the command line (root or user) I get:

[madams@adamsmdk init.d]$ /usr/sbin/mysqld stop
040101 22:22:41 Can't start server: Bind on TCP/IP port: Address
already in use
040101 22:22:41 Do you already have another mysqld server running on
port: 3306 ?
040101 22:22:41 Aborting

040101 22:22:41 /usr/sbin/mysqld: Shutdown Complete

This does not alter the process in the proc. table:

[madams@adamsmdk init.d]$ ps -aux|grep mysql
Warning: bad syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
root 24677 0.0 0.2 2456 1256 pts/4 S 22:13 0:00 /bin/sh
/usr/bin/mysqld_safe --skip-grant-tables
mysql 24693 0.0 0.5 13600 2624 pts/4 S 22:13 0:00
/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql
--pid-file=/var/lib/mysql/adamsmdk.pid --skip-locking --skip-grant-tables
mysql 24694 0.0 0.5 13600 2624 pts/4 S 22:13 0:00
/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql
--pid-file=/var/lib/mysql/adamsmdk.pid --skip-locking --skip-grant-tables
mysql 24695 0.0 0.5 13600 2624 pts/4 S 22:13 0:00
/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql
--pid-file=/var/lib/mysql/adamsmdk.pid --skip-locking --skip-grant-tables
madams 24823 0.0 0.1 1828 608 pts/0 R 22:25 0:00 grep mysql

"Killing" the process as root also has no effect. I have to use the
command line buffer to stuff "mysqld stop" from 3 to 30 times in rapid
succession or sometimes this works:

[root@adamsmdk madams]# mysqld_safe stop
Starting mysqld daemon with databases from /var/lib/mysql
040102 12:56:47 mysqld ended

[root@adamsmdk madams]# mysqld_safe stop
Starting mysqld daemon with databases from /var/lib/mysql
/usr/bin/mysqld_safe: line 1: 25790 Killed nohup
/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql
--pid-file=/var/lib/mysql/adamsmdk.pid --skip-locking stop
/var/lib/mysql/adamsmdk.err 2>&1

040102 12:56:52 mysqld ended

Notice that I had to send that command twice.

I tried mysql_fix_privilege_tables --password=root_password and thought
that fixed it. But it did not. I uninstalled and reinstalled all the
MySQL elements it -- no change.

As for the rest of it, once I do get Postfix/Courier-IMAP/MySQL running
manually, I can telnet into the mail server, but I can't log on with any
of the accounts my my mysql.users table (MySQL issue?):

[root@adamsmdk postfix]# telnet localhost 143
Trying 127.0.0.1...
Connected to localhost (127.0.0.1).
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE
THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE STARTTLS]
Courier-IMAP ready. Copyright 1998-2003 Double Precision, Inc. See
COPYING for distribution information.
.. login madams none
.. NO Login failed.
.. login root adminis
.. NO Login failed.
.. login postfix postfix
.. NO Login failed.
.. logout
* BYE Courier-IMAP server shutting down
.. OK LOGOUT completed
Connection closed by foreign host.

I find this in /var/log/messages:

Jan 2 13:01:10 adamsmdk su(pam_unix)[27192]: session opened for user
root by (uid=501)
Jan 2 13:03:10 adamsmdk su(pam_unix)[28476]: session opened for user
mysql by (uid=0)
Jan 2 13:04:00 adamsmdk su(pam_unix)[28476]: session closed for user mysql
Jan 2 13:05:00 adamsmdk CROND[28705]: (mail) CMD (/usr/bin/python -S
/usr/lib/mailman/cron/gate_news)
Jan 2 13:05:11 adamsmdk kernel: DROPPED IN= OUT=eth0 SRC=192.168.5.100
DST=64.113.215.94 LEN=76 TOS=0x10 PREC=0x00 TTL=64 ID=0 DF PROTO=UDP
SPT=123 DPT=123 LEN=56
Jan 2 13:09:29 adamsmdk kernel: DROPPED IN= OUT=eth0 SRC=192.168.5.100
DST=64.113.215.94 LEN=76 TOS=0x10 PREC=0x00 TTL=64 ID=0 DF PROTO=UDP
SPT=123 DPT=123 LEN=56
Jan 2 13:10:00 adamsmdk CROND[28727]: (mail) CMD (/usr/bin/python -S
/usr/lib/mailman/cron/gate_news)
Jan 2 13:10:51 adamsmdk authdaemond.mysql: authdaemon:
modules="authmysql", daemons=5
Jan 2 13:13:46 adamsmdk kernel: DROPPED IN= OUT=eth0 SRC=192.168.5.100
DST=64.113.215.94 LEN=76 TOS=0x10 PREC=0x00 TTL=64 ID=0 DF PROTO=UDP
SPT=123 DPT=123 LEN=56
Jan 2 13:15:00 adamsmdk CROND[29091]: (mail) CMD (/usr/bin/python -S
/usr/lib/mailman/cron/gate_news)

It makes my head swim and I can't make heads or tails of it anymore.
Meanwhile, I have 123 mail messages from Cron piled up in my Postfix
mailbox.

Does anybody have a clue about this?

Thanks.

Mark

Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.