#1  
Old 24th April 2007, 19:24
iamx iamx is offline
Junior Member
 
Join Date: Apr 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with postfix tutorial

Hi.
I tried to set up my mailserver like in this tutorial
Virtual Users And Domains With Postfix, Courier And MySQL (Ubuntu 6.10 Edgy Eft)

I can send emails to my server from another email address, and i can collect emails from my server using imap protocol, but i cant send mails from my server (e.g. with thunderbird).

I googled alot but I could not find any useful information.

error message from /var/log/mail.log
Code:
Apr 24 18:27:13 v914 saslauthd[24494]: DEBUG: auth_pam: pam_authenticate failed: User not known to the underlying authentication module
Apr 24 18:27:13 v914 saslauthd[24494]: do_auth         : auth failure: [user=test@example.info] [service=smtp] [realm=example.info] [mech=pam] [reason=PAM auth error]
Apr 24 18:27:13 v914 saslauthd[24493]: (pam_unix) check pass; user unknown
Apr 24 18:27:13 v914 saslauthd[24493]: (pam_unix) authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
Apr 24 18:27:15 v914 saslauthd[24493]: DEBUG: auth_pam: pam_authenticate failed: User not known to the underlying authentication module
Apr 24 18:27:15 v914 saslauthd[24493]: do_auth         : auth failure: [user=test@example.info] [service=smtp] [realm=example.info] [mech=pam] [reason=PAM auth error]
(ofcourse test@example.info stands for my real username and realm)

error message from /var/log/auth.log
Code:
Apr 24 18:01:55 v914 postfix/smtpd[21667]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Apr 24 18:01:58 v914 postfix/smtpd[21667]: warning: SASL authentication failure: cannot connect to saslauthd server: Permission denied
Apr 24 18:01:58 v914 postfix/smtpd[21667]: warning: SASL authentication failure: Password verification failed
Apr 24 18:01:58 v914 postfix/smtpd[21667]: warning: dslc-082-082-074-037.pools.arcor-ip.net[MYIP]: SASL PLAIN authentication failed: generic failure

I think its a problem with saslauthd. But I can't find out what I do wrong.

This are my configurationfiles:

/etc/default/saslauthd
Code:
START=yes

PARAMS="-m /var/spool/postfix/var/run/saslauthd -r"

PIDFILE="/var/spool/postfix/var/run/${NAME}/saslauthd.pid"


# You must specify the authentication mechanisms you wish to use.
# This defaults to "pam" for PAM support, but may also include
# "shadow" or "sasldb", like this:
# MECHANISMS="pam shadow"

MECHANISMS="pam"

/etc/postfix/sasl/smtpd.conf

Code:
pwcheck_method: saslauthd

mech_list: PLAIN LOGIN

allow_plaintext: true

auxprop_plugin: mysql

sql_hostnames: 127.0.0.1

sql_user: USER

sql_passwd: PW

sql_database: mail

sql_select: select password from users where email = '%u'
(USER and PW = real username and pw )


vi /etc/pam.d/smtp

Code:
auth    required   pam_mysql.so user=USER passwd=PW host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1

account sufficient pam_mysql.so user=USER passwd=PW host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1
MySQL username and password information is correct in all files!

If anyone knows a solution please help me.

thx
/iamx
Reply With Quote
Sponsored Links
  #2  
Old 25th April 2007, 12:13
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,499 Times in 4,328 Posts
Default

Please have a look in the mysql logfile. Are any errors when pam tries to connect to the mysql server or when the sql query is executed?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 25th April 2007, 16:34
iamx iamx is offline
Junior Member
 
Join Date: Apr 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi.

I'm sorry, but there is no entry in the mysql logfile.

but I found some more information in the syslog file

Code:
Apr 25 16:31:38 v914 postfix/smtpd[19825]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Apr 25 16:31:38 v914 postfix/smtpd[19825]: connect from dslb-088-070-025-176.pools.arcor-ip.net[IP]
Apr 25 16:31:42 v914 postfix/smtpd[19825]: warning: SASL authentication failure: Password verification failed
Apr 25 16:31:42 v914 postfix/smtpd[19825]: warning: dslb-088-070-025-176.pools.arcor-ip.net[IP]: SASL PLAIN authentication failed: authentication failure
Apr 25 16:31:44 v914 postfix/smtpd[19825]: warning: dslb-088-070-025-176.pools.arcor-ip.net[IP]: SASL LOGIN authentication failed: authentication failure
Apr 25 16:31:47 v914 postfix/smtpd[19825]: disconnect from dslb-088-070-025-176.pools.arcor-ip.net[IP]
/iamx
Reply With Quote
  #4  
Old 25th April 2007, 20:47
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,499 Times in 4,328 Posts
Default

Please check if logging is enabled in the mysql my.cnf file.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 25th April 2007, 21:48
iamx iamx is offline
Junior Member
 
Join Date: Apr 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes I think logging is enabled.

my.cnf says:

Code:
log = /var/log/mysql/mysql.log
mysql.log file is empty!
Reply With Quote
  #6  
Old 26th April 2007, 20:05
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

Did you set up saslauthd exactly as shown in the tutorial? What's the output of
Code:
ps aux | grep saslauthd
?
__________________
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
  #7  
Old 27th April 2007, 08:15
iamx iamx is offline
Junior Member
 
Join Date: Apr 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is the output of "ps aux | grep saslauthd"

Code:
root     14034  0.0  0.0   6168   972 ?        Ss   Apr26   0:00 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a pam
root     14035  0.0  0.0   6168   584 ?        S    Apr26   0:00 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a pam
root     14037  0.0  0.0   6168   524 ?        S    Apr26   0:00 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a pam
root     14039  0.0  0.0   6168   524 ?        S    Apr26   0:00 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a pam
root     14040  0.0  0.0   6168   524 ?        S    Apr26   0:00 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a pam
root     16183  0.0  0.0   1504   504 pts/0    S+   08:12   0:00 grep saslauthd
Reply With Quote
  #8  
Old 28th April 2007, 18:38
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 your /etc/postfix/main.cf?
__________________
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
  #9  
Old 29th April 2007, 20:44
iamx iamx is offline
Junior Member
 
Join Date: Apr 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Hi,
this is my main.cf

Code:
myhostname = MYHOST
mydestination = MYHOST, localhost, localhost.localdomain
mynetworks = 127.0.0.0/8
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
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
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
smtpd_sasl_security_options = noanonymous
#append_dot_mydomain = no
#biff = no
#disable_vrfy_command = yes
#strict_rfc821_envelopes = yes
#smtpd_helo_required = yes
#message_size_limit = 31457280
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 Configuration Problem Shahryar Installation/Configuration 1 8th December 2006 15:19
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
Perfect Setup - Fedora Core 4 - postfix problem Median Installation/Configuration 7 2nd February 2006 12:21


All times are GMT +2. The time now is 03:38.


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