Re: immediate delete of mails

2018-10-09 Thread Tamas Selmeci
On Wed, 10 Oct 2018 09:37:03 +0300
Aki Tuomi  wrote:

> doveadm user 
> 
> check the UID/GID value (or look mail_uid / mail_gid from config)

That's it! I've set /var/spool/mail/user_mbox_file to root accidentally, and 
haven't thought that Dovecot will try to open it as the logged in user 
(therefore having no right to change it). After modifying the mbox file's 
permission the mails can now be deleted.

Many thanks!

Regards,
-- 
Selmeci Tamás



Re: immediate delete of mails

2018-10-09 Thread Tamas Selmeci
On Tue, 9 Oct 2018 15:44:14 +0200 (CEST)
Steffen Kaiser  wrote:

> try out pure IMAP via telnet:
> 
> telnet server 143
> 1 login user pwd
> 2 select inbox
> 4 CREATE Trash
> 5 COPY 1 Trash
> 3 STORE 1 +FLAGS \Deleted
> 4 EXPUNGE

Here's the output:

* OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ 
AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
1 login
1 BAD Error in IMAP command received by server.
1 login user pass
1 OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT 
SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND 
URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED 
I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH 
LIST-STATUS BINARY MOVE SNIPPET=FUZZY LITERAL+ NOTIFY SPECIAL-USE] Logged in
2 select inbox
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft $MDNSent $Forwarded $label1 
$Labelimportant receipt-handled NonJunk $label5 $label2 $label3 $label4 
$has_cal)
* OK [PERMANENTFLAGS ()] Read-only mailbox.
* 1995 EXISTS
* 0 RECENT
* OK [UNSEEN 1971] First unseen.
* OK [UIDVALIDITY 1250421210] UIDs valid
* OK [UIDNEXT 25219] Predicted next UID
2 OK [READ-ONLY] Select completed (0.016 + 0.000 + 0.017 secs).
4 create Trash
4 NO [ALREADYEXISTS] Mailbox already exists (0.006 + 0.000 + 0.006 secs).
5 Copy 1 Trash
5 OK [COPYUID 1 4067 17246] Copy completed (0.020 + 0.000 + 0.019 secs).
3 STORE 1 +FLAGS \Deleted
* 1 FETCH (FLAGS (\Deleted \Seen))
3 OK Store completed (0.003 + 0.000 + 0.002 secs).
4 expunge
4 OK Expunge completed (0.001 + 0.000 secs).
--
The answer to "2 select inbox" contains "Read-only mailbox", it's suspicious to 
me...
-- 
Selmeci Tamás
http://www.486.hu/



Re: immediate delete of mails

2018-10-09 Thread Tamas Selmeci
When I press DEL on a mail, the file /home/tselmeci/mail/Trash increases and 
the deleted mail is appended to it. But it doesn't disappear from 
/var/spool/mail/tselmeci. Once I expunge, /home/tselmeci/mail/Trash becomes 
empty but the original mail is still present in /var/spool/mail/tselmeci.

Maybe the SMTP server holds a write lock on the spool file thus preventing 
Dovecot from erasing the mail?
-- 
Selmeci Tamás
http://www.486.hu/



Re: immediate delete of mails

2018-10-09 Thread Tamas Selmeci
On Tue, 9 Oct 2018 11:43:30 +0300
Aki Tuomi  wrote:
> Can you enable mail_log plugin as well?

Sure.

I've sent myself a mail from another account, opened it, deleted and then tried 
to expunge. Here's the log output:

Oct 09 10:53:42 imap(tselmeci)<18236>: Debug: INBOX: Mailbox 
opened because: SELECT
Oct 09 10:53:42 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25196 because: virtual size (Mail not cached, highest cached 
seq=2034 uid=25195: reset_id=1539075017)
Oct 09 10:53:42 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25196 because: header stream
Oct 09 10:53:42 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25196 because: full mail
Oct 09 10:53:42 imap(tselmeci)<18236>: Debug: INBOX: Mailbox 
opened because: SELECT
Oct 09 10:53:42 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25196 because: header stream
Oct 09 10:53:55 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25196 because: full mail
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Trash: Mailbox 
opened because: UID COPY
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25117 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25130 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25131 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25132 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25133 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25135 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25136 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25137 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25138 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25139 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25140 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25141 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25142 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25143 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25144 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25145 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25146 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25148 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25149 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25150 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25151 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25152 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25153 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25154 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25155 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25156 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25157 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25158 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25159 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25161 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25163 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25164 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25165 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25167 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25168 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25169 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25170 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25171 because: copying
Oct 09 10:54:00 imap(tselmeci)<18236>: Debug: Mailbox INBOX: 
Opened mail UID=25172