[ 
https://issues.apache.org/jira/browse/JAMES-2985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16978246#comment-16978246
 ] 

Benoit Tellier commented on JAMES-2985:
---------------------------------------

Hi JTconsole, 

I think `deleteMessages` means "deleteMessages" and not "delete only messages 
marked as deleted".

IMO we need to get rid of that call to `findDeletedMessages` within 
`deleteMessages` and just delete messages with these uids without askiing the 
question of them being makred as deleted or not.

For your information, this is what InMemoryMessageMapper & 
CassandraMessageMapper do.

We should:

 - Add a test in MessageMapperTest showing that deleteMessages(List<Uid>) 
succeeds to delete message not marked as deleted
 - Fix the JPA implementation accordingly (direcly delete with mailboxId + uid)

Also, messageFlags updates is expensive (as it requires synchronisation) and 
needs notifications to the event system, what your change proposal do not 
handle...

Might you have any questions regarding this, don't hesitate to ask, and many 
thanks for the useful report!

Best regards,

Benoit


> Mails deleted via POP3 DELE command are not actually deleted
> ------------------------------------------------------------
>
>                 Key: JAMES-2985
>                 URL: https://issues.apache.org/jira/browse/JAMES-2985
>             Project: James Server
>          Issue Type: Bug
>          Components: POP3Server
>    Affects Versions: master
>            Reporter: Jörg Thomas (ConSol)
>            Priority: Critical
>             Fix For: 3.5.0
>
>         Attachments: patch.txt
>
>
> As per the title - mails can't be deleted via POP3 DELE.
> Steps to reproduce:
>  - build the project (spring app in this case, but I don't think that matters)
>  ** {{git clone [https://github.com/apache/james-project]}}
>  ** {{cd james-project}}
>  ** {{docker build -t james/project dockerfiles/compilation/java-8}}
>  ** {{docker run -v $HOME/.m2:/root/.m2 -v $PWD:/origin -v 
> $PWD/dockerfiles/run/spring/destination:/spring/destination -t james/project 
> -s HEAD}}
>  ** {{cd dockerfiles/run/spring/destination/}}
>  ** {{unzip james-server-app-3.5.0-SNAPSHOT-app.zip}}
>  ** {{cd james-server-app-3.5.0-SNAPSHOT/bin}}
>  ** {{./run.sh}}
>  - add a user
>  ** {{./james-cli.sh test@localhost test123}}
>  - send a mail to that user
>  ** {{nc -C localhost 25}}
>  ** ...
>  - login via POP3 and fetch the mail
>  ** {{nc -C localhost 110}}
>  ** {{USER test@localhost}}
>  ** {{PASS test123}}
>  ** {{LIST}}
>  *** (should list only one mail, the one you sent before)
>  ** {{RETR 1}}
>  *** (should display said mail's contents)
>  ** {{DELE 1}}
>  *** (should display `+OK Message deleted`)
>  ** {{LIST}}
>  *** (should display `+OK 0 0`)
>  ** {{QUIT}}
>  - login via POP3 again
>  ** {{LIST}}
>  *** (oops, the mail is still there, just like before)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to