Hi;
I'm new to Dovecot and Postfix. I'm trying to enable these with MySQL support and postfixadmin. I've got all those services up and running (finally!); however, I can't figure out if the emails are being received and/or stored. I'm pretty sure Postfix is receiving them because I dealt with certain errors and they're now gone. Here's some data:
Dovecot ver. 0.91
[root@example postfix]# /sbin/service dovecot -n doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -n > dovecot-new.conf doveconf: Warning: Obsolete setting in /usr/local/etc/dovecot/dovecot.conf:5: imap_client_workarounds=outlook-idle is no longer necessary doveconf: Warning: Obsolete setting in /usr/local/etc/dovecot/dovecot.conf:17: add auth_ prefix to all settings inside auth {} and remove the auth {} section completely doveconf: Warning: Obsolete setting in /usr/local/etc/dovecot/dovecot.conf:21: passdb sql {} has been replaced by passdb { driver=sql } doveconf: Warning: Obsolete setting in /usr/local/etc/dovecot/dovecot.conf:24: userdb sql {} has been replaced by userdb { driver=sql } doveconf: Warning: Obsolete setting in /usr/local/etc/dovecot/dovecot.conf:27: userdb prefetch {} has been replaced by userdb { driver=prefetch } doveconf: Warning: Obsolete setting in /usr/local/etc/dovecot/dovecot.conf:29: auth_user has been replaced by service auth { user } Usage: /etc/init.d/dovecot {start|stop|reload|restart|force-reload}
tail /var/log/maillog Oct 20 10:13:59 example postfix/smtpd[28141]: warning: problem talking to service rewrite: Success Oct 20 10:13:59 example postfix/master[4000]: warning: process /usr/libexec/postfix/trivial-rewrite pid 30178 exit status 1 Oct 20 10:13:59 example postfix/master[4000]: warning: process /usr/libexec/postfix/trivial-rewrite pid 30179 exit status 1 Oct 20 10:13:59 example postfix/smtpd[28458]: warning: problem talking to service rewrite: Success Oct 20 10:13:59 example postfix/master[4000]: warning: process /usr/libexec/postfix/trivial-rewrite pid 30180 exit status 1 Oct 20 10:13:59 example postfix/master[4000]: warning: process /usr/libexec/postfix/trivial-rewrite pid 30181 exit status 1 Oct 20 10:13:59 example postfix/smtpd[28483]: warning: problem talking to service rewrite: Success Oct 20 10:13:59 example postfix/smtpd[28460]: warning: problem talking to service rewrite: Success Oct 20 10:13:59 example postfix/master[4000]: warning: process /usr/libexec/postfix/trivial-rewrite pid 30182 exit status 1 Oct 20 10:13:59 example postfix/smtpd[28455]: warning: problem talking to service rewrite: Success Oct 20 10:13:59 example postfix/master[4000]: warning: process /usr/libexec/postfix/trivial-rewrite pid 30183 exit status 1 Oct 20 10:13:59 example postfix/smtpd[28484]: warning: problem talking to service rewrite: Success Oct 20 10:13:59 example postfix/master[4000]: warning: process /usr/libexec/postfix/trivial-rewrite pid 30184 exit status 1 Oct 20 10:13:59 example postfix/smtpd[29917]: warning: problem talking to service rewrite: Success Oct 20 10:13:59 example postfix/master[4000]: warning: process /usr/libexec/postfix/trivial-rewrite pid 30185 exit status 1 Oct 20 10:13:59 example postfix/smtpd[29953]: warning: problem talking to service rewrite: Success Oct 20 10:13:59 example postfix/master[4000]: warning: process /usr/libexec/postfix/trivial-rewrite pid 30186 exit status 1 Oct 20 10:13:59 example postfix/smtpd[28485]: warning: problem talking to service rewrite: Success Oct 20 10:13:59 example postfix/master[4000]: warning: process /usr/libexec/postfix/trivial-rewrite pid 30187 exit status 1 Oct 20 10:14:15 example postfix/smtpd[30152]: connect from unknown[66.248.165.32] Oct 20 10:14:15 example postfix/smtpd[30152]: lost connection after EHLO from unknown[66.248.165.32] Oct 20 10:14:15 example postfix/smtpd[30152]: disconnect from unknown[66.248.165.32]
I also get this in there:
Oct 20 10:13:15 example postfix/smtpd[30152]: warning: dict_nis_init: NIS domain name not set postfix/smtpd[30152]: cannot load Certificate Authority data:
- NIS lookups disabled Oct 20 10:13:15 example
disabling TLS support Oct 20 10:13:15 example postfix/smtpd[30152]: warning: TLS library problem: 30152:error:02001002:system library:fopen:No such file or directory:bss_file.c:122:fopen('/etc/pki/tls/c erts/cert.pem','r'): Oct 20 10:13:15 example postfix/smtpd[30152]: warning: TLS library problem: 30152:error:2006D080:BIO routines:BIO_new_file:no such file:bss_file.c:125: Oct 20 10:13:15 example postfix/smtpd[30152]: warning: TLS library problem: 30152:error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib:by_file.c:279: Oct 20 10:13:15 example postfix/smtpd[30152]: connect from unknown[66.248.165.32] Oct 20 10:13:15 example postfix/smtpd[30152]: lost connection after EHLO from unknown[66.248.165.32] Oct 20 10:13:15 example postfix/smtpd[30152]: disconnect from unknown[66.248.165.32] Oct 20 10:13:57 example postfix/proxymap[28446]: warning: mysql query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version f or the right syntax to use near '??gifteatszone.com??? AND active = 1' at line 1 Oct 20 10:13:57 example postfix/trivial-rewrite[30154]: fatal: proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem Oct 20 10:13:57 example postfix/trivial-rewrite[30155]: fatal: proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem Oct 20 10:13:57 example postfix/proxymap[28444]: warning: mysql query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version f or the right syntax to use near '??awakelunch.info??? AND active = 1' at line 1
I reckon the failing of mysql inquiries just has to do with hackers trying to hack me. The TLS problem isn't mission-critical since it's just getting disabled. [root@example jack]# ps wax|grep dovecot 20223 ? Ss 0:00 /usr/local/sbin/dovecot 20224 ? S 0:00 dovecot/anvil 20225 ? S 0:00 dovecot/log 31832 ? S 0:00 dovecot/config 31833 ? S 0:00 dovecot/auth 31836 pts/2 S+ 0:00 grep dovecot [root@example jack]# ps wax|grep postfix 4000 ? Ss 0:01 /usr/libexec/postfix/master 31839 pts/2 S+ 0:00 grep postfix [root@example jack]# ps wax|grep postfixadmin 31842 pts/2 S+ 0:00 grep postfixadmin [root@example jack]# ps wax|grep saslauthd 16337 ? Ss 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam -n 2 16338 ? S 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam -n 2 25718 ? S 0:00 /usr/sbin/saslauthd -d -a pam 25719 ? S 0:00 /usr/sbin/saslauthd -d -a pam 25720 ? S 0:00 /usr/sbin/saslauthd -d -a pam 25721 ? S 0:00 /usr/sbin/saslauthd -d -a pam 25722 ? S 0:00 /usr/sbin/saslauthd -d -a pam 32052 pts/2 S+ 0:00 grep saslauthd
I also tried this:
First send a test mail to yourself (as your own non-root user): echo "Hello me" | mail -s "Dovecot test" $USER Now, find where the mail went. Here's a simple script which checks the most common locations: for mbox in /var/mail/$USER /var/spool/mail/$USER ~/mbox ~/mail/* ~/*; do grep -q "Dovecot test" $mbox && echo "mbox: $mbox" done grep -q "Dovecot test" ~/Maildir/new/* 2>/dev/null && echo "Maildir: ~/Maildir"
and the mail was not found.
This from my dovecot.conf file: mail_location = maildir:/var/vmail/%d/%u #but there's nothing there. ... auth default { # Having "login" also as a mechanism make sure outlook can use the auth smtpd as well # http://wiki.dovecot.org/Authentication/Mechanisms mechanisms = plain login passdb sql { args = /usr/local/etc/dovecot/sql.conf } userdb sql { args = /usr/local/etc/dovecot/sql.conf } userdb prefetch { } user = nobody socket listen { master { path = /var/run/dovecot/auth-master mode = 0660 user = vmail group = mail } client { path = /var/spool/postfix/private/auth mode = 0660 user = postfix group = mail } } }
Telnetting to port 25 brings up Postfix, to port 110 brings up Dovecot
TIA,Jack