diff options
author | Vitaly Takmazov | 2018-10-04 14:36:10 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-10-04 14:36:10 +0300 |
commit | 396409a01f12a39e3386b53e08ed260d2a1bd92a (patch) | |
tree | 42f3baa6927dcf10d305b11e81b496205a098a23 /juick-server/src/main/java/com/juick/server/api | |
parent | b44d270bcda681e25445a00a4ca1243aa692142e (diff) |
RFC3834: handle Return-Path header
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/api')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/Service.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/Service.java b/juick-server/src/main/java/com/juick/server/api/Service.java index 2cbf2d11..c612d3bf 100644 --- a/juick-server/src/main/java/com/juick/server/api/Service.java +++ b/juick-server/src/main/java/com/juick/server/api/Service.java @@ -59,7 +59,11 @@ public class Service { public void processMail(InputStream data) throws Exception { if (UserUtils.getCurrentUser().getName().equals(serviceUser)) { MimeMessage msg = new MimeMessage(session, data); - logger.info("got msg with return path {}", msg.getHeader("Return-Path")[0]); + String returnPath = msg.getHeader("Return-Path")[0]; + logger.info("got msg with return path {}", returnPath); + if (returnPath.equals("<>")) { + return; + } String from = msg.getFrom() == null || msg.getFrom().length > 1 ? ((InternetAddress) msg.getSender()).getAddress() : ((InternetAddress) msg.getFrom()[0]).getAddress(); |