@social-mail/social-mail-web-server 1.11.21 → 1.11.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/services/files/FileVersionService.js +2 -2
- package/dist/server/services/files/FileVersionService.js.map +1 -1
- package/dist/server/smtp/services/MailReceiverService.d.ts +1 -0
- package/dist/server/smtp/services/MailReceiverService.d.ts.map +1 -1
- package/dist/server/smtp/services/MailReceiverService.js +8 -5
- package/dist/server/smtp/services/MailReceiverService.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/server/services/files/FileVersionService.ts +2 -2
- package/src/server/smtp/services/MailReceiverService.ts +11 -6
package/package.json
CHANGED
|
@@ -41,11 +41,11 @@ export default class FileVersionService {
|
|
|
41
41
|
|
|
42
42
|
if ( /text\//i.test(file.contentType)) {
|
|
43
43
|
const rootFolders = file.path.split("/").filter((x) => x && x !== file.appFileID.toString()) as any[];
|
|
44
|
-
console.log(`Updating sites ${rootFolders.join(",")}`);
|
|
44
|
+
console.log(`Updating sites ${rootFolders.join(",")} for user ${user.userID}`);
|
|
45
45
|
await db.websiteFolders.where({ rootFolders }, (x, p) => Sql.in(x.folderID, p.rootFolders))
|
|
46
46
|
// .trace((x) => console.log(`Updating site ${rootFolders.join(",")} ${x}`))
|
|
47
47
|
.update(user, (x, p) => ({
|
|
48
|
-
lastModifiedByUserID: p.userID,
|
|
48
|
+
lastModifiedByUserID: Sql.cast.asBigInt(p.userID),
|
|
49
49
|
isModified: true,
|
|
50
50
|
lastModified: Sql.date.now()
|
|
51
51
|
}));
|
|
@@ -80,6 +80,7 @@ export default class MailReceiverService {
|
|
|
80
80
|
// private sender: EmailAddress;
|
|
81
81
|
|
|
82
82
|
private recipients: Map<string, Mailbox>;
|
|
83
|
+
private domain: string;
|
|
83
84
|
|
|
84
85
|
async start(session: smtpServer.SMTPServerSession) {
|
|
85
86
|
this.session = session;
|
|
@@ -106,12 +107,7 @@ export default class MailReceiverService {
|
|
|
106
107
|
this.from = address;
|
|
107
108
|
|
|
108
109
|
const domain = this.fromDomain = this.from.address.split("@",2).pop();
|
|
109
|
-
|
|
110
|
-
const error = await this.domainReputation.checkReputation(domain);
|
|
111
|
-
if (error) {
|
|
112
|
-
console.error(`Reputation failed for ${this.from.address}`);
|
|
113
|
-
throw error;
|
|
114
|
-
}
|
|
110
|
+
this.domain = domain;
|
|
115
111
|
|
|
116
112
|
// const mailbox = await this.emailAddressService.getHostedMailboxByAddress(address.address);
|
|
117
113
|
// if (mailbox && !mailbox.isExternal) {
|
|
@@ -237,6 +233,15 @@ export default class MailReceiverService {
|
|
|
237
233
|
throw new SmtpError("Content not acceptable", SmtpStatusCodes.DeliveryNotPermitted);
|
|
238
234
|
}
|
|
239
235
|
|
|
236
|
+
const { domain } = this;
|
|
237
|
+
|
|
238
|
+
const error = await this.domainReputation.checkReputation(domain);
|
|
239
|
+
if (error) {
|
|
240
|
+
const recipients = Array.from(this.recipients.keys()).join();
|
|
241
|
+
console.error(`Reputation failed for ${this.from.address} rcpt to ${recipients}`);
|
|
242
|
+
throw error;
|
|
243
|
+
}
|
|
244
|
+
|
|
240
245
|
// store file locally somewhere...
|
|
241
246
|
const tempFile = await this.tempFileService.createTempFile(".eml");
|
|
242
247
|
await fsp.writeFile(tempFile.path, stream);
|