Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.


  Search this Thread
Old 07-11-2019, 04:52 AM   #1
LQ Newbie
Registered: Jul 2019
Posts: 1

Rep: Reputation: Disabled
Mail server configuration : postfix, dovecot, postfixadmin & mariadb

Hi everybody !

Well, i have followed this tuto to create my professionnal mail address :
I should verify my configuration and begin again from start because i did follow others tutos on the web
Now, my configuration semmes clean :
[root@laios conf.d]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
milter_default_action = accept
mydestination = localhost
myhostname =
mynetworks =
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_milters = inet:
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, check_policy_service unix:private/policy-spf
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/letsencrypt/live/
smtpd_tls_key_file = /etc/letsencrypt/live/
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 550
virtual_alias_maps = proxy:mysql:/etc/postfix/sql/, proxy:mysql:/etc/postfix/sql/, proxy:mysql:/etc/postfix/sql/
virtual_mailbox_domains = proxy:mysql:/etc/postfix/sql/
virtual_mailbox_maps = proxy:mysql:/etc/postfix/sql/, proxy:mysql:/etc/postfix/sql/
virtual_transport = lmtp:unix:private/dovecot-lmtp
[root@laios conf.d]# dovecot -n
# 2.2.36 (1f10bfa63): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.24 (124e06aa)
# OS: Linux 3.10.0-957.21.3.el7.x86_64 x86_64 CentOS Linux release 7.6.1810 (Core)  btrfs
# Hostname:
auth_mechanisms = plain login
first_valid_uid = 150
last_valid_uid = 150
mail_gid = mail
mail_location = maildir:/var/mail/%d/%n
mail_privileged_group = mail
mail_uid = vmail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext
mbox_write_locks = fcntl
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
    special_use = \Drafts
  mailbox Junk {
    special_use = \Junk
  mailbox Sent {
    special_use = \Sent
  mailbox "Sent Messages" {
    special_use = \Sent
  mailbox Trash {
    special_use = \Trash
  prefix = 
passdb {
  args = /etc/dovecot/conf.d/dovecot-sql.conf.ext
  driver = sql
plugin {
  sieve = file:~/sieve;active=~/.dovecot.sieve
postmaster_address =
service auth-worker {
  user = vmail
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0666
    user = postfix
  unix_listener auth-userdb {
    mode = 0600
    user = vmail
  user = dovecot
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
ssl_cert = </etc/letsencrypt/live/
ssl_key =  # hidden, use -P to show it
userdb {
  args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
  driver = static
But i have this error message on /var/log/maillog
Jul 11 11:21:54 laios dovecot: auth: Warning: sql: Ignoring changed user_query in /etc/dovecot/conf.d/dovecot-sql.conf.ext, because userdb sql not used. (If this is intentional, set userdb_warning_disable=yes)
Well, i do have an user query and can't hope authentication if it's ignored...
My configuration uses user vmail:mail and postfixostfix
How can i change it to let sql user make the user_query ?
Here /etc/dovecot/conf.d/dovecot-sql.conf.ext (from a precedent configuration, directory of user vmail:mail is mail and not vmail... should not be important)
driver = mysql
connect = host= dbname=mailserver user=mailuser password=uudeu{GhieNgo8kei
default_pass_scheme = MD5-CRYPT
password_query = SELECT username as user, password, '/var/mail/%d/%n' as userdb_home, 'maildir:/var/mail/%d/%n' as userdb_mail, 150 as userdb_uid, 8 as userdb_gid FROM mailbox WHERE username = '%u' AND active = '1'
user_query = SELECT '/var/mail/%d/%u' as home, 'maildir:/var/mail/%d/%u' as mail, 150 AS uid, 8 AS gid, concat('dirsize:storage=',  quota) AS quota FROM mailbox WHERE username = '%u' AND active = '1'
PS : my database is external and from precedents configurations have others username and database. Should not be important.

Any help welcome to solve my problem, and i could make a french and english tuto for this pretty good configuration on !
Thanks very much,
Old 07-11-2019, 10:49 AM   #2
Senior Member
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 3,264

Rep: Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106Reputation: 1106
Jul 11 11:21:54 laios dovecot: auth: Warning: sql: Ignoring changed user_query in /etc/dovecot/conf.d/dovecot-sql.conf.ext, because userdb sql not used. (If this is intentional, set userdb_warning_disable=yes)
That's a warning, not an error. See the parenthetical comment at the end of the warning (highlighted)

Is something not working?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Set up a mail server with PostfixAdmin and MariaDB on CentOS 7 LXer Syndicated Linux News 0 05-12-2017 12:42 PM
postfix+dovecot+mariadb+postfixadmin failure rhinolt Linux - Distributions 1 02-23-2017 10:34 AM
Can send mail but Not able to receive mail. Postfixadmin, dovecot, postfix setup RajeshThakur Linux - Newbie 9 04-20-2012 08:31 AM > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 10:28 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration