Email with Postfix, Dovecot and MySQL on Debian 7
The tutorial appears to be for an old version of PostFix and Dovecot.
When I run service postfix restart, I get:
[....] Stopping Postfix Mail Transport Agent: postfix/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
. ok
[....] Starting Postfix Mail Transport Agent: postfixpostconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes
. ok
For dovecot, one step was to copy the slq conf, this file doesn't exist, but there are a few files in this directory with .ext extension.
cp -a /etc/dovecot/dovecot-sql.conf /etc/dovecot/dovecot-sql.conf.bak
I put the dovecot-sql.conf tutorial code in the dovecot-sql.conf.ext file.
Finally, was mentioned to service dovecot restart, the n I see all this:
doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -n > dovecot-new.conf
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:1: 'imaps' protocol is no longer necessary, rem ove it
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:1: 'pop3s' protocol is no longer necessary, rem ove it
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:5: ssl_cert_file has been replaced by ssl_cert = <file doveconf:="" warning:="" obsolete="" setting="" in="" etc="" dovecot="" dovecot.conf:6:="" ssl_key_file="" has="" been="" replaced="" by="" ssl_key="<file" dovecot.conf:8:="" namespace="" private="" {}="" na="" mespace="" {="" type="private" }="" fatal:="" error="" configuration="" file="" dovecot.conf="" line="" 19:="" unknown="" setting:="" global_script_p="" ath="" [....]="" restarting="" imap="" pop3="" mail="" server:="" dovecotdoveconf:="" note:="" you="" can="" get="" a="" new="" clean="" config="" wit="" h:="" doveconf="" -n="">dovecot-new.conf
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:1: 'imaps' protocol is no longer necessary, rem ove it
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:1: 'pop3s' protocol is no longer necessary, rem ove it
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:5: ssl_cert_file has been replaced by ssl_cert =</file>
Lots of old parameters, the conf file does in fact exist and so do the ssl, but postfix instructions on that tutorial had them created in a different place than dovecot is looking.
It appears to be a big mess. Should I uninstall postfix, dovecot, delete the mail mysql DB and start over from different tutorial?
6 Replies
Try following this tutorial
SELECT * FROM virtual_users;
DELETE FROM virtual_users WHERE id=#;
quit;
The SELECT command will show a list of curent email addresses. This should include the id number of each address. Find the one you want, and us e it's id number in the DELETE to replace the #.
As for deleting the files for each address, look under /var/mail/vhosts/ . You'll see a directory there for each domain you have configured. Under each of those, you'll see a directory for each email address under that domain. For example, if you're deleting
rm -rf /var/mail/vhosts/mydomain.com/test/
Debian 6Ubuntu 10.04