[postfix-es] I need help with courier and postfix in mailserver

Maykel Franco Hernández maykel en maykel.sytes.net
Lun Nov 29 13:10:45 CET 2010



Hi very good I have followed this tutorial
http://www.howtoforge.com/virtual-us...l-ubuntu-10.10 [1] 
which
incidentally is fucking great. The issue is that need of necessity, that

authenticate users with usuario en dominio.com [2] than I need 
also
authenticate itself only with a user name and access 
same mailbox is:


Username: ejemplo en dominio.com [3] 
Username: zjvK001 
password:
secret

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

as follows: 

email password user quota 
ejemplo en dominio.com [4] 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 en dominio.com [5] 
Username: zjvK001 
password: secret

When I
logging, either from webmail or from a mail client 
ejemplo en dominio.com
[6] and agree to enter my mailbox, then enter 
zjvK001 and agree to the
same mailbox ... Any ideas? Thanks in advance.

Links:
------
[1]
http://www.howtoforge.com/virtual-users-and-domains-with-postfix-courier-mysql-and-squirrelmail-ubuntu-10.10
[2]
mailto:usuario en dominio.com
[3] mailto:ejemplo en dominio.com
[4]
mailto:ejemplo en dominio.com
[5] mailto:ejemplo en dominio.com
[6]
mailto:ejemplo en dominio.com
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://lists.wl0.org/pipermail/postfix-es/attachments/20101129/a10c626a/attachment.html>


More information about the postfix-es mailing list