04-14-2023, 10:13 PM
Here are my files on a real production system:
root@ehcp:~# more /etc/postfix/mysql-virtual_domains.cf
user = ehcp
password = xxxxx
dbname = ehcp
table = domains
select_field = 'virtual'
where_field = domainname
hosts = 127.0.0.1
root@ehcp:~# more /etc/postfix/mysql-virtual_forwardings.cf
user = ehcp
password = xxxxx
dbname = ehcp
table = forwardings
select_field = destination
where_field = source
hosts = 127.0.0.1
root@ehcp:~#
root@ehcp:~# more /etc/postfix/mysql-virtual_mailboxes.cf
user = ehcp
password = xxxxx
dbname = ehcp
table = emailusers
select_field = CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
where_field = email
hosts = 127.0.0.1
root@ehcp:~#
root@ehcp:~# /etc/postfix/mysql-virtual_email2email.cf
-bash: /etc/postfix/mysql-virtual_email2email.cf: Permission denied
root@ehcp:~# cat /etc/postfix/mysql-virtual_email2email.cf
user = ehcp
password = xxxxx
dbname = ehcp
table = emailusers
select_field = email
where_field = email
hosts = 127.0.0.1
root@ehcp:~# /etc/postfix/mysql-virtual_mailbox_limit_maps.cf
-bash: /etc/postfix/mysql-virtual_mailbox_limit_maps.cf: Permission denied
root@ehcp:~# cat /etc/postfix/mysql-virtual_mailbox_limit_maps.cf
user = ehcp
password = xxxxx
dbname = ehcp
table = emailusers
select_field = quota
where_field = email
hosts = 127.0.0.1
root@ehcp:~# cat /etc/pam.d/smtp
auth required pam_mysql.so user=ehcp passwd=xxxxx host=127.0.0.1 db=ehcp table=emailusers usercolumn=email passwdcolumn=password crypt=1
account sufficient pam_mysql.so user=ehcp passwd=xxxxx host=127.0.0.1 db=ehcp table=emailusers usercolumn=email passwdcolumn=password crypt=1
root@ehcp:~#
root@ehcp:~# cat /etc/courier/authmysqlrc
MYSQL_SERVER localhost
MYSQL_USERNAME ehcp
MYSQL_PASSWORD xxxxx
MYSQL_PORT 0
MYSQL_DATABASE ehcp
MYSQL_USER_TABLE emailusers
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
root@ehcp:~#
root@ehcp:~# cat /etc/pam.d/vsftpd
auth required pam_mysql.so user=ehcp passwd=xxxxx host=localhost db=ehcp table=ftpaccounts usercolumn=ftpusername passwdcolumn=password crypt=2
account required pam_mysql.so user=ehcp passwd=xxxxx host=localhost db=ehcp table=ftpaccounts usercolumn=ftpusername passwdcolumn=password crypt=2
root@ehcp:~#
Restored from old drupal forum, for user uid:2734 username:tobik999
You may reset your password to access your new account here.
root@ehcp:~# more /etc/postfix/mysql-virtual_domains.cf
user = ehcp
password = xxxxx
dbname = ehcp
table = domains
select_field = 'virtual'
where_field = domainname
hosts = 127.0.0.1
root@ehcp:~# more /etc/postfix/mysql-virtual_forwardings.cf
user = ehcp
password = xxxxx
dbname = ehcp
table = forwardings
select_field = destination
where_field = source
hosts = 127.0.0.1
root@ehcp:~#
root@ehcp:~# more /etc/postfix/mysql-virtual_mailboxes.cf
user = ehcp
password = xxxxx
dbname = ehcp
table = emailusers
select_field = CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
where_field = email
hosts = 127.0.0.1
root@ehcp:~#
root@ehcp:~# /etc/postfix/mysql-virtual_email2email.cf
-bash: /etc/postfix/mysql-virtual_email2email.cf: Permission denied
root@ehcp:~# cat /etc/postfix/mysql-virtual_email2email.cf
user = ehcp
password = xxxxx
dbname = ehcp
table = emailusers
select_field = email
where_field = email
hosts = 127.0.0.1
root@ehcp:~# /etc/postfix/mysql-virtual_mailbox_limit_maps.cf
-bash: /etc/postfix/mysql-virtual_mailbox_limit_maps.cf: Permission denied
root@ehcp:~# cat /etc/postfix/mysql-virtual_mailbox_limit_maps.cf
user = ehcp
password = xxxxx
dbname = ehcp
table = emailusers
select_field = quota
where_field = email
hosts = 127.0.0.1
root@ehcp:~# cat /etc/pam.d/smtp
auth required pam_mysql.so user=ehcp passwd=xxxxx host=127.0.0.1 db=ehcp table=emailusers usercolumn=email passwdcolumn=password crypt=1
account sufficient pam_mysql.so user=ehcp passwd=xxxxx host=127.0.0.1 db=ehcp table=emailusers usercolumn=email passwdcolumn=password crypt=1
root@ehcp:~#
root@ehcp:~# cat /etc/courier/authmysqlrc
MYSQL_SERVER localhost
MYSQL_USERNAME ehcp
MYSQL_PASSWORD xxxxx
MYSQL_PORT 0
MYSQL_DATABASE ehcp
MYSQL_USER_TABLE emailusers
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
root@ehcp:~#
root@ehcp:~# cat /etc/pam.d/vsftpd
auth required pam_mysql.so user=ehcp passwd=xxxxx host=localhost db=ehcp table=ftpaccounts usercolumn=ftpusername passwdcolumn=password crypt=2
account required pam_mysql.so user=ehcp passwd=xxxxx host=localhost db=ehcp table=ftpaccounts usercolumn=ftpusername passwdcolumn=password crypt=2
root@ehcp:~#
Restored from old drupal forum, for user uid:2734 username:tobik999
You may reset your password to access your new account here.