Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 10th September 2006, 09:45
asterix asterix is offline
Junior Member
 
Join Date: Sep 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Quick question about Postfix + MySQL

Hi,

I followed this guide: http://www.howtoforge.com/virtual_po..._quota_courier

I reached the end of page 2, but the command "telnet localhost pop3" failed, so I went to check why.

I found the following in my logs:

Code:
Sep 10 02:32:40 server postfix/cleanup[22630]: warning: connect to mysql server unix:/var/run/mysqld/mysqld.sock: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Code:
server:/etc/postfix# mysql -u mail_admin -p --socket=/var/run/mysqld/mysqld.sock
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 28 to server version: 4.0.24_Debian-10sarge2-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>
All of my config files are the defaults (except for changing the hosts =, since I only access the server via local socket) e.g.:

Code:
server:/etc/postfix# cat mysql-virtual_forwardings.cf
user = mail_admin
password = mail_admin_password
dbname = mail
table = forwardings
select_field = destination
where_field = source
hosts = unix:/var/run/mysqld/mysqld.sock
I can connect via the command-line mysql client and via PHP/Perl with the same socket/user/pass, why isn't Postfix working?

Thanks!

(P.S. this is the first time I've ever encountered a problem with one of your articles. Keep up the good work. )
Reply With Quote
Sponsored Links
  #2  
Old 10th September 2006, 10:22
asterix asterix is offline
Junior Member
 
Join Date: Sep 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Little note I forgot to mention:

My current setup DOES work if I allow MySQL access from localhost via:

iptables -I INPUT 1 -p tcp -s 127.0.0.1 --destination-port 3306 -j ACCEPT

I would like to use it over a socket though!
Reply With Quote
  #3  
Old 10th September 2006, 20:33
asterix asterix is offline
Junior Member
 
Join Date: Sep 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Still haven't resolved my socket syntax issue, but I have a more pressing concern atm:

Code:
Sep 10 13:21:28 server imaplogin: LOGIN, user=me@mysite.com, ip=[::ffff:127.0.0.1], protocol=IMAP
Sep 10 13:22:04 server imaplogin: LOGOUT, user=me@mysite.com, ip=[::ffff:127.0.0.1], headers=445, body=0, time=36
I have Squirrelmail up and running correctly, but it's taking almost 40 SECONDS to switch between pages in its interface.

Why on EARTH would it take 40 seconds to query a local imap server?
Reply With Quote
  #4  
Old 11th September 2006, 13:32
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Please use 127.0.0.1 instead of the MySQL socket, and also switch off your firewall for now.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 11th September 2006, 21:10
asterix asterix is offline
Junior Member
 
Join Date: Sep 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok, I am using 127.0.0.1 (although socket would be preferred... and faster), and everything seems to work ok.

Aside from viewing the Squirrelmail interface, which takes between 15 and 45 seconds to load a page. Any ideas?
Reply With Quote
  #6  
Old 12th September 2006, 16:45
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
 
Default

Quote:
Originally Posted by asterix
Aside from viewing the Squirrelmail interface, which takes between 15 and 45 seconds to load a page. Any ideas?
Any errors in your mail log and in Apache's error log?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix problems with smtp linkdeb Server Operation 13 15th March 2014 17:58
postfix - MySQL connection problem epo Installation/Configuration 7 4th August 2006 20:49
Forwarding Question For Virtual Users And Domains With Postfix, Courier And MySQL (+ mrjjman HOWTO-Related Questions 3 6th April 2006 11:23
Virtual Users And Domains With Postfix, Courier And MySQL Question neil6179 HOWTO-Related Questions 1 18th March 2006 11:14
Mandriva 10.2 Perfect Setup Install Problems... ctroyp Installation/Configuration 12 30th December 2005 16:04


All times are GMT +2. The time now is 17:19.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.