Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Check whether the SMTP address is blacklisted by the detected website.

2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Usually, we may send a large number of business emails because some users have sent some unconventional emails, and the email exit address has been blacklisted by some authoritative websites. At this time, we can write some scripts about IP address detection through powershell and include them in planned tasks to minimize the business impact caused by the blacklist of email exit addresses. The script content is as follows:

# get page information

$web= (Invoke-WebRequest "https://www.talosintelligence.com/reputation_center/lookup?search=xxx.xxx.xxx.xxx").content

# Custom message attributes & content

$msg1= "xxx.xxx.xxx.xxx blacklist, Please check!"

$msg2= "Mailaddress is not included in the blacklist!"

$smtp= "smtp server" $from= "xxx@contoso.com" br/ > $from= "xxx@contoso.com"

Br/ > $cc= "xxx@contoso.com"

$body1= "Smtp address is OK!"

# determine whether the IP address is Black

If ($web-match 'Listed')

{Send-MailMessage-Subject $msg1-SmtpServer $smtp-From $from-to $to-cc $cc-Body $body

}

Else

{Send-MailMessage-Subject $msg2-SmtpServer $smtp-From $from-to $to-cc $cc-Body "$body1"

}

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report