[Dovecot] restored mails
Hello, I am running dovecot 2.1 on debian wheezy . We are using maildir format. one of our uses deleted content of INBOX folder during xmass. he wants these messages back. I had these mail on tape. I have restored them to his inbox/cur directory but dovecot is not indexing them. Email client shows empty inbox as well. tried manually run:
doveadm index -u john -q INBOX no change. deleting indexes didn't help.
How to restore these email? thanks Woj
my config: # 2.1.7: /etc/dovecot/dovecot.conf # OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.3 auth_debug = yes auth_mechanisms = plain login cram-md5 auth_verbose = yes listen = * log_path = /var/log/dovecot.log log_timestamp = "%Y-%m-%d %H:%M:%S " login_greeting = IMAP Server is ready. mail_debug = yes mail_location = maildir:~/Maildir:INDEX=~/dovecot-control/indexes:CONTROL=~/dovecot-control:LAYOUT=fs mail_plugins = " quota trash" managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave passdb { driver = pam } passdb { args = scheme=cram-md5 /etc/dovecot/passwd driver = passwd-file } plugin { antispam_backend = pipe antispam_debug_target = syslog antispam_mail_sendmail = /usr/bin/sa-learn-pipe.sh antispam_pipe_program_notspam_arg = --ham antispam_pipe_program_spam_arg = --spam antispam_pipe_tmpdir = /tmp antispam_spam = Junk;Spam antispam_trash_pattern = Trash;Deleted * antispam_verbose_debug = 0 autocreate = INBOX autocreate2 = Sent autocreate3 = Trash autocreate4 = Drafts autocreate5 = Junk autosubscribe = INBOX autosubscribe2 = Sent autosubscribe3 = Trash autosubscribe4 = Drafts autosubscribe5 = Junk quota = maildir:User quota quota_warning = storage=95%% quota-warning 95 %u quota_warning2 = storage=80%% quota-warning 80 %u quota_warning3 = -storage=100%% quota-warning below %u sieve = ~/.dovecot.sieve sieve_default = /var/spool/dovecot/default.sieve sieve_dir = ~/sieve sieve_global_dir = /var/spool/dovecot/ trash = /etc/dovecot/dovecot-trash.conf.ext } protocols = imap sieve service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0666 user = postfix } unix_listener auth-master { mode = 0666 } } service managesieve-login { inet_listener sieve { port = 2000 } } service quota-warning { executable = script /usr/bin/dovecot-quota-warning.sh user = postfix } ssl_ca = </etc/postfix/ssl/cacert.pem ssl_cert = </etc/postfix/ssl/servercrt.pem ssl_cipher_list = ALL:!LOW:!SSLv2:!EXP-ADH-DES-CBC-SHA:!EXP-EDH-RSA-DES-CBC-SHA:!EXP-DES-CBC-SHA:!EXP-RC2-CBC-MD5:!EXP-RC4-MD5:!EXP-ADH-RC4-MD5:!ADH-DES-CBC3-SHA:!ADH-RC4-MD5:!ADH-DES-CBC3-SHA:!ADH-AES128-SHA:!ADH-AES256-SHA:!ADH-RC4-MD5:!RC4 ssl_key = </etc/postfix/ssl/serverkey.pem userdb { args = /etc/dovecot/passwd driver = passwd-file } userdb { driver = passwd } protocol lda { deliver_log_format = msgid=%m: %$ info_log_path = /var/log/dovecot-deliver.log log_path = /var/log/dovecot-deliver.log mail_plugins = " quota trash autocreate sieve" postmaster_address = postmaster quota_full_tempfail = yes rejection_reason = Your message to <%t> was automatically rejected:%n%r } protocol imap { imap_client_workarounds = tb-extra-mailbox-sep delay-newmail tb-lsub-flags mail_max_userip_connections = 10 mail_plugins = " quota trash imap_quota autocreate antispam" }
1379333576.M520387P21423.pine,S=5016,W=5183:2,S 1389710739.M139355P6177.pine,S=38933,W=39648:2,Sd 1379340386.M670300P24951.pine,S=2282,W=2328:2,S 1389710937.M15977P6316.pine,S=20426,W=20831:2,Sd 1379342173.M207466P25909.pine,S=2649,W=2700:2,S 1389715067.M350398P8795.pine,S=18288,W=18549:2,Sd 1379343332.M808399P26628.pine,S=3862,W=3952:2,S 1389715305.M250290P8929.pine,S=4264,W=4346:2,Sd 1379343742.M248785P27359.pine,S=4772,W=4891:2,RS 1389723554.M26883P13831.pine,S=47655,W=47979:2,d 1379343783.M47728P27388.pine,S=22571,W=23053:2,S root@pine:/home/john/Maildir/INBOX/cur#
On Tue, 14 Jan 2014 19:00:27 +0000 Wojciech Giel <wojciech.giel@cimr.cam.ac.uk> wrote:
I am running dovecot 2.1 on debian wheezy . We are using maildir format. one of our uses deleted content of INBOX folder during xmass. he wants these messages back. I had these mail on tape. I have restored them to his inbox/cur directory but dovecot is not indexing them. Email client shows empty inbox as well.
Have you verified the the ownership/permissions of the restored files? Also check for any warnings/errors in your maillog when you access that mailbox.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Wojciech Giel wrote:
Hello, I am running dovecot 2.1 on debian wheezy . We are using maildir format. one of our uses deleted content of INBOX folder during xmass. he wants these messages back. I had these mail on tape. I have restored them to his inbox/cur directory but dovecot is not indexing them. Email client shows empty inbox as well. tried manually run:
doveadm index -u john -q INBOX no change. deleting indexes didn't help.
How to restore these email?
see Oli's advice. Does the user get new mail? Maybe you need to touch the "cur" directory to indicate to Dovecot that an external program changed its content. You could try to create yet another mailbox and move the files there, better: prepare everything outside the Maildir dir, then move the top-directory of the new mailbox in place.
Steffen -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with undefined - http://www.enigmail.net/
iQEVAwUBUtabY3D1/YhP6VMHAQIc+ggApxc4WV+WP+VdV5eQXCBXMaM3zqNJZWV5 y0xBqbGqQp2kvcGqdq1l/KlyVp06s4zQE45lPz3pt7suU9HIImOBps9aSC7jafIN tJXyn9ym2a0RhyAkOZUzN6SN0hajgpe3/EiUfoxf4VjRAL4lmW42CTHzBR1KyYHn PxD25MLv7Vft7s4akwNQz9G8yAlqPnYvlabMHdxsS6s7rS879wWoJo0xRWifq3SI mRqXYIj6nypCSVse/XhB70E/ooIQlBNzgUe6Yt10UbLPKMFd5MO4f73Tbiw1HSV6 IvXDraF3vHQlfISfD6IuGbX9desYSok97NT3U0RE0ReUZ6KXl9L7QQ== =xQDQ -----END PGP SIGNATURE-----
thanks for advice. found a problem collegue synchonized old version of dovecot.conf so:
maildir:~/Maildir:INDEX=~/dovecot-control/indexes:CONTROL=~/dovecot-control:LAYOUT=fs vs maildir:~/Maildir:INBOX=~/Maildir/INBOX:INDEX=~/dovecot-control/indexes:CONTROL=~/dovecot-control:LAYOUT=fs
Dovecot was looking in ~Maildir/cur instead of ~/Maildir/INBOX/cur. strange that other users didn't complain. anyway it is working so back in business. thanks for help Wojciech On 15/01/14 14:29, Steffen wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello, I am running dovecot 2.1 on debian wheezy . We are using maildir format. one of our uses deleted content of INBOX folder during xmass. he wants these messages back. I had these mail on tape. I have restored them to his inbox/cur directory but dovecot is not indexing them. Email client shows empty inbox as well. tried manually run:
doveadm index -u john -q INBOX no change. deleting indexes didn't help.
How to restore these email? see Oli's advice. Does the user get new mail? Maybe you need to touch the "cur" directory to indicate to Dovecot
Wojciech Giel wrote: that an external program changed its content. You could try to create yet another mailbox and move the files there, better: prepare everything outside the Maildir dir, then move the top-directory of the new mailbox in place.
Steffen -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with undefined - http://www.enigmail.net/
iQEVAwUBUtabY3D1/YhP6VMHAQIc+ggApxc4WV+WP+VdV5eQXCBXMaM3zqNJZWV5 y0xBqbGqQp2kvcGqdq1l/KlyVp06s4zQE45lPz3pt7suU9HIImOBps9aSC7jafIN tJXyn9ym2a0RhyAkOZUzN6SN0hajgpe3/EiUfoxf4VjRAL4lmW42CTHzBR1KyYHn PxD25MLv7Vft7s4akwNQz9G8yAlqPnYvlabMHdxsS6s7rS879wWoJo0xRWifq3SI mRqXYIj6nypCSVse/XhB70E/ooIQlBNzgUe6Yt10UbLPKMFd5MO4f73Tbiw1HSV6 IvXDraF3vHQlfISfD6IuGbX9desYSok97NT3U0RE0ReUZ6KXl9L7QQ== =xQDQ -----END PGP SIGNATURE-----
-- wojciech.giel@cimr.cam.ac.uk JDRF/WT Diabetes and Inflammation Laboratory (DIL) Cambridge Institute for Medical Research (CIMR) University of Cambridge Wellcome Trust/MRC Building Addenbrooke's Hospital Hills Road Cambridge CB2 0XY Tel: 01223 763228
participants (3)
-
Oli Schacher
-
Steffen
-
Wojciech Giel