Hunk » Foreign trade station construction » Two ways to solve the problem that LINODE VPS cannot send mail

Two ways to solve the problem that LINODE VPS cannot send mail

Many friends do not know how to install the mail system after they have successfully studied the LINODE configuration space, which makes it impossible to send mail. Today Hunk will share two methods to solve the problem that LINODE VPS cannot send emails

1. Simple method - install the smtp plug-in to solve the problem of unable to send mail

Advantages: simple operation

Disadvantages: It is a little slow when sending on the form

Using tools

One 126 public mailbox

Easy wp smtp plug-in( The wp smtp plug-in can also Yes, the setting method is similar)

usage method

1.1 Enter wp smtp or easy wp smtp in the plug-in search, find the plug-in easy wp smtp, install and activate it

 Wp smtp plug-in

1.2 Find Easy wp smtp in the background settings of wp and click it to go to the settings page

 Wp smtp plug-in

1.3 On the setting page, set as shown in the figure below. Both from email address and smtp usename are filled with your 126 email account

 Wp smtp plug-in

Save changes after setting

1.4 Then enter the test email on the set CONTACT FORM table to prompt that the sending is successful.

 Wp smtp plug-in

1.5 Then you will receive the email in your inbox. The settings are relatively simple.

 Wp smtp plug-in

2. Complex method – install postfix software on Linode vps and combine it with gmail to solve the problem of unable to send emails

Postfix is a software with similar functions to smtp. It is used to set up an email server. After installation, it uses the gmail account to send inquiries and emails.

Note: Linode prohibits the use of ports 25, 465 and 587 by default for accounts registered after November 5, 2019, which will lead to the failure of successful postfix transmission after successful installation. If this is the case with your Linode account, you need to open a ticket in the background of Linode to let Linode remove the restrictions on port use.

Advantages: The inquiry is sent quickly, almost every second, and it is not easy to enter the dustbin.

Disadvantages: the settings are a little complicated

The method is as follows:

Note: The following methods are based on the Ubuntu 16.04+nginx system. If you use Centos, you can find out by yourself. The methods should be similar

2.1 Installing postfix software

First use xshell Log in to your space, then update the system, enter the following command and enter

sudo apt-get update

 Two ways to solve the problem that LINODE VPS cannot send emails 49

Then install postfix, enter the following command and enter

sudo apt-get install libsasl2-modules postfix

It will pop up this box, do nothing and enter directly

 Two ways to solve the problem that LINODE VPS cannot send emails 50

Then another box will pop up, change the system mail name to your domain name www.domain.com, click TAB, switch to OK, and enter Two ways to solve the problem that LINODE VPS cannot send emails 51

The installation was completed in a few seconds.

2.2 Get the exclusive password of your gmail account

Specific method reference How to load gmail mailbox on foxmail , the first and second steps.

2.3 Configuring Postfix Files

First open flashfxp and connect it to your LINODE space. Then enter/etc/postfix in the path and press Enter. Find the main.cf file, download it locally, and open it with notepad++

 Two ways to solve the problem that LINODE VPS cannot send emails 52

find myhostname For this item, replace the value after the=sign with your own domain name, www.domain.com

 Two ways to solve the problem that LINODE VPS cannot send emails 53

Find again relayhost For this item, change the value after the=sign to [smtp. gmail. com]: 587

 Two ways to solve the problem that LINODE VPS cannot send emails 56

Then main.cf Add this paragraph at the end of the document content

# Enable SASL authentication
smtp_sasl_auth_enable = yes
# Disallow methods that allow anonymous authentication
smtp_sasl_security_options = noanonymous
# Location of sasl_passwd
smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd
# Enable STARTTLS encryption
smtp_tls_security_level = encrypt
# Location of CA certificates
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt

Then save and upload to the space to replace the original file.

next Copy the following code To txt text

[smtp.gmail.com]:587 username@gmail.com :password

hold username@gmail.com Change to your gmail account

Change the password to the gmail exclusive password you generated above

Do not change the others, and copy them after modification

Then enter the following code in xshell and press Enter

nano  /etc/postfix/sasl/sasl_passwd

Will open a black box and paste the code copied above

 Two ways to solve the problem that LINODE VPS cannot send emails 54

Then press CTRL+X, you will be prompted whether to save. Then enter y and press Enter to finish saving.

Then enter the following commands and enter in turn

Sudo postmap/etc/postfix/sasl/sasl_passwd Enter

Sudo chown root: root/etc/postfix/sasl/sasl_passwd/etc/postfix/sasl/sasl_passwd.db Enter

Sudo chmod 0600/etc/postfix/sasl/sasl_passwd/etc/postfix/sasl/sasl_passwd.db Enter

 Two ways to solve the problem that LINODE VPS cannot send emails 55

Then restart postfix

sudo systemctl restart postfix

2.4 Test whether inquiry can be sent and received

The test result is that it can be successfully sent and received quickly, and the sending box is a gmail account. This indicates that the setting has been successful!

 Two ways to solve the problem that LINODE VPS cannot send emails 57  Two ways to solve the problem that LINODE VPS cannot send emails 58

The above two methods can solve the problem that linode vps cannot send emails. You can choose the appropriate method to solve your own needs.

Scan and share the circle of friends

 Two ways to solve the problem that LINODE VPS cannot send mail

Follow Hunk WeChat official account

Hunk has entered the foreign trade industry for 10 years, engaged in foreign trade business, and transformed technology for 12 years, engaged in foreign trade station building marketing. If you are going to build an independent foreign trade station, we have many professional technical articles for your reference. Hunk recommends Purchase domain name on namesilo , on siteground or cloudways Buy space on and use Google email. Of course, if you are not good at technology and have no time to study, you can find Hunk outsource to build a website or pay for solving problems

15 replies on "2 ways to solve the problem that LINODE VPS cannot send emails"

OK, no problem!:)

Sure enough, I tested the other domain name, and it was also passable. The only problem was that several emails were directly sent to the trash. Is it because there was no problem with the setting? After all, it was set with another domain name.

My tests are all received, and they are in the inbox, not in the trash.

If you enter the trash, it may be that your email content has written test and other content, or it may be a misjudgment in the inbox. After all, Gmail is very authoritative. Generally, few mailboxes will put it in the trash.

reply

I suspect that the test is too many times, and it is finally displayed by another domain name. Will this be restored. I'll test again tomorrow to see if I can get into the dustbin. I'm afraid I can't recover. Since then, there have been more mails. I have to pull them out of the dustbin every time.

I'm not sure. This is usually an inbox problem. Sometimes the normal mails of foreign customers may get into garbage. Check the dustbin more often.

reply

HUNK is powerful, and this reply speed is amazing! In the future, when you go to the forum, someone will post a link to you.

I have just sent messages for several times without displaying them again. If I am unlucky to be screened, do I need time to recover? I have tested too many times, maybe I will not be screened forever. Then I will have to pull messages one by one. Less is good, more is enough.

HUNK , My CF7 prompts that the forwarding mailbox must use the site domain name as the mailbox suffix, but the problem is whether ZOHO has not opened SMTP. When I open SMTP, an error is displayed, but when it is closed, the test form says that the transmission is successful. Of course, there is no mail in the final mailbox.

If I use the second method, I'm afraid CF7 will still be unable to pass, because if he must transfer the mailbox for the site domain name mailbox, then I will change the mailbox of ZOHO. A headache.

CF7's tips are just for you to do. It doesn't matter whether there is real existence or not. It's just a code name.

The first is the simplest, and the second is more complex. There is no special requirement for the first type.

reply

I can't change the first one to the second one. I wonder if the first one is related to my mailbox resolution in the linode space?

As for the second kind of transfer through gmail, the transfer of multiple domains through one gmail is to add another line? In myhost

HUNK,
Thank you very much. I like the second method so much. It's so detailed and fast. It's just that CF7 always shows that the transit mailbox is not a site domain name configuration error. It's a bit uncomfortable to be perfect

PS: My additional problem is that there are two domain name websites in my space. I entered a system mailbox domain name. This is a directory for the entire space. I want to add my second domain name. I can
Do you add such commands directly in the file like this? Does this make an error? What else can I set?

Thank you for your quick reply. Unfortunately, you are skilled and can not give back any technical support to you. If you need to write a word of mouth and praise, let me know. ha-ha

CF7 is only a telephone. The two methods in this article are to set up a telephone line. Understand

CF7 should follow its requirements. If it is the second type, set one. A company can share a line to make phone calls.

Just help me promote my blog.

HUNK, I want to ask whether my transit mailbox and final receiving mailbox must have the same domain name suffix on the VPS if the SMTP plug-in is used, because BLUEHOST requires this, but can the VPS be different?

I just sent it to you, and suddenly came to realize whether it was because my email was resolved to the LINODE management, which meant that SMTP was not used, and then it was set the same way as BLUEHOST. Is it the transfer of two mailboxes with the same domain name?. But the question is whether ZOHO can succeed. Feel that many of the free ones are limited

Post reply

Your email address will not be disclosed. Required items have been used * tagging

-->