spamassassin | Submit patches
kandi X-RAY | spamassassin Summary
kandi X-RAY | spamassassin Summary
Apache SpamAssassin is the #1 Open Source anti-spam platform giving system administrators a filter to classify email and block "spam" (unsolicited bulk email). It uses a robust scoring framework and plug-ins to integrate a wide range of advanced heuristic and statistical analysis tests on email headers and body text including text analysis, Bayesian filtering, DNS blocklists, and collaborative filtering databases. Apache SpamAssassin is a project of the Apache Software Foundation (ASF).
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of spamassassin
spamassassin Key Features
spamassassin Examples and Code Snippets
Community Discussions
Trending Discussions on spamassassin
QUESTION
My environment: hMailServer 5.6.8 on Windows Server 2022 Standard
Let's say I have two domains (I don't really own these domains, they're just examples), www.myblog.com
and www.mailserver.com
. They are both hosted on the same machine and have the same IP address 1.2.3.4
.
The blog site www.myblog.com
uses www.mailserver.com
to send emails. The site www.mailserver.com
only serves as a mail server; it is not accessible from a browser. I have set it up so that when www.myblog.com
sends an email to someone, the recipient's email server receives SENT: EHLO www.mailserver.com
, but sees SENT: MAIL FROM:
message, so the recipient sees that the email came from myblog.com
.
Everything is working fine so far. Recently I decided to check the "spam rating" of my setup at https://www.mail-tester.com. I sent an email to the spam tester using the setup described above, and I saw a warning under the SpamAssassin section that says
SPF_HELO_NONE SPF: HELO does not publish an SPF Record
My question is, how do I get rid of this warning? Are the DNS records as they should be? See below for the DNS records for each domain.
The DNS records for each domain are as follows (note the PTR record for 1.2.3.4):
...ANSWER
Answered 2022-Apr-10 at 22:48I was able to get rid of the warning by adding an extra TXT record with the name "www" to the www.mailserver.com
DNS:
QUESTION
I have the following error message in the dovecot errors & warnings log after I've tried to rebuild my mail server.
Prior to these errors, I updated my aging system to the latest, and lots of things broke. The configuration was confetti, so I attempted to rebuild the mail server. To get this error, I simply login to Roundcube mail. I'm able to login, however I cant see any emails.
I'm seeing two issues in the error, just not sure how to fix it.
...ANSWER
Answered 2022-Feb-06 at 19:50You state "This is not the correct directory, it should be /var/vmail/nostalgicmail.com/brad". Your (helpfully supplied) config contains,
QUESTION
When I try to start the httpd service it is failing with the error :
...ANSWER
Answered 2021-Dec-08 at 19:31try check your config, validate from command apachectl configtest
QUESTION
I have a log file that looks like this:
...ANSWER
Answered 2021-Apr-17 at 21:31I could look for the position of the first colon in each line, then extract the 2 characters after that position. However, I fear that there could be other colons beforehand
Instead of looking for the first colon, you can
look for the ' - - '
QUESTION
I'm managing a bulk email service for the company I work at and a recent change to SpamAssassin has started flagging emails sent by our bulk-email solution with 'RAND_MKTG_HEADER'. I can't find much about this on the internet other than 'Has partially-randomized marketing/tracking header(s)'. The thing is, the software doesn't randomize any of the marketing headers for the campaigns sent with it, so I'm a bit confused as to the hows and whys and what I can do to fix this issue.
Naturally campaigns IDs are randomized UIDs, that's the nature of indentifying things uniquely. If anyone has any insight as to what this particular flag entails and what I can do to fix the issue it would be GREATLY appreciated as it's starting to impact our legitimate customers with delivery issues.
Thanks in advance!
...ANSWER
Answered 2021-Mar-27 at 19:43It's likely caused by a custom X-
header prefix, i.e. you have an X-something-
prefix in your mailer software. If you happen to use Mailwizz, here is the solution: https://kb.mailwizz.com/articles/low-score-in-spamassassin-because-of-the-rand_mktg_header-rule/
You can essentially fix the problem by changing the custom header prefix to a traditional X-
prefix.
QUESTION
I am working on a Machine Learning Project which filters spam/phishing emails out of all emails. For this, I am using the SpamAssassin dataset. The dataset contains different mails in this format:
For identifying phishing emails, first thing I have to do is finding out how many web-links the email has. For doing that, I have written the following code:
...ANSWER
Answered 2021-Mar-05 at 14:06You have to open and read the file using the same encoding that was used to write the file. In this case, that might be a bit difficult, since you are dealing with e-mails and they can be in any encoding, dependent on the sender. In the example file you showed, the message is encoded using 'iso-8859-1' encoding.
However, e-mails are a bit strange, since they consist of a header (which is in ASCII format as far as I know), followed by an empty line and the body. The body is encoded in the encoding that was specified in the header. So two different encodings could be used in the same file!
If you're sure that all the e-mails use iso-8859-1 encoding and you're looking for a quick-and-dirty solution, then you could also just open the file using 'iso-8859-1' encoding, since e-mail headers are compatible with iso-8859-1. However, be prepared that you will have to deal with other e-mail formatting/encoding/escaping issues as well, or your script might not work completely as expected.
I think the best solution would be to look for a Python module that can handle e-mails, so it will deal with all the decoding stuff and you don't have to worry about that. It will also solve other problems such as escape characters and line breaks.
I don't have experience with this myself, but it seems that Python has built-in support for parsing e-mails using the e-mail package. I recommend to take a look at that.
QUESTION
I am working on a Machine Learning Project which filters spam/phishing emails out of all emails. For this, I am using the SpamAssassin dataset. The dataset contains different mails in this format:
Now my first task in identifying a phishing/spam email is to find out the no.of web links present in the email. For that, I have written the following code:
...ANSWER
Answered 2021-Mar-04 at 05:01It is because you are not reading the file from that directory.
os.listdir
will only give you a list of file names not an absolute path
You will have to do something like this to point to the base directory
QUESTION
for a while now I am trying to install Spamassassin properly as root user with 'apt install spamassassin spamc'. The installation fails when it runs sa-compile producing following output:
...ANSWER
Answered 2021-Jan-15 at 09:01This seems like apt's problem (not SpamAssasin's). Please follow the general steps for solving this type of problems and let us know if they helped.
QUESTION
I want to match this pattern in my spamassassin's filtering rules:
...ANSWER
Answered 2020-Dec-31 at 08:42ok found it in official spamassassin's documentation
Rawbody rules Rawbody rules allow you to search the body of the email without certain kinds of preprocessing that SA normally does before trying body rules. In particular HTML tags won't be stripped and line breaks will still be present. This allows you to create rules searching for HTML tags or HTML comments that are signs of spam or nonspam, or particular patterns of line-break.
so the correct rule becomes
QUESTION
I'm writing a plugin in thunderbird using native messaging (following the ping pong example in python) to call a Delphi program to copy an e-mail locally as an ".eml" file. The problem I am facing seems to be the encoding. In addition, the resulting file contains double quotes ("") at the start and the end of the file as well as escaped double quotes (\"). I just want to have a 1 to 1 copy and not to change its content.
Example of a mail content:
...ANSWER
Answered 2020-Oct-28 at 16:11At first let me say that you did a good job in transferring data between web extension (Thunderbird add-on) and native application using native messaging. It isn't easy to understand it and set it up, but you managed to transfer required data with some tiny glitches you describe in your question.
... the resulting file contains double quotes (
"
) at the start and the end of the file as well as escaped double quotes (\"
)
In the add-on you obtain raw email data as a string - console.log(typeof raw)
gives string
which you then pass to port.postMessage
. Although the documentation says it takes JSON object representing the message to send, but it seems to accept single string value which is valid JSON according to some standards. In Delphi code you receive the message via STDIN
and parse it using TJSONObject.ParseJSONValue
into TJSONValue
. It will in fact create instance of TJSONString
. You can verify that by examining the value of jsonValue.ClassName
. The problem with quotes arises when you use jsonValue.ToString
which returns quoted version of the string that is basically the same what you had before parsing. Use the Value
property to return raw string value.
Using jsonValue.Value
alone will not help you with the encoding issue. The raw message data that you obtain from the e-mail client is in EML format. It conforms to RFC-822 and that means it is ASCII encoded, but it can contain arbitrarily encoded message parts (see your own sample EML). Since you only want to save EML file as is not taking any encoding into account, the best would be to transfer raw bytes of EML, but this isn't out-of-the-box supported by Javascript and native messaging API. Therefore I'd suggest you to send Base64-encoded data string to native application where you decode it into raw bytes that you can write straight to disk.
To encode raw message data as Base64 string in add-on use function btoa:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install spamassassin
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page