SpartaSystems / holdmail

HoldMail is a Java Application for proxying SMTP mail, providing a browsable viewer for captured emails.
Apache License 2.0
32 stars 15 forks source link

holdmail.outgoing.mail.from is ignored #83

Open 375gnu opened 5 years ago

375gnu commented 5 years ago
Question/Issue Overview

Holdmail 2.0.1 ignores holdmail.outgoing.mail.from value.

Expected Behavior

Forwarded mail has sender as set in holdmail.outgoing.mail.from.

Current Behavior

holdmail@localhost.localdomain is used instead:

2018-10-11 12:09:19.148  INFO 44774 --- [nio-8080-exec-6] c.s.holdmail.smtp.OutgoingMailSender     : Outgoing mail will have From: holdmail@localhost.localdomain

And actually mail has it. Due to this issue mail forwarding doesn't work as SMTP servers reject such mail.

Reproducible Sequence
  1. Install Holdmail from JAR file.
  2. Add holdmail.outgoing.mail.from to /etc/holdmail.properties
  3. Run /usr/bin/java -Dsun.misc.URLClassPath.disableJarChecking=true -Dloader.path=/opt/holdmail/lib -jar /opt/holdmail/bin/holdmail.jar --spring.config.location=file:/etc/holdmail.properties
  4. Forward any mail from its web interface.
admiralThrown commented 4 years ago

As a workaround, you can use holdmail.outgoing.mail.parse instead and it will work.