[Dovecot] Don't Know Where Emails Are Or What's Happening

Simon Brereton simon.brereton at buongiorno.com
Fri Oct 21 02:07:57 EEST 2011


On 20 October 2011 18:28, Jack Fredrikson <jackfredrikson at yahoo.com> wrote:
> 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

First, get a newer version of Dovecot.  You don't say what OS you're
working on, but I'm pretty sure it will support a newer version.

> [root at 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:

Were you testing from 66.248.165.32?  You still have too many errors
from postfix and you need to sort out your MTA (Mail Transport) before
you worry about the MDA (Mail Delivery).


> Oct 20 10:13:15 example
> postfix/smtpd[30152]: warning: dict_nis_init: NIS domain name not set
> - NIS lookups disabled
> Oct 20 10:13:15 example
> postfix/smtpd[30152]: cannot load Certificate Authority data:
> 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.

Yes, TLS is isn't an issue - although you have it incorrectly
configured.  That would be the last thing you need to implement/fix.
For now disable it in postfix and dovecot.

http://www.howtoforge.com/forums/archive/index.php/t-10943.html



>  [root at 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 at example jack]#
> ps wax|grep postfix
>  4000 ?
> Ss     0:01 /usr/libexec/postfix/master
> 31839
> pts/2    S+     0:00 grep
> postfix
> [root at example jack]# ps wax|grep postfixadmin
> 31842
> pts/2    S+     0:00 grep
> postfixadmin
> [root at 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

At a minimum your daemons are running - congratulations!  That's
always a good start and I remember when I was setting up the sense of
achievement that brought.  But for now you need to get postfix working
(their list is great).  Perhaps if you give more details on your
system I can point you to a better howto.  And maybe more information
on what you're trying to achieve?  Virtual domain?  Virtual domains?
Multiple users?  Local users?  All these have an impact on what the
solution is.

Simon



More information about the dovecot mailing list