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
  #11  
Old 14th January 2006, 18:34
mattg mattg is offline
Junior Member
 
Join Date: Jan 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I started again and got up to the end of page 2 but found the same problem. However at the beginning, i had trouble with mysql. The stadard mysql-server would not start:

Starting MySQL database server: mysqld...failed.
Please take a look at the syslog.
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

so i installed mysql-common-4.1 and mysql-server-4.1 instead. Could this be the trouble? do i need to run everything again from the start with mysql-server-4.1 and mysql-client-4.1 in the apt-get command instead in order for the pam stuff to be configured correctly?
Reply With Quote
Sponsored Links
  #12  
Old 14th January 2006, 22:59
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,034
Thanks: 826
Thanked 5,382 Times in 4,229 Posts
Default

Quote:
Originally Posted by mattg
I started again and got up to the end of page 2 but found the same problem. However at the beginning, i had trouble with mysql. The stadard mysql-server would not start:

Starting MySQL database server: mysqld...failed.
Please take a look at the syslog.
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

so i installed mysql-common-4.1 and mysql-server-4.1 instead. Could this be the trouble? do i need to run everything again from the start with mysql-server-4.1 and mysql-client-4.1 in the apt-get command instead in order for the pam stuff to be configured correctly?

Its not a good idea to install other packages then the ones mentioned in the howtos. Its better to try to find the errors instead. Did you get any errors in the mysql error log?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #13  
Old 15th January 2006, 18: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

Please post the output of
Code:
netstat -tap
and also the content of /etc/hosts.
__________________
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
  #14  
Old 15th January 2006, 21:52
mattg mattg is offline
Junior Member
 
Join Date: Jan 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK, I've now messed about with mysql so that it is the right version. Seems i was getting that error because i hadn't purged the database structure when i downgraded, so i did that and rebuilt the necessary tables as per the tutorial and mysql is now running.

root@inauraa1:~# netstat -tap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 *:imaps *:* LISTEN 9048/couriertcpd
tcp 0 0 *op3s *:* LISTEN 9069/couriertcpd
tcp 0 0 localhost:10024 *:* LISTEN 11260/amavisd (mast
tcp 0 0 localhost:mysql *:* LISTEN 8857/mysqld
tcp 0 0 *op3 *:* LISTEN 9056/couriertcpd
tcp 0 0 *:imap2 *:* LISTEN 9035/couriertcpd
tcp 0 0 *:sunrpc *:* LISTEN 11419/portmap
tcp 0 0 *:www *:* LISTEN 5069/apache2
tcp 0 0 *:ssh *:* LISTEN 1080/sshd
tcp 0 0 inauraa1.miniserve:9111 *:* LISTEN 1108/php4
tcp 0 0 *ostgresql *:* LISTEN 2145/postmaster
tcp 0 0 *:smtp *:* LISTEN 1229/master
tcp 0 0 *:12121 *:* LISTEN 20281/perl
tcp 0 0 *:https *:* LISTEN 5069/apache2
tcp 0 0 inauraa1.miniserve:9111 webcache-01.swgfl:48699 CLOSE_WAIT 1108/php4
tcp 0 0 inauraa1.miniserver:ssh host-84-9-130-65.b:1199 ESTABLISHED6972/0
tcp 0 0 inauraa1.miniserve:9111 host-84-9-129-229.:3239 CLOSE_WAIT 1108/php4
tcp 0 0 inauraa1.miniserve:9111 88-108-81-10.dynam:1395 CLOSE_WAIT 1108/php4
tcp 0 0 inauraa1.miniserve:9111 88-108-81-10.dynam:1396 CLOSE_WAIT 1108/php4
tcp 0 0 inauraa1.miniserve:9111 host-84-9-129-229.:3244 CLOSE_WAIT 1108/php4
tcp 0 0 inauraa1.miniserve:9111 webcache-16.swgfl:56470 CLOSE_WAIT 1108/php4
tcp 0 0 inauraa1.miniserve:9111 webcache-20.swgfl:50075 CLOSE_WAIT 1108/php4

/etc/hosts
127.0.0.1 localhost localhost.localdomain

# The following lines are desirable for IPv6 capable hosts
# (added automatically by netbase upgrade)

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

(I added localhost.localdomain after reading a thread that suggested doing this in response to this problem (i think on this site) but that alone didn't work.) Anyway, now, the SASL issue appears to be gone and the logs no longer say that this is happening, but instead, I'm getting a 'relay access denied' error:

Jan 15 20:15:09 inauraa1 courierpop3login: LOGIN, user=matt at myday.to, ip=[::ffff:84.9.130.65]
Jan 15 20:15:10 inauraa1 courierpop3login: LOGOUT, user=matt at myday.to, ip=[::ffff:84.9.130.65], top=0, retr=0, time=1
Jan 15 20:15:32 inauraa1 postfix/smtpd[9078]: connect from host-84-9-130-65.bulldogdsl.com[84.9.130.65]
Jan 15 20:15:38 inauraa1 postfix/smtpd[9078]: NOQUEUE: reject: RCPT from host-84-9-130-65.bulldogdsl.com[84.9.130.65]: 554 <matt at inaura.net>: Relay access denied; from=<matt at myday.to> to=<matt at inaura.net> proto=ESMTP helo=<[127.0.0.1]>
Jan 15 20:15:38 inauraa1 postfix/smtpd[9078]: disconnect from host-84-9-130-65.bulldogdsl.com[84.9.130.65]
Jan 15 20:24:55 inauraa1 courierpop3login: Connection, ip=[::ffff:84.9.130.65]
Jan 15 20:24:55 inauraa1 courierpop3login: LOGIN, user=matt at myday.to, ip=[::ffff:84.9.130.65]
Jan 15 20:24:55 inauraa1 courierpop3login: LOGOUT, user=matt at myday.to, ip=[::ffff:84.9.130.65], top=0, retr=0, time=0
Jan 15 20:25:10 inauraa1 postfix/smtpd[9124]: connect from host-84-9-130-65.bulldogdsl.com[84.9.130.65]
Jan 15 20:25:11 inauraa1 postfix/smtpd[9124]: NOQUEUE: reject: RCPT from host-84-9-130-65.bulldogdsl.com[84.9.130.65]: 554 <upmytree at gmail.com>: Relay access denied; from=<matt at myday.to> to=<upmytree at gmail.com> proto=ESMTP helo=<[127.0.0.1]>
Jan 15 20:25:11 inauraa1 postfix/smtpd[9124]: disconnect from host-84-9-130-65.bulldogdsl.com[84.9.130.65]

the the mysql tables currently have only two entries: myday.to in domains and matt at myday.to in users.


here is main.cf:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

myhostname = mail.myday.to
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mail.myday.to, localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_alias_domains =
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
transport_maps = mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps

Thanks for continuing assistance. Much appreciated.

Matt

edit: removed @ to stop spam bots

Last edited by mattg; 16th January 2006 at 12:46.
Reply With Quote
  #15  
Old 15th January 2006, 23:21
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,034
Thanks: 826
Thanked 5,382 Times in 4,229 Posts
Default

I guess you mixed something up. Did you use the virtual mysql howto together with ISPConfig? ISPConfig does not support postfix + mySQL.

The postfix main.cf is completely incompatible with ISPConfig, you will have to use one of the perfect setup howtos listed on the ISPConfig documentation page:

http://www.ispconfig.org/documentation.htm
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #16  
Old 16th January 2006, 00:19
mattg mattg is offline
Junior Member
 
Join Date: Jan 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

P.S.
auth.log says this:

Jan 15 23:17:35 inauraa1 postfix/smtpd[10386]: sql_select option missing
Jan 15 23:17:35 inauraa1 postfix/smtpd[10386]: auxpropfunc error no mechanism available
Jan 15 23:17:35 inauraa1 postfix/smtpd[10386]: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: sql
Reply With Quote
  #17  
Old 16th January 2006, 00:26
mattg mattg is offline
Junior Member
 
Join Date: Jan 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm not using ISPConfig. should I be? I use webmin for some things as the ISP supplied it. There's a limit to how far i can follow the perfect setup tutorial as I'm administering a remote miniserver and can't reinstall from scratch. Can you recommend a way to get the server to that state using SSH so i can start from scratch?
Reply With Quote
  #18  
Old 16th January 2006, 09:28
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 mattg
I'm not using ISPConfig. should I be?
We were thinking this because you posted this in the ISPConfig Installation/Configuration forum and therefore led us on the completely wrong track... I'll move it to the normal Installation/Configuration forum now.

Quote:
Originally Posted by mattg
I use webmin for some things as the ISP supplied it. There's a limit to how far i can follow the perfect setup tutorial as I'm administering a remote miniserver and can't reinstall from scratch. Can you recommend a way to get the server to that state using SSH so i can start from scratch?
Ok, you're using this tutorial: http://www.howtoforge.com/virtual_po..._quota_courier
I suggest you compare all the configuration files from the tutorial with your own ones, I guess there's a typo or something like that in one of them.
Also have a look here:
http://www.howtoforge.com/forums/showthread.php?t=2011
http://www.howtoforge.com/forums/showthread.php?t=861
__________________
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
  #19  
Old 16th January 2006, 14:25
mattg mattg is offline
Junior Member
 
Join Date: Jan 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK, I've checked the files again using vi on an FC4 box and found a couple of ^M characters at the end of lines, which I've removed. still no luck though. testsaslauthd -u <account> -p <password> gives me this :

connect() : No such file or directory

ps waux | grep saslauthd gives me:

root 12237 0.0 0.2 1616 464 pts/0 S+ 13:12 0:00 grep saslauthd

I don't think saslauthd is running properly, but not sure how to get it going again. saslauthd start gives me this:

saslauthd start
saslauthd[12238] :main : no authentication mechanism specified
usage: saslauthd [options]

option information:
-a <authmech> Selects the authentication mechanism to use.
-c Enable credential caching.
-d Debugging (don't detach from tty, implies -V)
-r Combine the realm with the login before passing to authentication mechanism
Ex. login: "foo" realm: "bar" will get passed as login: "foo@bar"
The realm name is passed untouched.
-O <option> Optional argument to pass to the authentication
mechanism.
-l Disable accept() locking. Increases performance, but
may not be compatible with some operating systems.
-m <path> Alternate path for the saslauthd working directory,
must be absolute.
-n <procs> Number of worker processes to create.
-s <kilobytes> Size of the credential cache (in kilobytes)
-t <seconds> Timeout for items in the credential cache (in seconds)
-v Display version information and available mechs
-V Enable verbose logging
-h Display this message.

saslauthd 2.1.19
authentication mechanisms: sasldb getpwent kerberos4 kerberos5 pam rimap shadow ldap

seems not possible to restart it
Reply With Quote
  #20  
Old 16th January 2006, 18:09
mattg mattg is offline
Junior Member
 
Join Date: Jan 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Also, I tried the instructions in the threads you mentioned, but no luck - my pam.d/smtp file is exactly as it should be. I found a load more of the ^M characters in all of the mysql-virtual* files after the passwords and stuff and got rid of them, but still the same error except now with this added:

inauraa1 postfix/smtpd[17805]: sql_select option missing
Jan 16 16:56:47 inauraa1 postfix/smtpd[17805]: auxpropfunc error no mechanism available
Jan 16 16:56:47 inauraa1 postfix/smtpd[17805]: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: sql
Jan 16 16:58:34 inauraa1 saslauthd[17721]: (pam_unix) check pass; user unknown
Jan 16 16:58:35 inauraa1 saslauthd[17721]: (pam_unix) authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
Jan 16 16:58:37 inauraa1 saslauthd[17721]: DEBUG: auth_pam: pam_authenticate failed: User not known to the underlying authentication module
Jan 16 16:58:37 inauraa1 saslauthd[17721]: do_auth : auth failure: [user=matt at myday.to] [service=imap] [realm=] [mech=pam] [reason=PAM auth error]
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
The Perfect Setup - Debian Woody (3.0)... sending mail from my XP box? ExCIA HOWTO-Related Questions 17 27th June 2007 18:31
configure as a secondary mail server xma General 6 15th February 2006 13:46
Web Mail mphayesuk General 10 15th September 2005 12:21
Mail Configuration mphayesuk General 1 12th September 2005 13:16
Apache not adding domains adamluz Server Operation 3 16th August 2005 20:20


All times are GMT +2. The time now is 02:41.


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