Mail server configuration : postfix, dovecot, postfixadmin & mariadb
Linux - EnterpriseThis forum is for all items relating to using Linux in the Enterprise.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Mail server configuration : postfix, dovecot, postfixadmin & mariadb
Hi everybody !
Well, i have followed this tuto to create my professionnal mail address : https://www.rosehosting.com/blog/set...l-PostfixAdmin
I should verify my configuration and begin again from start because i did follow others tutos on the web
Now, my configuration semmes clean :
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)
Code:
driver = mysql
connect = host=51.68.59.83 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 www.infosysdevconcept.org !
Thanks very much,
Franck
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)
the new configuration of my mail server came after an ancient configuration... not so clean !
So, i have re-configured the server from start with postfix, dovecot, opendkim, spamassassin, policiyd, postfixadmin and dovecot.
The configuration of the mail server was made after this tuto : https://www.rosehosting.com/blog/set...b-on-centos-7/
Well, my client mail (evolution) can(t pass the aythentification test (the password is OK, i have verified it !).
So, one more time, any help welcome to see what's wrong
Her a bit of my log :
Code:
Jul 25 05:24:54 laios spamd[23403]: spamd: server killed by SIGTERM, shutting down
Jul 25 05:24:54 laios dovecot: master: Warning: Killed with signal 15 (by pid=23544 uid=0 code=kill)
Jul 25 05:24:54 laios postfix/postfix-script[23551]: stopping the Postfix mail system
Jul 25 05:24:54 laios postfix/master[23450]: terminating on signal 15
Jul 25 05:24:54 laios spamd[23554]: logger: removing stderr method
Jul 25 05:24:54 laios postfix/postfix-script[23639]: starting the Postfix mail system
Jul 25 05:24:54 laios postfix/master[23641]: daemon started -- version 2.10.1, configuration /etc/postfix
Jul 25 05:24:54 laios dovecot: master: Dovecot v2.2.36 (1f10bfa63) starting up for imap, pop3, lmtp (core dumps disabled)
Jul 25 05:24:55 laios spamd[23601]: spamd: server started on IO::Socket::IP [127.0.0.1]:783, IO::Socket::IP [::1]:783 (running version 3.4.0)
Jul 25 05:24:55 laios spamd[23601]: spamd: server pid: 23601
Jul 25 05:24:55 laios spamd[23601]: spamd: server successfully spawned child process, pid 23663
Jul 25 05:24:55 laios spamd[23601]: spamd: server successfully spawned child process, pid 23664
Jul 25 05:24:55 laios spamd[23601]: prefork: child states: IS
Jul 25 05:24:55 laios spamd[23601]: prefork: child states: II
Jul 25 05:24:57 laios opendkim[23462]: OpenDKIM Filter: mi_stop=1
Jul 25 05:24:57 laios opendkim[23462]: OpenDKIM Filter v2.11.0 terminating with status 0, errno = 0
Jul 25 05:24:57 laios opendkim[23667]: OpenDKIM Filter v2.11.0 starting (args: -x /etc/opendkim.conf -P /var/run/opendkim/opendkim.pid)
Jul 25 05:25:16 laios dovecot: pop3-login: Disconnected (auth failed, 2 attempts in 14 secs): user=<francesco>, method=PLAIN, rip=93.25.186.102, lip=51.68.59.82, TLS, session=<g4qh+HiO1IpdGbpm>
Jul 25 05:25:19 laios dovecot: imap-login: Disconnected (auth failed, 3 attempts in 17 secs): user=<francesco>, method=PLAIN, rip=93.25.186.102, lip=51.68.59.82, TLS, session=<Gzqg+HiOcrFdGbpm>
Jul 25 05:25:21 laios dovecot: imap-login: Disconnected (auth failed, 1 attempts in 4 secs): user=<francesco>, method=PLAIN, rip=93.25.186.102, lip=51.68.59.82, TLS, session=<h/aG+XiOdrFdGbpm>
the only thing i changed is the cert.pem and privkey.pem issued form certbot as a wildcard for my domain, and used both for postfix and dovecot.
1. Posting your server's IP and your SQL database user name and password to a public forum is really not wise. I hope you changed them.
2. I'm awat from my Dovecot system - but your userdb and passdb settings look OK. How did you verify that that the password is OK? Did you try actually running the apropriate query within MariaDB to make sure that it returned the correct fields?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.