Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Class Email / X-Priority sorgt für 2 Spampunkte bei SpamAssassin #8298

Closed
css-umsetzung opened this issue Mar 31, 2016 · 9 comments
Closed
Assignees
Labels
Milestone

Comments

@css-umsetzung
Copy link

Durch das setzen von x-Priority springt der SpamAssassin direkt an und gibt der E-Mail direkt 2 Punkte.

Dies ist die Meldung die dann kommt.
2.0 XPRIO Has X-Priority header

Es ist auch egal auf was ich den setze, das er gesetzt ist reicht schon aus.
Leider wird X-Priority in der sendTo() Funktion gesetzt, so das man keine Möglichkeit hat, das vor dem Senden über remove() zu entfernen.

Es wäre toll wenn man selbst entscheiden kann ob X-Priority überhaupt gesetzt wird.

@discordier
Copy link
Contributor

Why is it present anyway? Outlook compatibility?

@css-umsetzung
Copy link
Author

SpamAssassin ist ein Serverseitiger Spamschutz den, ich behaupte mal, 90% der Serverbesitzer installiert haben.

https://de.wikipedia.org/wiki/SpamAssassin

Wenn SpamAssasin den X-Priority Header negativ bewertet, dann tun das auch andere Webdienste, ich kenne viele die Ihr SpamLevel auf 3 haben, wenn X-Priority Header bereits 2 Punkte verbraucht, dann ist man aufgrund einer HTML Mail oder anderen Bedingungen, schnell über diesen drei Punkten.

Ziel einer Mail ist es, einem Filter, so unauffällig wie möglich entgegenzutreten.

@discordier
Copy link
Contributor

Of course I know SpamAssassin (and am a long time user as well) and run it on all my servers.

I was referring to the header, why that one is present at all, I mean the priority was not meant to be used at all like the way it is used nowadays and IMO does not belong in automated emails from a system (at least not by default).

You see, I am totally with you on the issue, I simply wondered for the reason why it IS there.
Aside from that, we definately should remove it, yet it is not a bugfix per se but rather getting rid of obsolete information that might cause problems (as it does in your case).
So I do not know if it qualifies to be fixed in 3.5 or rather 4.1 (or even 5.0, if anyone relies on the header, which I strongly doubt).

@leofeyer
Copy link
Member

leofeyer commented Apr 1, 2016

Sollte sich das bewahrheiten, habe ich kein Problem damit, die X-Priority zu entfernen. Der Header kommt direkt von SwiftMailer:

https://github.com/swiftmailer/swiftmailer/blob/5.x/lib/classes/Swift/Mime/SimpleMessage.php#L467-L471

Ich habe allerdings selbst SpamAssassin im Einsatz und hatte noch nie eine Abwertung aufgrund der X-Priority. Wo genau ist das dokumentiert?

@kikmedia
Copy link

kikmedia commented Apr 1, 2016

There are actually some reports that mail using the X-Priority-Header may be downvoted in some scenarios (for example https://forums.zarafa.com/showthread.php?12181-X-Priority-Header-from-Webapp-triggers-Spamassassin-Rule, and others). I'm not shure if this is a misconfiguration issue.

But IMHO you should drop the X-Priority (or make it optional) since every mail client suggests a default priority of 3, so the header is completely redundant in most scenarios. I can hardly tell that I ever sent a high priority mail via my CMS.

@fritzmg
Copy link
Contributor

fritzmg commented Apr 1, 2016

Wo genau ist das dokumentiert?

This is a current list of tests from SpamAssassin: http://www.futurequest.net/docs/SA/
The test in question is called XPRIO:

XPRIO    meta    Has X-Priority header    1.999

It was removed from PHPMailer for the same reason: PHPMailer/PHPMailer#449 (but still present when the user requests it).

@discordier
Copy link
Contributor

Defined in SA at https://github.com/apache/spamassassin/blob/d65d063097c80e87cb0b4d9b320e0e8d41fd5410/rules/10_hasbase.cf#L63

@leofeyer the problem is Swift_Mime_SimpleMessage::setPriority() is called here. Swiftmailer does not set it on it's own apparently.

@css-umsetzung
Copy link
Author

also der Header kommt so wie ich das sehe ja nur weil du ihn im sendTo() deiner Email Klasse setzt.
$this->objMessage->setPriority($this->intPriority);

wenn er sich selbst setzen sollte könnte er ja auch
über getHeaders()->remove('X-Priority') deaktiviert werden aber du machst das eben an einem Punkt wo es kein zurück mehr gibt.

@leofeyer
Copy link
Member

Entfernt in ee4b7f4.

jsonn pushed a commit to jsonn/pkgsrc that referenced this issue Apr 23, 2016
### 4.1.3 (2016-04-22)

 * Use data URIs for the image preview in the back end.
 * Use DIRECTORY_SEPARATOR to convert kernel.cache_dir into a relative path (see #464).
 * Always trigger the "isVisibleElement" hook (see contao/core#8312).
 * Do not change all sessions when switching users (see contao/core#8158).
 * Do not allow to close fieldsets with empty required fields (see contao/core#8300).
 * Make the path related properties of the File class binary-safe (see contao/core#8295).
 * Correctly validate and decode IDNA e-mail addresses (see contao/core#8306).
 * Skip forward pages entirely in the book navigation module (see contao/core#5074).
 * Do not add the X-Priority header in the Email class (see contao/core#8298).
 * Determine the search index checksum in a more reliable way (see contao/core#7652).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants