Cloud-oriented Life

Cloud Native Technology Improves Lives

For security reasons, Alibaba Cloud blocks outbound traffic on TCP port 25 by default. that You cannot connect to external addresses TCP port 25 from Alibaba Cloud Cloud servers (ECS).

Background Information

Blocking the outbound direction of TCP 25 port may affect your connection to the SMTP server of a third-party mail service provider through TCP 25 port to send external mail. If you need to use the cloud server on Alibaba Cloud to send external emails, it is recommended that you use Alibaba Cloud Mail products or use the 465 port provided by a third-party mail service provider.

Note If there are special scenarios, you must use TCP port 25 on the cloud server for external connections. Please submit a port 25 unblocking application in the security management and control platform. Alibaba Cloud will review the application reason you submitted and notify you of the review result by email.

Configuration

Remember to replace the content within {{ }} with your prefer value.

The from_address and user must be the same.

1
2
3
4
5
6
7
8
smtp:
from_address: {{ .Values.smtp.from_address }} # [email protected]
host: smtp.exmail.qq.com
port: 465 # not 25
use_tls: {{ .Values.smtp.use_tls }} # true or false
user: {{ .Values.smtp.user }} # [email protected]
password: {{ .Values.smtp.password }}
enable_replies: false # or true

FAQs

smtp or smtps.

1
The $MAIL_URL is 'smtp://...:465'.  You probably want 'smtps://' (The 's' enables TLS/SSL) since '465' is typically a secure port. undefined 

Use smtps protocols and 465 port instead of smtp and 25.

Error code 501

1
Exception in defer callback: Error: Mail command failed: 501 ϵͳÒÑÇ¿ÖÆ¿ªÆôÕʺÅÉý¼¶ÉèÖã¬ÇëµÇ¼exmail.qq.com°ó¶¨Î¢ÐÅ

This is because Tencent Enterprise Mailbox forced to enable the security certification before send email from client.

You can log in Tencent Enterprise Mailbox Administrator Web UI, find the sender’s account, and edit it to disable enforce secure login option.

References

[1] 腾讯企业邮箱 - https://exmail.qq.com/

[2] TCP 25端口解封申请 - 阿里云 - https://help.aliyun.com/document_detail/56130.html

[3] 阿里云服务器不能发邮件禁用25端口的三种解决方法_weixin_30258027的博客-CSDN博客 - https://blog.csdn.net/weixin_30258027/article/details/95448730?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.control

Terraform Aliyun Monitor Examples

Examples about using Terraform Alibaba Cloud Provider to manage alarm rules and monitor sites.

Github: https://github.com/CloudoLife/terraform-aliyun-monitor-examples

Read more »

asdf and Node.js Plugin

asdf is a single CLI tool for managing multiple runtime versions. It extend with a simple plugin system to install your favourite language: Dart, Elixir, Flutter, Golang (Go), Java, Node.js, Python, Ruby …

This article is about how to use asdf and Node.js plugin to install multiple Node.js versions on macOS with the Homebrew package manager.

Read more »

OSSImport is a free tool created by the Alibaba Cloud product team to assist with data backup and migration into the Alibaba Cloud Object Storage Service (OSS). Using OSSImport data can be migrated from either local storage or from third party cloud platforms. Currently supported data sources include Qiniu, Baidu BOS, AWS S3, Azure Blob, Youpai Cloud, Tencent Cloud COS, Kingsoft KS3, HTTP, and other OSS buckets.

Read more »

migration_comments

Using MigrationComments, you can simply add comments during your migrations. Or if you already have existing data structures, just add the comments afterwards in a separate migration. And of course you can always modify and delete these comments in later migrations.

So where are these comments used? Firstly, they will be included in your schema.rb dump which is where your IDE (e.g. RubyMine, VS Code) should be learning about your model structure. This means that they’ll be available at any point in your project. Additionally, if you are using the 'annotate’ gem, these comments will be added to the annotations that are generated within your model.rb file.

Read more »

Github or Gitlab use ~/.ssh/id_rsa as the default SSH private key. But sometimes you need more accounts than one for access to Github or Gitlab and similar tools. For example you can have one account for your projects at home and second account for your company.

There are three ways to Use multiple SSH private keys within git commands.

Read more »

rails_semantic_logger

Semantic Logger is a comprehensive Rails logging interface that enables human and machine readable logging outputs.

  • Colorful text log files for humans to read.

  • JSON log files containing all Semantic information that machines can easily comsume.

  • Write to multiple output destinations at the same time.

  • Forward logs to a centralized logging system, via JSON output or built-in appenders.

Read more »
0%