@social-mail/social-mail-web-server 1.8.478 → 1.8.479

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-web-server",
3
- "version": "1.8.478",
3
+ "version": "1.8.479",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -16,7 +16,7 @@ export default class DomainReputationService
16
16
  ms: MessagingService;
17
17
 
18
18
  @cacheFor()
19
- async checkReputation(domainName: string) {
19
+ async checkReputation(domainName: string, from?: string) {
20
20
  using scope = ServiceProvider.createScope(this);
21
21
  const db = scope.resolve(SocialMailContext);
22
22
 
@@ -33,7 +33,7 @@ export default class DomainReputationService
33
33
 
34
34
  if (failed > 3) {
35
35
  if (failed > (reputation.received / 10)) {
36
- return new SmtpError(`Sender ${domainName} Blocked for 24 Hours`, SmtpStatusCodes.SenderBlocked);
36
+ return new SmtpError(`Sender ${domainName} Blocked for 24 Hours from ${from}`, SmtpStatusCodes.SenderBlocked);
37
37
  }
38
38
  }
39
39
 
@@ -107,7 +107,7 @@ export default class MailReceiverService {
107
107
 
108
108
  const domain = this.fromDomain = this.from.address.split("@",2).pop();
109
109
 
110
- const error = await this.domainReputation.checkReputation(domain);
110
+ const error = await this.domainReputation.checkReputation(domain, this.from.address);
111
111
  if (error) {
112
112
  throw error;
113
113
  }