Solved

JavaMail and spam

Posted on 2011-03-03
6
1,264 Views
Last Modified: 2012-05-11
Hi,

I have upgraded java mail to version 1.4.4. And i notice that my messages are recognized as spam.
Normal sending is ok, but clone of message dont.
I do something like:

MimeMessage newMsg = new MimeMessage(org_msg);
      newMsg.setRecipients(Message.RecipientType.TO, addr);
      newMsg.setRecipients(Message.RecipientType.CC, new Address[0]);
      newMsg.setRecipients(Message.RecipientType.BCC, new Address[0]);
      newMsg.saveChanges();

0
Comment
Question by:lavitz
  • 4
  • 2
6 Comments
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 35026144
Usually in Spam-Marked Mails you can see a comment of the filter telling you exactly why the mail was treated as spam.
Did you have a look at this? If not I doubt we can guess the reason for this.
0
 

Author Comment

by:lavitz
ID: 35036278
Here is spam log

 pts rule name              description
---- ---------------------- --------------------------------------------------
 3.1 BAD_ENC_HEADER         Message has bad MIME encoding in the header
 0.1 FORGED_RCVD_HELO       Received: contains a forged HELO
 4.0 RCVD_HELO_IP_MISMATCH  Received: HELO and IP do not match, but should
 1.5 RCVD_NUMERIC_HELO      Received: contains an IP address used for HELO
-2.6 BAYES_00               BODY: Bayesian spam probability is 0 to 1%
                            [score: 0.0000]
 0.0 HTML_MESSAGE           BODY: HTML included in message
 0.0 MIME_HTML_ONLY         BODY: Message only has text/html MIME parts
 2.3 HTML_TINY_FONT         RAW: body contains 1 or 0-point font
 1.3 FROM_EXCESS_BASE64     From: base64 encoded unnecessarily
-3.5 AWL                    AWL: From: address is in the auto white-list


0
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 35036316
Well I guess having a look at this, it seems that the mime-encoding set in the header is not set or incorrect and the ip-address sent in the HELO command of the SMTP connection is wrong (if the remote server uses the name provided by the HELO to lookup the IP of the sender and this check fails). This usually happens when your sending server has local names and ip-addresses (it is inside a local network which accesses the internet via NAT or a Proxy).
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 35036325
From the 4th response your server is propably sending it's local IP adress, which the recieving host cannot access.
0
 

Author Comment

by:lavitz
ID: 35175259
Iam not responsible for making mails. Java mail do this. Iam interested why changing java version make mail spam
0
 
LVL 20

Accepted Solution

by:
ChristoferDutz earned 500 total points
ID: 35381546
Well I think the problem is that your Application is sending emails. And naturally your machine is posting it's local IP address in the EHLO SMTP command (Lets say you have the local ip 10.10.10.123) If you now use a Gateway (10.10.10.1 with the ip 1.2.3.4 from the Internet) then the remote Server will recieve an EHLO from the IP 1.2.3.4 but will say that he's 10.10.10.123 in the EHLO. This is the reason for your spam-rating.

I think the best solution (The one I allways use) is to use your fully configured company mailserver, create a dedicated account for your application (or a shared one to support all your applications) and to make the SMTP Server relay the mails to the final destination ... this way you should no longer have these problems.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This video teaches viewers about errors in exception handling.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now