иногда не импортируются в ютрак письма с крупными вложениями(> 10мб)

настроил ютрак как сервисдеск

часть писем(большая) проходит нормально,

часть подвешивается в подпапке для импорта и не появляется в ютреке и не стирается

youtrack 2017.04 на нашем сервере

по подобной теме в интернете нашел лишь упоминания о том что такое поведение может быть если отсутствуют заголовки с мессадж id

но это похоже не мой случай(ниже заголовки приведу), есть ли ограничения на размер входящих вложений?

===

привожу часть письма(заголовки)

Received: from mxback5j.mail.yandex.net ([127.0.0.1])
	by mxback5j.mail.yandex.net with LMTP id HrlbeaAN
	for <youtrack@tion.ru>; Wed, 11 Jul 2018 16:03:56 +0300
Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [2a02:6b8:0:1a2d::600])
	by mxback5j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id vVYKwHeR0V-3pWqTbSS;
	Wed, 11 Jul 2018 16:03:51 +0300
X-Yandex-Front: mxback5j.mail.yandex.net
X-Yandex-TimeMark: 1531314231
X-Yandex-Spam: 1
Received: from mxback5j.mail.yandex.net (mxback5j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10e])
	by forward100o.mail.yandex.net (Yandex) with ESMTP id 1765B2A26A3C
	for <youtrack@tion.ru>; Wed, 11 Jul 2018 16:03:44 +0300 (MSK)
Received: from mxback5j.mail.yandex.net ([127.0.0.1])
	by mxback5j.mail.yandex.net with LMTP id ahKd3LMJ;
	Wed, 11 Jul 2018 16:03:28 +0300
Received: from mxback5j.mail.yandex.net (localhost.localdomain [127.0.0.1])
	by mxback5j.mail.yandex.net (Yandex) with ESMTP id 9B7951E01000;
	Wed, 11 Jul 2018 16:03:27 +0300 (MSK)
Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac])
	by mxback5j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id s6CEInZ5Tq-3PVCCMiA;
	Wed, 11 Jul 2018 16:03:25 +0300
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tion.ru; s=mail; t=1531314206;
	bh=+pzmjbfA4rVwTZqfb3N9zM3nQx5Sc1IgSX1z36NDSRw=;
	h=From:To:Cc:Subject:Date:Message-ID;
	b=nE51v3pwUJo5gJdn+1dswlMQq/0cukr98QZNh7nTPhNZjze//ijy0Sxedhpum5AHZ
	 cR84vRr/npCFMATd8WceRScBq53h2ZBnqdOqAE6RS0RuZsumpnwZ/HzDO2R6EGHDMB
	 2MnKB1vUgO8J2V6Cx0T3ZWVA9+oedIEfjwM7IyHY=
Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id fsO0MEuzj8-38e0w3l0;
	Wed, 11 Jul 2018 16:03:08 +0300
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits))
	(Client certificate not present)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tion.ru; s=mail; t=1531314202;
	bh=+pzmjbfA4rVwTZqfb3N9zM3nQx5Sc1IgSX1z36NDSRw=;
	h=From:To:Cc:Subject:Date:Message-ID;
	b=xqzcJgwpn9PcHmmcfUvk0vfOg2L6E/U6GJpvK2RYx8blmP75ffQUzVoL9ISaFClYu
	 nBc7sEKHmoy/dyIfDei2TLbHzBK/Rt55egPoG2J1b7X3qS952+DvT2JjtJ2pEUJIXI
	 KH94Ffw3s4/bsrwNXPLWufHRAEkgxT/TywjMX+Jk=
Authentication-Results: smtp2j.mail.yandex.net; dkim=pass header.i=@tion.ru
From: =?utf-8?B?0KHQsNCx0LXQtdCy0LAg0JXQutCw0YLQtdGA0LjQvdCwINCd0LjQutC+0LvQsA==?=
	=?utf-8?B?0LXQstC90LA=?= <sabeeva@tion.ru>
To: <service@tion.ru>
Cc: =?utf-8?B?J9CU0L7Qu9Cz0LjRhSDQrtC70LjRjyc=?= <dyv@tion.ru>,
	<imt@tion.ru>,
	=?utf-8?B?0KTRgNCw0L3QuiDQnNCw0YDQuNGPINCh0LXRgNCz0LXQtdCy0L3QsA==?= <frank-ms@tion.ru>
Subject: =?utf-8?B?0L7QsdGA0LDRidC10L3QuNC1INCh0LXRgNCz0LXQuSDQn9C+0LvQtdGC0LDQtdCy?=
Date: Wed, 11 Jul 2018 20:03:08 +0700
Message-ID: <034b01d41917$83ee6d10$8bcb4730$@tion.ru>
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----=_NextPart_000_034C_01D41952.304E2F70"
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AdQZF4MTXujx/8ruQjON2Q8It+vMUw==
Content-Language: ru
X-Yandex-Forward: 76d64e29388b2bca033ec2124f8a6e79
X-Yandex-Forward: 98d3e305d5eedb5e58ea681773a0714b
X-Yandex-Forward: d238bc78f9ef0777ad82fa677c105842
X-Yandex-Forward: 81e7270b5585efc02074e2c370bd6a18
Return-Path: service@tion.ru
X-Yandex-Forward: 930f0dbdd84a9191ff875d6cc33a65f1

This is a multipart message in MIME format.

------=_NextPart_000_034C_01D41952.304E2F70
Content-Type: multipart/alternative;
	boundary="----=_NextPart_001_034D_01D41952.304E2F70"


------=_NextPart_001_034D_01D41952.304E2F70
Content-Type: text/plain;
	charset="utf-8"
Content-Transfer-Encoding: base64

====

воркфлоу про ютрак как сервисдеск сделал на базе правила из хелпа

collect_related_emails_on_issue_creation

---

/**
* This is a template for an on-change rule. This rule defines what
* happens when a change is applied to an issue.
*
* For details, read the Quick Start Guide:
* https://www.jetbrains.com/help/youtrack/standalone/2017.4/Quick-Start-Guide-Workflows-JS.html
*/
/*
var entities = require('@jetbrains/youtrack-scripting-api/entities');

exports.rule = entities.Issue.onChange({
// TODO: give the rule a human-readable title
title: 'Collect_related_emails_on_issue_creation',
guard: function(ctx) {
// TODO specify the conditions for executing the rule
return true;
},
action: function(ctx) {
var issue = ctx.issue;
// TODO: specify what to do when a change is applied to an issue
},
requirements: {
// TODO: add requirements
}
});
*/
var entities = require('@jetbrains/youtrack-scripting-api/entities');
var workflow = require('@jetbrains/youtrack-scripting-api/workflow');

exports.rule = entities.Issue.onChange({
title: workflow.i18n('Collect related emails on issue creation'),
guard: function(ctx) {
return ctx.issue.becomesReported;
},
action: function(ctx) {
var issue = ctx.issue;
var lastMessageRelatedEmailsStr = issue.fields.lastEmails;
var isBlank = function(str) {
return !str || str.trim().length === 0;
};
var lastMessageRelatedEmails = isBlank(lastMessageRelatedEmailsStr) ? [] : lastMessageRelatedEmailsStr.split(' ');

if (lastMessageRelatedEmails.length) {
var fromServiceEmail = issue.project.notificationEmail;
var isEmailAllowed = function(email) {
return email && email.length && email.toUpperCase() !== fromServiceEmail.toUpperCase();
};
var allRelatedEmailsStr = issue.fields.allEmails;
var allRelatedEmails = isBlank(allRelatedEmailsStr) ? [] : allRelatedEmailsStr.split(' ');

var newUsersEmails = lastMessageRelatedEmails.filter(function(email) {
return isEmailAllowed(email) && allRelatedEmails.indexOf(email) === -1;
});
if (newUsersEmails.length) {
//сотрем промежуточный адрес service@tion.ru он всегда второй
newUsersEmails.splice(1,1);

/*
for(var index;index<newUsersEmails.length;index++){
if (newUsersEmails[index]=='service@tion.ru') newUsersEmails.splice(index,1);
}
*/

issue.fields.allEmails = allRelatedEmails.concat(newUsersEmails).join(' ');
}


/*ADDON Send confirmation emails on issue creation */
/*var reporterEmail = Last message related emails.split(" ",preserveAllTokens).first;
var reporterEmail = Last message related emails.split(" ",preserveAllTokens).first;
sendMail(reporterEmail, "Your subject", "Your email body");
*/
/*
var reporterEmail = allRelatedEmailsStr.split(" ",preserveAllTokens).first;
sendMail(reporterEmail, "Заявка "+ issue.id+ , "Ваша заявка зарегистрированна, номер заявки"+ issue.id );
*/
issue.fields.lastEmails = null;
}
},
requirements: {
lastEmails: {
name: 'Last message related emails',
type: entities.Field.stringType
},
allEmails: {
name: 'E-mail',
type: entities.Field.stringType
}
}
});

---------------------------------------------------------------

send_notifications_to_all_unregistered_users_by_field_value

---------

var entities = require('@jetbrains/youtrack-scripting-api/entities');
var workflow = require('@jetbrains/youtrack-scripting-api/workflow');
var notifications = require('@jetbrains/youtrack-scripting-api/notifications');

exports.rule = entities.Issue.onChange({
title: workflow.i18n('Send notifications to all unregistered users'),
guard: function(ctx) {
return ctx.issue.comments.added.isNotEmpty();
//return false;
},
requirements: {
lastEmails: {
name: 'Last message related emails',
type: entities.Field.stringType
},
allEmails: {
name: 'E-mail',
type: entities.Field.stringType
},
IsSendByEmailAllowed: {
type: entities.EnumField.fieldType,
name: 'Отправить ответ клиенту',
no: {
name: 'no'
},
yes: {
name: 'yes'
}
},
Assignee: {
type: entities.User.fieldType,
name: 'Исполнитель'
}/*,
IsSended: {
type: entities.EnumField.fieldType,
name: 'ПисьмоКлиентуПослано',
yes: {
name: 'yes'
},
no: {
name: 'no'
}
}*/
},


action: function(ctx) {
var issue = ctx.issue;
var comment = issue.comments.added.first();
var issueFields = ctx.issue.fields;
//issueFields.IsSended = ctx.IsSended.no;
var AssigneefullName=ctx.issue.fields.Assignee.fullName;

if (issue.fields.IsSendByEmailAllowed.name == ctx.IsSendByEmailAllowed.yes.name) {
//workflow.message(workflow.i18n('Mail Is Sended['+issue.fields.IsSendByEmailAllowed.name+']['+ ctx.IsSendByEmailAllowed.yes.name+']'));

issueFields.IsSendByEmailAllowed = ctx.IsSendByEmailAllowed.no;
//issueFields.IsSended = ctx.IsSended.yes;


var isBlank = function(str) {
return !str || str.trim().length === 0;
};
var allRelatedEmailsStr = issue.fields.allEmails;
if (isBlank(allRelatedEmailsStr)) {
return;
}
var allRelatedEmails = allRelatedEmailsStr.split(' ');

var lastMessageRelatedEmailsStr = issue.fields.lastEmails;
var lastMessageRelatedEmails = isBlank(lastMessageRelatedEmailsStr) ? [] : lastMessageRelatedEmailsStr.split(' ');

var fromServiceEmail = issue.project.notificationEmail;
var isEmailAllowed = function(email) {
return email && email.length && email.toUpperCase() !== fromServiceEmail.toUpperCase();
};

var emailsToNotify;
if (lastMessageRelatedEmails.length) {
//case 1: comment from unregistered user
var newUsersEmails = lastMessageRelatedEmails.filter(function(email) {
return isEmailAllowed(email) && allRelatedEmails.indexOf(email) === -1;
});
if (newUsersEmails.length) {
issue.fields.allEmails = allRelatedEmailsStr + ' ' + newUsersEmails.join(' ');
}
issue.fields.lastEmails = null;

emailsToNotify = allRelatedEmails.filter(function(email) {
return isEmailAllowed(email) && lastMessageRelatedEmails.indexOf(email) === -1;
});
} else {
//case 2: comment from agent
emailsToNotify = allRelatedEmails.filter(function(email) {
return isEmailAllowed(email);
});
}

if (emailsToNotify.length) {
var message = {
fromName: lastMessageRelatedEmails.length ? lastMessageRelatedEmails[0] : comment.author.fullName,
toEmails: emailsToNotify,
subject: createSubject(issue),
body: lastMessageRelatedEmails.length ? createGeneralMessage(issue) : createInReplyToMessage(issue,comment.author.fullName)
};
notifications.sendEmail(message, issue);
}

workflow.message(workflow.i18n('Письмо Отправлено'));
}else{
//workflow.message(workflow.i18n('NotSended!!!!!!['+issue.fields.IsSendByEmailAllowed.name+']['+ ctx.IsSendByEmailAllowed.yes.name+']'));

}
}

});

function createGeneralMessage(issue) {
var text = issue.comments.added.first().text;
issue.attachments.added.forEach(function(attachment) {
text = text + '\n[file:' + attachment.name + ']';
});
return issue.wikify(text).trim();
}

function createInReplyToMessage(issue,SenderFullName) {
var messageText = createGeneralMessage(issue);
var addedComments = issue.comments.added;
//var AssigneefullName=ctx.issue.fields.Assignee.fullName;
// var AssigneefullName=ctx.issue.fields['Исполнитель'].fullName;
var lastVisibleComment;
issue.comments.forEach(function(comment) {
if (!addedComments.has(comment) && comment.permittedGroups.isEmpty() && comment.permittedUsers.isEmpty()) {
lastVisibleComment = comment;
}
});
var quotedText = lastVisibleComment ?
issue.wikify(lastVisibleComment.text).trim() :
issue.wikify(issue.description).trim();
/*
return [
'<div style="font-family: sans-serif">',
' <div style="padding: 10px 10px; font-size: 13px; border-bottom: 1px solid #D4D5D6;">',
' ' + messageText,
' </div>',
' <blockquote type="cite">',
' <div style="font-size: 13px; color: #888;">',
' ' + workflow.i18n('In reply to:') + '<br><br>' + quotedText,
' </div>',
' </blockquote>',
' <div style="margin: 20px 0 20px 44px; padding: 4px 0 8px 0; color: #888; font-size: 11px; border-top: 1px solid #D4D5D6;">',
' ' + workflow.i18n('You have received this message because you are a participant of the conversation in the issue {0}. Sincerely yours, YouTrack', issue.id),
' </div>',
'</div>'
].join('\n');
*/

// SenderFullName is '"Family"+" "+"Name"'
var temp = new Array();
temp=SenderFullName.split(' ');
var SenderFamily=temp[0];
var SenderName=temp[1];


return [
'<div style="font-family: sans-serif">',
' <div style="margin: 20px 0 20px 44px; padding: 4px 0 8px 0; color: #888; font-size: 11px; border-top: 1px solid #D4D5D6;">',
'Добрый день,<br>',
' </div>',
' <div style="padding: 10px 10px; font-size: 13px; border-bottom: 1px solid #D4D5D6;">',
' ' + messageText,
' </div>',
/*' <blockquote type="cite">',
' <div style="font-size: 13px; color: #888;">',
' ' + workflow.i18n('In reply to:') + '<br><br>' + quotedText,
' </div>',
' </blockquote>',
*/
' <div style="margin: 20px 0 20px 44px; padding: 4px 0 8px 0; color: #888; font-size: 11px; border-top: 1px solid #D4D5D6;">',
issue.id +'. С уважением<br>',
/*
'сервисная служба компании "Тион"<br>',
*/
'сотрудник сервисной службы "Тион" :' + SenderName+'<br>',
' тел. : 8-800-500-78-32<br>',
' e-mail: service@tion.ru<br>',
' просьба использовать команду ОТВЕТ<br>',
' для сохранения истории переписки в письме<br>',
' </div>',
'</div>'
].join('\n');
}

function createSubject(issue) {
var reStr = workflow.i18n('Re:');
var summary = issue.summary;
return summary.startsWith(reStr) ? summary : reStr + ' ' + summary;
}

1 comment
Comment actions Permalink
Official comment

Здравствуйте, 

Есть ограничение на максимальный размер файлов, его можно посмотреть на странице Настройки -> Глобальные настройки:

Please sign in to leave a comment.