<div dir="ltr">It's most likely coming from a stack trace generated by your application. The JavaMail API is vulnerable to header injection via the Subject header, and you're probably seeing that phenomenon (though by accident).<div>
<br></div><div style>For my own application, I wrote a subclass of SMTPAppender that truncates the Subject header at the first EOL character, which prevents this issue from occurring.</div></div><div class="gmail_extra">
<br>
<br><div class="gmail_quote">On Mon, May 13, 2013 at 8:20 PM, Jason Bennett <span dir="ltr"><<a href="mailto:jasonab@acm.org" target="_blank">jasonab@acm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><br></div><div>I'm using Amazon SES with SSL to send emails via Logback's SMTPAppender. It usually works, but sometimes I receive the following error:<br><br>0:01:51,863 |-ERROR in ch.qos.logback.classic.net.SMTPAppender[EMAIL] - Error occurred while sending e-mail notification. com.sun.mail.smtp.SMTPSendFailedException: 554 Transaction failed: Illegal header 'Caused by'.<br>
<br> at com.sun.mail.smtp.SMTPSendFailedException: 554 Transaction failed: Illegal header 'Caused by'.<br><br> at at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2114)<br>
at at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1900)<br> at at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1122)<br> at at javax.mail.Transport.send0(Transport.java:195)<br>
at at javax.mail.Transport.send(Transport.java:124)<br> at at ch.qos.logback.core.net.SMTPAppenderBase.sendBuffer(SMTPAppenderBase.java:395)<br> at at ch.qos.logback.core.net.SMTPAppenderBase$SenderRunnable.run(SMTPAppenderBase.java:690)<br>
at at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)<br> at at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)<br> at at java.lang.Thread.run(Thread.java:679)<br>
</div><div><br><br></div><div>I'm aware that Amazon only allows emails with legal headers through SES, but I have no idea where Amazon is getting this header from. Has anyone else seen this?<span class="HOEnZb"><font color="#888888"><br>
<br>jason<br></font></span></div><span class="HOEnZb"><font color="#888888"><div>
<br clear="all"><br>-- <br>Jason Bennett, <a href="mailto:jasonab@acm.org" target="_blank">jasonab@acm.org</a><br>E pur si muove!<br>Get Firefox! - <a href="http://getfirefox.com" target="_blank">http://getfirefox.com</a>
</div></font></span></div>
<br>_______________________________________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a><br></blockquote></div><br></div>