Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 27th February 2007, 15:41
mopsos mopsos is offline
Junior Member
 
Join Date: Feb 2007
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default postfix +mysql =table lookup problem

Hi,

I installed postfix with mysql and sasl and courier. I'm on a debian.
In addition I installed postfixadmin to create adress mail, domain and other.

I can create an account (with postfixadmin). With phpmyadmin I see the database, and all is ok.

But in the file mail.err :
I see that :
Code:
Feb 27 15:33:45 sd-5581 postfix/trivial-rewrite[4170]: fatal: mysql:/etc/postfix/mysql/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem
I don't understand where is the problem.
Can you explain me?
In addition I diseable the ligne
Code:
#alias_maps = hash:/etc/postfix/aliases
I don't know if I do or not. And if this line is ok.
main.cf:
Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

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

# TLS parameters
# smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
# smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
# smtpd_use_tls=yes
smtpd_use_tls = yes
smtpd_tls_key_file = /etc/postfix/certificats/server.key
smtpd_tls_cert_file = /etc/postfix/certificats/server.crt
smtpd_tls_CAfile = /etc/postfix/certificats/cacert.pem
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

# sasl
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = no
smtpd_tls_auth_only = yes

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
# mysql info
virtual_alias_maps = mysql:/etc/postfix/mysql/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:1029
virtual_mailbox_base = /usr/local/virtual
virtual_mailbox_domains = mysql:/etc/postfix/mysql/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql/mysql_virtual_mailbox_maps.cf
virtual_mailbox_limit = 51200000
virtual_minimum_uid = 1029
virtual_transport = virtual
virtual_uid_maps = static:1029

myhostname = mail.artwai.fr
mydomain = artwai.fr
#alias_maps = hash:/etc/postfix/aliases
#alias_database = hash:/etc/postfix/mysql/aliases
myorigin = /etc/mailname
mydestination = $myhostname localhost.$mydomain $mydomain
relayhost =
mynetworks = 127.0.0.0/8, 88.191.38.133,localhost,localhost.localdomain
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

Last edited by mopsos; 27th February 2007 at 16:05.
Reply With Quote
Sponsored Links
  #2  
Old 28th February 2007, 18:49
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

What's in /etc/postfix/mysql/mysql_virtual_alias_maps.cf? What's the output of
Code:
postconf -d | grep mail_version
?
__________________
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
  #3  
Old 1st March 2007, 00:15
mopsos mopsos is offline
Junior Member
 
Join Date: Feb 2007
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I format my server and follow the howto of howtoforge. And now the problem is ok.

But now when I try to connect with my client thunderbir I have it:
Code:
Mar  1 00:19:04 sd-5581 imaplogin: LOGIN FAILED, ip=[::ffff:62.193.34.232]
Mar  1 00:20:31 sd-5581 authdaemond.mysql: failed to connect to mysql server (server=localhost, userid=mail_admin)
The userid is ok.
I put mail_admin and mail_admin_password.
Where is the problem?

EDIT: If I put the ip of my personnal computer in "mynetwork" I can send mail . It's a problem with the configuration for courier. But I don't know where

Last edited by mopsos; 1st March 2007 at 09:36.
Reply With Quote
  #4  
Old 1st March 2007, 14:38
mopsos mopsos is offline
Junior Member
 
Join Date: Feb 2007
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I found a problem. I had a conflit with my version courier (stable) and my postfix (testing). I reinstalled courier (testing);
Now I can recieve my mail.
But the sending is impossible. "Relay acces denied".

My main.cf
Code:
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
#smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
#smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache


myhostname = mail.artwai.fr
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mail.artwai.fr, localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8,ipserver,localhost,localhost.localdomain
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy: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
#mailbox_command =
#home_mailbox = Maildir/
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
#virtual_mailbox_limit_maps = proxy: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
I think is a problem with le TLS. But I don't know where is.

In my mail.info, I can see that :
Code:
Mar  1 15:16:10 sd-5581 postfix/smtpd[4154]: warning: SASL authentication failure: Password verification failed
Mar  1 15:16:10 sd-5581 postfix/smtpd[4154]: warning: unknown[62.193.34.232]: SASL PLAIN authentication failed: generic failure

Last edited by mopsos; 1st March 2007 at 15:37.
Reply With Quote
  #5  
Old 1st March 2007, 21:11
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

What's in /etc/pam.d/smtp and /etc/postfix/sasl/smtpd.conf?
__________________
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
  #6  
Old 2nd March 2007, 18:05
mopsos mopsos is offline
Junior Member
 
Join Date: Feb 2007
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In my /etc/pam.d/smpt
Code:
auth    required   pam_mysql.so
user= root
passwd= password
host=127.0.0.1
db=mail
table=users
usercolumn=email
passwdcolumn=password
crypt=1
account sufficient pam_mysql.so
user= root
passwd= password
host=127.0.0.1
db=mail
table=users
usercolumn=email
passwdcolumn=password
crypt=1
And in my /etc/postfix/sasl/smtpd
Code:
pwcheck_method: saslauthd
mech_list: plain login
allow_plaintext: true
auxprop_plugin: mysql
sql_hostnames: 127.0.0.1
sql_user: root
sql_passwd: password
sql_database: mail
sql_select: select password from users where email = '%u'
Regards.

Last edited by mopsos; 2nd March 2007 at 20:45.
Reply With Quote
  #7  
Old 3rd March 2007, 15:55
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

Quote:
Originally Posted by mopsos
In my /etc/pam.d/smpt
Code:
auth    required   pam_mysql.so
user= root
passwd= password
host=127.0.0.1
db=mail
table=users
usercolumn=email
passwdcolumn=password
crypt=1
account sufficient pam_mysql.so
user= root
passwd= password
host=127.0.0.1
db=mail
table=users
usercolumn=email
passwdcolumn=password
crypt=1
It's /etc/pam.d/smtp, not /etc/pam.d/smpt, and it must have only two lines:

Code:
auth    required   pam_mysql.so user=mail_admin passwd=mail_admin_password host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1
account sufficient pam_mysql.so user=mail_admin passwd=mail_admin_password host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1
__________________
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
  #8  
Old 4th March 2007, 20:38
mopsos mopsos is offline
Junior Member
 
Join Date: Feb 2007
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Thank you very much. It's because I had writen my smtp files in pam.d with more than 2 lines and I had a space between user and root and passwd ans password.

Regards.
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
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
Verify email setup meekish Installation/Configuration 28 27th October 2006 15:36
Virtual Users And Domains With Postfix, Courier And MySQL wmrwl HOWTO-Related Questions 73 6th October 2006 23:06
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs k1piee HOWTO-Related Questions 14 1st October 2006 13:46


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


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