Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th January 2010, 16:07
voltron81 voltron81 is offline
Senior Member
 
Join Date: Sep 2009
Posts: 292
Thanks: 1
Thanked 4 Times in 3 Posts
Default How can I setup postfix to read unencrypted passwords from the database?

Hi to everybody.
I've setup a mail server using this howto: http://www.howtoforge.com/virtual-us...l-debian-lenny

For some reason, I need to have the password unencrypted in the database.
But if I put an unencrypted email, I can not login in the account...

How can I setup postix to do it?

Thanks
Michele
Reply With Quote
Sponsored Links
  #2  
Old 12th January 2010, 18:28
voltron81 voltron81 is offline
Senior Member
 
Join Date: Sep 2009
Posts: 292
Thanks: 1
Thanked 4 Times in 3 Posts
Default

nothing?
Reply With Quote
  #3  
Old 13th January 2010, 14:13
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

I haven't tried this yet.
__________________
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
  #4  
Old 13th January 2010, 17:33
voltron81 voltron81 is offline
Senior Member
 
Join Date: Sep 2009
Posts: 292
Thanks: 1
Thanked 4 Times in 3 Posts
Default

Hi Falko,
Thanks for your reply.

I really can not understand what I've to change in postfix to do it...

I've a database with emails and passwords, but I can not encrypt passwords because I use that passwords also to fetch emails...
So if I don't find the way to solve this problem, I've to save the password twice, one encrypted and one no...

Reply With Quote
  #5  
Old 14th January 2010, 10:38
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

This is pretty easy, you can use unencrypted passwords. just set crypt=0 in your pam configurations. for more info read the pam_mysql man page.
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
  #6  
Old 14th January 2010, 12:45
voltron81 voltron81 is offline
Senior Member
 
Join Date: Sep 2009
Posts: 292
Thanks: 1
Thanked 4 Times in 3 Posts
Default

Thanks topdog for your reply.

Basically in /etc/pam.d/pop3 I've this:
Code:
# PAM configuration file for Courier POP3 daemon

#@include common-auth
#@include common-account
#@include common-password
#@include common-session
and in common-password:
Code:
password   required   pam_unix.so nullok obscure md5
I tried to just cancel the md5 from common-password, but it's look like not working...

What should I modify?

Thanks

Michele
Reply With Quote
  #7  
Old 14th January 2010, 12:50
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 153 Times in 150 Posts
Default

If you followed that howto, then you need to change /etc/pam.d/smtp and /etc/courier/authmysqlrc

/etc/pam.d/smtp

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=0
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=0
/etc/courier/authmysqlrc

Code:
MYSQL_SERVER localhost
MYSQL_USERNAME mail_admin
MYSQL_PASSWORD mail_admin_password
MYSQL_PORT 0
MYSQL_DATABASE mail
MYSQL_USER_TABLE users
#MYSQL_CRYPT_PWFIELD password
MYSQL_CLEAR_PWFIELD password
MYSQL_UID_FIELD 5000
MYSQL_GID_FIELD 5000
MYSQL_LOGIN_FIELD email
MYSQL_HOME_FIELD "/home/vmail"
MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
#MYSQL_NAME_FIELD
MYSQL_QUOTA_FIELD quota
http://www.howtoforge.com/virtual-us...ebian-lenny-p2
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
  #8  
Old 14th January 2010, 13:05
voltron81 voltron81 is offline
Senior Member
 
Join Date: Sep 2009
Posts: 292
Thanks: 1
Thanked 4 Times in 3 Posts
 
Default

Perfect!!!

Thanks a lot

Michele
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
Catchall and Forwarding not working simmo General 6 22nd March 2014 00:54
Mail server using Postfix, Dovecot, Mysql... Postfix virtual maps doesn't work?? tarasbuljba HOWTO-Related Questions 33 28th May 2010 14:33
postfix, pop3 uvbnserved Server Operation 22 24th May 2009 21:00
Help with SASL TLS with Postfix using a database for user details james@thereidsonline.com Installation/Configuration 2 25th April 2008 13:48
Mail System Error - Returned Mail tristanlee85 General 16 16th March 2008 09:40


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


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