-
-
Notifications
You must be signed in to change notification settings - Fork 113
Adding fixes to Message-Id header so that domain override is possible. #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vitalykr
wants to merge
4
commits into
jenkinsci:master
Choose a base branch
from
vitalykr:Message_id_fix
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| package hudson.tasks; | ||
|
|
||
| import javax.mail.MessagingException; | ||
| import javax.mail.Session; | ||
| import javax.mail.internet.MimeMessage; | ||
| import java.io.InputStream; | ||
|
|
||
| public class EnhancedMessage extends MimeMessage | ||
vitalykr marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| { | ||
| private String newMessageIdDomain; | ||
|
|
||
| public EnhancedMessage(Session session) { | ||
| super(session); | ||
| } | ||
|
|
||
| public EnhancedMessage(Session session, InputStream is) throws MessagingException { | ||
| super(session, is); | ||
| } | ||
|
|
||
| public EnhancedMessage(MimeMessage source) throws MessagingException { | ||
| super(source); | ||
| } | ||
|
|
||
| public void setNewMessageIdDomain(String newDomain) | ||
| { | ||
vitalykr marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| this.newMessageIdDomain = newDomain; | ||
| } | ||
|
|
||
| protected void updateMessageID() throws MessagingException { | ||
vitalykr marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| super.updateMessageID(); | ||
| if (this.newMessageIdDomain != null && this.newMessageIdDomain.length() > 0 && this.newMessageIdDomain.startsWith("@")) { | ||
| String messageId = super.getMessageID(); | ||
| int index = messageId.lastIndexOf('@'); | ||
| if (index >= 0) { | ||
| String firstPart = messageId.substring(0, index); | ||
| String newMessageId = firstPart + this.newMessageIdDomain + '>'; | ||
| setHeader("Message-ID", newMessageId); | ||
| } | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/main/resources/hudson/tasks/Mailer/help-messageIdDomain.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <div> | ||
| Message-ID header new domain name. Some e-mail servers put e-mail to junk if Message-ID header domain name does not correspond to server's domain. Specify @mydomain.com to override Message-ID domain name or empty text to leave it default. | ||
| </div> |
3 changes: 3 additions & 0 deletions
3
src/main/resources/hudson/tasks/Mailer/help-messageIdDomain_de.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <div> | ||
| Message-ID header Neuer Domänenname. Einige E-Mail-Server versetzen E-Mails in Junk-Mails, wenn der Domänenname des Message-ID header nicht der Domäne des Servers entspricht. Geben Sie @mydomain.com an, um den Domänennamen der Message-ID oder den leeren Text zu überschreiben und die Standardeinstellung beizubehalten. | ||
| </div> |
3 changes: 3 additions & 0 deletions
3
src/main/resources/hudson/tasks/Mailer/help-messageIdDomain_fr.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <div> | ||
| Nouveau nom de domaine en-tête de l'ID de message. Certains serveurs de messagerie rejettent le courrier indésirable si le nom de domaine de l'en-tête Message-ID ne correspond pas au domaine du serveur. Spécifiez @mondomaine.com pour remplacer le nom de domaine Message-ID ou le texte vide pour le laisser par défaut. | ||
| </div> |
3 changes: 3 additions & 0 deletions
3
src/main/resources/hudson/tasks/Mailer/help-messageIdDomain_ja.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <div> | ||
| メッセージIDヘッダーの新しいドメイン名。 一部の電子メールサーバーは、メッセージIDヘッダーのドメイン名がサーバーのドメインに対応していない場合、迷惑メールを送信します。 @mydomain.com を指定して、Message-IDドメイン名または空のテキストをオーバーライドしてデフォルトのままにします。 | ||
| </div> |
3 changes: 3 additions & 0 deletions
3
src/main/resources/hudson/tasks/Mailer/help-messageIdDomain_nl.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <div> | ||
| Meddelelses-ID-overskrift nyt domænenavn. Nogle e-mail-servere sætter e-mail til skrammel, hvis meddelelses-ID-domænenavn ikke svarer til serverens domæne. Specificer @mydomain.com for at tilsidesætte Message-ID-domænenavn eller tom tekst for at lade det være standard. | ||
| </div> |
3 changes: 3 additions & 0 deletions
3
src/main/resources/hudson/tasks/Mailer/help-messageIdDomain_pt_BR.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <div> | ||
| Novo nome de domínio do cabeçalho de ID da mensagem. Alguns servidores de email colocam o lixo eletrônico como lixo eletrônico se o nome do domínio do cabeçalho do ID da mensagem não corresponder ao domínio do servidor. Especifique @mydomain.com para substituir o nome de domínio do ID da mensagem ou o texto vazio para deixá-lo como padrão. | ||
| </div> |
3 changes: 3 additions & 0 deletions
3
src/main/resources/hudson/tasks/Mailer/help-messageIdDomain_ru.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <div> | ||
| Новое доменное имя для заголовка Message-ID. Некоторые почтовые серверы помещают электронную почту в нежелательную, если имя домена для заголовка Message-ID не соответствует домену сервера. Укажите @mydomain.com, чтобы переопределить доменное имя для заголовка Message-ID или пустой текст, чтобы оставить его по умолчанию. | ||
| </div> |
3 changes: 3 additions & 0 deletions
3
src/main/resources/hudson/tasks/Mailer/help-messageIdDomain_tr.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <div> | ||
| İleti kimliği başlığı yeni etki alanı adı. Bazı e-posta sunucuları, Message-ID başlık etki alanı adı sunucunun etki alanına uymuyorsa e-postaları önemsiz duruma getirir. Message-ID etki alanı adını geçersiz kılmak için @mydomain.com adresini veya varsayılanı bırakmak için boş metni belirtin. | ||
| </div> |
3 changes: 3 additions & 0 deletions
3
src/main/resources/hudson/tasks/Mailer/help-messageIdDomain_zh_TW.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <div> | ||
| Message-ID标头的新域名。 如果Message-ID标头域名与服务器的域不对应,则某些电子邮件服务器会将电子邮件放入垃圾邮件。 指定@ mydomain.com以覆盖Message-ID域名或空文本以将其保留为默认值。 | ||
| </div> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.