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 29th November 2010, 12:43
maykel535 maykel535 is offline
Member
 
Join Date: May 2009
Posts: 33
Thanks: 5
Thanked 3 Times in 2 Posts
 
Default I need help with courier and mysql for mailserver

Hi very good I have followed this tutorial http://www.howtoforge.com/virtual-us...l-ubuntu-10.10
which incidentally is fucking great. The issue is that need of necessity, that
authenticate users with usuario@dominio.com than I need
also authenticate itself only with a user name and access
same mailbox is:

Username: ejemplo@dominio.com
Username: zjvK001
password: secret

I've added one more column in the users table called user being
as follows:

email password user quota
ejemplo@dominio.com secret zjvK001 1000000

-------------------------------------------------- --------------------

To do this, I changed the queries to databases from
postfix running as follows:

/etc/postfix/mysql-virtual_mailboxes.cf:

user = mail_admin
password = mail_admin_password
dbname = mail
query = SELECT CONCAT (SUBSTRING_INDEX (1 ),'/', SUBSTRING_INDEX ,'@',- email (email ,'@', 1 ),'/') FROM users WHERE email = '%s' OR user = '%s'
hosts = 127.0.0.1


/etc/postfix/mysql-virtual_email2email.cf:

user = mail_admin
password = mail_admin_password
dbname = mail
query = SELECT email FROM users WHERE email = '%s' OR user = '%s'
hosts = 127.0.0.1



/etc/postfix/mysql-virtual_mailbox_limit_maps.cf:

user = mail_admin
password = mail_admin_password
dbname = mail
query = SELECT quota FROM users WHERE email = '% s' OR user = '% s'
hosts = 127.0.0.1


/etc/postfix/sasl/smtpd.conf:

pwcheck_method: saslauthd
mech_list: plain login
allow_plaintext: true
auxprop_plugin: mysql
sql_hostnames: 127.0.0.1
sql_user: mail_admin
sql_passwd: mail_admin_password
sql_database: mail
sql_select: select password from users WHERE email = '% u' OR user = '% u'

I imagine it will have to change this:

/etc/pam.d /smtp:

pam_mysql.so auth required user = passwd = mail_admin_password mail_admin
host = 127.0.0.1 db = mail table = users usercolumn passwdcolumn email = password =
crypt = 1
Sufficient pam_mysql.so account user = passwd = mail_admin_password mail_admin
host = 127.0.0.1 db = mail table = users usercolumn passwdcolumn email = password =
crypt = 1


Although no how.

And also have to change this:

/etc/courier/authmysqlrc:

Mysql_server localhost
Mail_admin MYSQL_USERNAME
Mail_admin_password MYSQL_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 // I think change the line but I don't know
MYSQL_HOME_FIELD "/ home / vmail"
MYSQL_MAILDIR_FIELD
CONCAT (SUBSTRING_INDEX (1 ),'/', SUBSTRING_INDEX ,'@',- email (email ,'@', 1 ),'/')
# MYSQL_NAME_FIELD // I uncomment this line for MYQL_NAME_FIELD user
// but is not work either
MYSQL_QUOTA_FIELD quota

Do not know how ... I need to be so by necessity, since the domains
I manage are in a remote server and users can enter
say your username and the alias, ie:

Username: ejemplo@dominio.com
Username: zjvK001
password: secret

When I logging, either from webmail or from a mail client
ejemplo@dominio.com and agree to enter my mailbox, then enter
zjvK001 and agree to the same mailbox ... Any ideas? Thanks in advance.
Reply With Quote
Sponsored Links
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
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 9.04) Master One HOWTO-Related Questions 4 1st July 2009 15:38
Virtual Users And Domains With Postfix, Courier And MySQL - SASLauthd problem qtx HOWTO-Related Questions 7 22nd May 2007 18:19
Upgrade question for "Virtual Users And Domains With Postfix, Courier And MySQL" emresumengen HOWTO-Related Questions 3 1st December 2006 15:33
Virtual Users And Domains With Postfix, Courier And MySQL - "apt-get" and Courier burritonator HOWTO-Related Questions 3 15th March 2006 20:11
Problem with Virtual Users And Domains With Postfix, Courier And MySQL Howto fenix Server Operation 4 11th March 2006 02:53


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


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