Discussion:
dovecot doesn't see my mails ?
Dave Myers
2014-09-19 07:54:36 UTC
Permalink
Dear dovecot users.

I have an odd issue in that when I connect to my dovecot server from
either a local or remote system I can't see my test emails (I have the
impression that is is looking at the wrong location on disk).

here are some details....

# dovecot -n
# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-xen-amd64 x86_64 Debian 6.0.3
auth_debug = yes
auth_debug_passwords = yes
auth_mechanisms = plain login cram-md5
auth_verbose = yes
auth_verbose_passwords = plain
lda_mailbox_autocreate = yes
log_path = /var/log/dovecot.log
mail_debug = yes
mail_gid = 1002
mail_home = /var/mail/virtual/%d/%n
mail_location = maildir:~/mail/:
mail_uid = 1002
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 = scheme=SHA512-CRYPT username_format=%u /etc/dovecot/users
driver = passwd-file
}
protocols = imap
service auth {
unix_listener auth-client {
mode = 0660
user = mail
}
}
service imap-login {
inet_listener imap {
port = 143
}
inet_listener imaps {
port = 993
ssl = yes
}
}
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
userdb {
args = username_format=%u /etc/dovecot/users
driver = passwd-file
}
userdb {
driver = passwd
}
verbose_ssl = yes

when I connect (via openSSL from a remote system)

openssl s_client -connect mail.exsportee.biz:993
CONNECTED(00000003)
depth=0 C = fr, ST = coupvray, L = paris, O = exsportee, OU = facilitee,
CN = scibearspace, emailAddress = david.myers at scibearspace.org
verify error:num=18:self signed certificate
verify return:1
depth=0 C = fr, ST = coupvray, L = paris, O = exsportee, OU = facilitee,
CN = scibearspace, emailAddress = david.myers at scibearspace.org
verify return:1
[.... security stuff removed....]
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
IDLE AUTH=PLAIN AUTH=LOGIN AUTH=CRAM-MD5] Dovecot ready.
auth login "websales at exsportee.biz" "testPassword"
auth OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND
UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE
QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS
SPECIAL-USE] Logged in
a list "" "*"
* LIST (\HasNoChildren) "." "INBOX"
a OK List completed.
a select INBOX
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)]
Flags permitted.
* 0 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1411042633] UIDs valid
* OK [UIDNEXT 1] Predicted next UID
* OK [NOMODSEQ] No permanent modsequences
a OK [READ-WRITE] Select completed.

So I seem to have no mails in the inbox... so I check the dovecot log
for the where it thinks it should be looking for the mail

Sep 19 07:37:59 imap-login: Info: Login: user=<websales at exsportee.biz>,
method=PLAIN, rip=85.170.90.200, lip=92.39.247.92, mpid=26570, TLS,
session=<Cf4uLmYDlgBVqlrI>
Sep 19 07:37:59 imap(websales at exsportee.biz): Debug: Effective uid=1002,
gid=1002, home=/var/mail/virtual/exsportee.biz/websales
Sep 19 07:37:59 imap(websales at exsportee.biz): Debug: Namespace inbox:
type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes,
subscriptions=yes location=maildir:~/mail/:
Sep 19 07:37:59 imap(websales at exsportee.biz): Debug: maildir++:
root=/var/mail/virtual/exsportee.biz/websales/mail, index=, control=,
inbox=/var/mail/virtual/exsportee.biz/websales/mail, alt=

So I can see that the directories that Dovecot is looking at are:
home=/var/mail/virtual/exsportee.biz/websales
location=maildir:~/mail/

So if I understand, dovecot is looking at [
/var/mail/virtual/exsportee.biz/websales/mail/ ] for my mail. When I run
a listing of the directory I get the following....

# ls -al /var/mail/virtual/exsportee.biz/websales/mail/
total 44
drwx--S--- 5 vmail vmail 4096 Sep 18 12:46 .
drwxr-sr-x 3 vmail vmail 4096 Sep 18 12:00 ..
drwx--S--- 2 vmail vmail 4096 Sep 18 12:17 cur
-rw------- 1 vmail vmail 248 Sep 18 12:23 dovecot.index.log
-rw------- 1 vmail vmail 51 Sep 18 12:23 dovecot-uidlist
-rw------- 1 vmail vmail 8 Sep 18 12:17 dovecot-uidvalidity
-r--r--r-- 1 vmail vmail 0 Sep 18 12:17 dovecot-uidvalidity.541acd49
drwx--S--- 2 vmail vmail 4096 Sep 18 12:17 new
-rw------- 1 vmail vmail 561 Sep 18 12:22 q1XUaj8-5382575
-rw------- 1 vmail vmail 517 Sep 18 12:00 q1XUaOD-5382570
-rw------- 1 vmail vmail 513 Sep 18 12:46 q1XUb60-5382584
drwx--S--- 2 vmail vmail 4096 Sep 18 12:17 tmp

the 3 files q1xu[....] are test mails that I sent to myself, either
internally from the localhost CLI, mutt or from my google mail account.
I should note the following:
~ SWAKS can send mails out to external addresses also.
~ I cannot connect to my mail from any external clients (thunderbird)
~ I cannot connect to my mail localy using MUTT
~ I use exim4 (v4.7.2) as my MTA (if you want to see a config just ask).

please help me resolve these issues.

thanks in advance.

David
--
Tel:
+ 33 6 50 14 39 34

email:
david.myers.24j74 at gmail.com

Addres:
22 Rue de L'Eglise 77700 Coupvray.
77700
France
Steffen Kaiser
2014-09-19 08:16:18 UTC
Permalink
Post by Dave Myers
a select INBOX
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags
permitted.
* 0 EXISTS
* 0 RECENT
that's correct for your case
Post by Dave Myers
So I seem to have no mails in the inbox... so I check the dovecot log for the
where it thinks it should be looking for the mail
Sep 19 07:37:59 imap-login: Info: Login: user=<websales at exsportee.biz>,
method=PLAIN, rip=85.170.90.200, lip=92.39.247.92, mpid=26570, TLS,
session=<Cf4uLmYDlgBVqlrI>
Sep 19 07:37:59 imap(websales at exsportee.biz): Debug: Effective uid=1002,
gid=1002, home=/var/mail/virtual/exsportee.biz/websales
type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes,
root=/var/mail/virtual/exsportee.biz/websales/mail, index=, control=,
inbox=/var/mail/virtual/exsportee.biz/websales/mail, alt=
home=/var/mail/virtual/exsportee.biz/websales
location=maildir:~/mail/
So if I understand, dovecot is looking at [
/var/mail/virtual/exsportee.biz/websales/mail/ ] for my mail. When I run a
listing of the directory I get the following....
# ls -al /var/mail/virtual/exsportee.biz/websales/mail/
total 44
drwx--S--- 5 vmail vmail 4096 Sep 18 12:46 .
drwxr-sr-x 3 vmail vmail 4096 Sep 18 12:00 ..
drwx--S--- 2 vmail vmail 4096 Sep 18 12:17 cur
-rw------- 1 vmail vmail 248 Sep 18 12:23 dovecot.index.log
-rw------- 1 vmail vmail 51 Sep 18 12:23 dovecot-uidlist
-rw------- 1 vmail vmail 8 Sep 18 12:17 dovecot-uidvalidity
-r--r--r-- 1 vmail vmail 0 Sep 18 12:17 dovecot-uidvalidity.541acd49
drwx--S--- 2 vmail vmail 4096 Sep 18 12:17 new
-rw------- 1 vmail vmail 561 Sep 18 12:22 q1XUaj8-5382575
-rw------- 1 vmail vmail 517 Sep 18 12:00 q1XUaOD-5382570
-rw------- 1 vmail vmail 513 Sep 18 12:46 q1XUb60-5382584
drwx--S--- 2 vmail vmail 4096 Sep 18 12:17 tmp
the 3 files q1xu[....] are test mails that I sent to myself, either
internally from the localhost CLI, mutt or from my google mail account.
~ SWAKS can send mails out to external addresses also.
~ I cannot connect to my mail from any external clients (thunderbird)
~ I cannot connect to my mail localy using MUTT
~ I use exim4 (v4.7.2) as my MTA (if you want to see a config just ask).
The files q1.. belong to ~/mail/new/ . Exim does not spool them as
Maildir. I would recommend to use Dovecot LDA or LMTP.

- --
Steffen Kaiser
Dave Myers
2014-09-19 09:30:41 UTC
Permalink
@Steffen,

Thanks for your input, and please excuse my clearly stupid questions.. ;)
Post by Steffen Kaiser
The files q1.. belong to ~/mail/new/ . Exim does not spool them as
Maildir. I would recommend to use Dovecot LDA or LMTP.
where / how do I get that to work ?

I've added the required stuff to the dovecot and exim configs, but
clearly I need to install
dovecot-lmtpd (error message about not finding the executable)

However I needed to install dovecot from source (as I couldn't get the
server to accept backports ?). Any advice on upgrading / changing the
install ?

Can I simply make a copy of the whole of my config (which otherwise
works), then do the same install from a /deb source file for lmtpd, then
copy my config back to this location?

Or do you advise some other path for the upgrade ?

thanks.

David
--
Tel:
+ 33 6 50 14 39 34

email:
david.myers.24j74 at gmail.com

Addres:
22 Rue de L'Eglise 77700 Coupvray.
77700
France
Steffen Kaiser
2014-09-19 09:42:24 UTC
Permalink
Post by Dave Myers
Thanks for your input, and please excuse my clearly stupid questions.. ;)
The files q1.. belong to ~/mail/new/ . Exim does not spool them as Maildir.
I would recommend to use Dovecot LDA or LMTP.
where / how do I get that to work ?
http://wiki2.dovecot.org/Variables?action=fullsearch&context=180&value=Exim&titlesearch=Titles
See LDA or LMTP
Post by Dave Myers
I've added the required stuff to the dovecot and exim configs, but clearly I
need to install
dovecot-lmtpd (error message about not finding the executable)
Maybe, you should begin with the LDA then.
Post by Dave Myers
However I needed to install dovecot from source (as I couldn't get the server
to accept backports ?). Any advice on upgrading / changing the install ?
Can I simply make a copy of the whole of my config (which otherwise works),
then do the same install from a /deb source file for lmtpd, then copy my
config back to this location?
Or do you advise some other path for the upgrade ?
Usually, you see how Debian compiles the source - the ./configure options
. But I wonder if you want to overwrite the system places. That's you
decision. I would: use the LDA now, in order to get the server to work.
Then use a test system for the LMTP stuff.

- --
Steffen Kaiser
Dave Myers
2014-09-19 09:52:15 UTC
Permalink
Post by Steffen Kaiser
Usually, you see how Debian compiles the source - the ./configure
options . But I wonder if you want to overwrite the system places.
That's you decision. I would: use the LDA now, in order to get the
server to work. Then use a test system for the LMTP stuff.
Ok thanks for the advice....

David
--
Tel:
+ 33 6 50 14 39 34

email:
david.myers.24j74 at gmail.com

Addres:
22 Rue de L'Eglise 77700 Coupvray.
77700
France
Dave Myers
2014-09-19 13:17:07 UTC
Permalink
Hi dovecot users,

I've decided to re-install my dovecot-imapd server with lmtp functionality

I've been looking at my dovecot source, it certainly contains an lmtp
sub folder.

I've looked at the details for the config of lda, and I wonder why
(particularly as I installed from source) dovecot does not install with
lmtp by default ? this is particularly in respect to the details on the
wiki2 page: http://wiki2.dovecot.org/LDA

Nowadays you should probably use the LMTP server
<http://wiki2.dovecot.org/LMTP> instead, because it's somewhat
easier to configure (especially related to permissions) and gives
better performance.


I've looked through to see how to build dovecot with ldmp support, and I
don't find anything in the install doc page
http://wiki2.dovecot.org/CompilingSource that explains what switch I
need to use to add compatibility for lmtp.

I will admit I've not looked very far outside of the official dovecot
site, but then most of the google hits return me straight to the above
mentioned pages.

I should also note that when I downloaded the 'newest version' of
dovecot using :
wget http://www.dovecot.org/releases/2.2/dovecot-2.2.13.tar.gz

Everything goes fine, after doing the stuff a dovecot -n returns

# 2.2.13: /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-xen-amd64 x86_64 Debian 6.0.3

Which is pleasing, as previously it return 2.1.7
I haven't changed any of my config files, looking at the upgradeing page
on the wiki it would seem I haven't set any configs that require it.

I now restart the process.

$ sudo /etc/init.d/dovecot restart
Restarting IMAP/POP3 mail server: dovecotFatal: service(lmtp)
access(/usr/lib/dovecot/lmtp) failed: No such file or directory
failed!

I can confirm that the file it is looking for doesn't exist, but how do
I configure the install of dovecot to include it?

thanks in advance for your advice

David
___________
I include below a part of the original converstion that has led me to
decide to add lmtp support to my install.
Post by Steffen Kaiser
Post by Dave Myers
Post by Steffen Kaiser
The files q1.. belong to ~/mail/new/ . Exim does not spool them as
Maildir. I would recommend to use Dovecot LDA or LMTP.
http://wiki2.dovecot.org/Variables?action=fullsearch&context=180&value=Exim&titlesearch=Titles
See LDA or LMTP
Post by Dave Myers
I've added the required stuff to the dovecot and exim configs, but
clearly I need to install
dovecot-lmtpd (error message about not finding the executable)
Maybe, you should begin with the LDA then.
Post by Dave Myers
However I needed to install dovecot from source (as I couldn't get
the server to accept backports ?). Any advice on upgrading / changing
the install ?
Can I simply make a copy of the whole of my config (which otherwise
works), then do the same install from a /deb source file for lmtpd,
then copy my config back to this location?
Or do you advise some other path for the upgrade ?
Usually, you see how Debian compiles the source - the ./configure
options . But I wonder if you want to overwrite the system places.
That's you decision. I would: use the LDA now, in order to get the
server to work. Then use a test system for the LMTP stuff.
I've been looking at my dovecot source, it certainly contains an lmtp
sub folder.

I've looked at the details for the config of lda, and I wonder why
(particularly as I installed from source) dovecot does not install with
lmtp by default ? this is particularly in respect to the details on the
wiki2 page: http://wiki2.dovecot.org/LDA

Nowadays you should probably use the LMTP server
<http://wiki2.dovecot.org/LMTP> instead, because it's somewhat
easier to configure (especially related to permissions) and gives
better performance.


I've looked through to see how to build dovecot with ldmp support, and I
don't find anything in the install doc page
--
Tel:
+ 33 6 50 14 39 34

email:
david.myers.24j74 at gmail.com

Addres:
22 Rue de L'Eglise 77700 Coupvray.
77700
France
Steffen Kaiser
2014-09-19 13:34:14 UTC
Permalink
Post by Dave Myers
# 2.2.13: /usr/local/etc/dovecot/dovecot.conf
^^^^^^^^
Post by Dave Myers
# OS: Linux 2.6.32-5-xen-amd64 x86_64 Debian 6.0.3
Which is pleasing, as previously it return 2.1.7
I haven't changed any of my config files, looking at the upgradeing page on
the wiki it would seem I haven't set any configs that require it.
I now restart the process.
$ sudo /etc/init.d/dovecot restart
Restarting IMAP/POP3 mail server: dovecotFatal: service(lmtp)
access(/usr/lib/dovecot/lmtp) failed: No such file or directory
^^^^^^^
Post by Dave Myers
failed!
I can confirm that the file it is looking for doesn't exist, but how do I
configure the install of dovecot to include it?
I'd say that the application is wrong:

did you've updated the /etc/init.d script? Maybe it points to Debian's
build still. Maybe you have some setting in your config you copied from
Debian's build?

Otherwise: does your config.log indicates that you have set a prefix or
"dir"?

I use ./configure --prefix=/usr/local/....

and everything is down there.

- --
Steffen Kaiser
Dave Myers
2014-09-19 13:58:28 UTC
Permalink
Thanks for the quick reply,

Finaly I retried with
./configure --with-lmtp=yes

and suddenly I have lmtp in the /usr/local/libexec/dovecot/ directory.
Post by Steffen Kaiser
did you've updated the /etc/init.d script? Maybe it points to Debian's
build still. Maybe you have some setting in your config you copied
from Debian's build?
I have built from source, I did apt-get purge dovecot (or whatever it
is) before this, just to be sure I then removed any other dovecot
directories that I found.

And then of course there is a distinct lack of an init.d script for lmtp
? I'm not sure where I need to set the details for the location of the
lmtp file.
I guess I should be setting it in the
service lmtp{....}
section.
alternatively what should the contents of the lmtp init.d script be?
Post by Steffen Kaiser
Otherwise: does your config.log indicates that you have set a prefix
or "dir"?
I use ./configure --prefix=/usr/local/....
and everything is down there.
- -- Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBVBww1nz1H7kL/d9rAQIiCQf/UO+QUHnXY8lGpHawP16CcrzztytCIcLW
Ul47bRwA2rnkmdnrCicaYTy7Ia3khqBDEu2861yNLe0JjaH3UWyRzOcQNzHuO8+Q
FAmZnEMKRyj2gHVUUtBA2ouI3NuC9R3Rbb7Cb+4Cr7CTBzEf88Er9ycUcLykxc8L
8S2Xoe5EPWljORw9SV5z/ZgTmL9YUKZNTJeFJQu3Num7j8pOhnbS1u/yqtI7Is6B
WGct1rT99UBN2DDJPKR5VI2lQVhMslWjEvw+MI+grtLWssKzaGY9vNZUNO07Ln4n
axxWACDHz/G/hAeCoXVYb4uDCKYPL44tVHTeIQuw6l8YrqGKDEHUew==
=jwql
-----END PGP SIGNATURE-----
--
Tel:
+ 33 6 50 14 39 34

email:
david.myers.24j74 at gmail.com

Addres:
22 Rue de L'Eglise 77700 Coupvray.
77700
France
Alex JOST
2014-09-19 15:32:21 UTC
Permalink
Post by Dave Myers
Everything goes fine, after doing the stuff a dovecot -n returns
# 2.2.13: /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-xen-amd64 x86_64 Debian 6.0.3
Which is pleasing, as previously it return 2.1.7
Dovecot 2.1.7 comes via the squeeze-backports repository. My guess is
that you added configuration for LMTP but didn't install the
dovecot-lmtpd package.
--
Alex JOST
Benny Pedersen
2014-09-19 09:49:44 UTC
Permalink
Post by Dave Myers
where / how do I get that to work ?
http://wiki2.dovecot.org/LDA/Exim
Loading...