SymptomsNote: This article applies to Windows as well. However, some of the below commands for checking IP addresses can be run on Linux only.
Mail cannot be sent from my Parallels Plesk Panel (PP) server via SMTP.
In fact, messages reach the remote mailbox, but are always recognized as SPAM.
CauseThis may happen if the sender's IP address does not match the MX record of the server.
DiagnosticsDetermine the sender's IP address. On a PP server, it is the IP address of the domain the mail is sent from:
# nslookup domain.tld
Determine the hostnames of your MX-es:
# dig MX domain.tld
; <<>> DiG 9.7.3-P3-RedHat-9.7.3-8.P3.el6_2.2 <<>> MX domain.tld
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28034
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;domain.tld. IN MX
;; ANSWER SECTION:
domain.tld. 43200 IN MX 30 mx1.domain.tld.
domain.tld. 43200 IN MX 20 mx2.domain.tld.
Now determine the IP addresses of your MX-es:
# nslookup mx1.domain.tld
# nslookup mx2.domain.tld
As you can see, the sender's IP address (184.108.40.206) does not match those of the MX-es (220.127.116.11 and 18.104.22.168). This causes messages to be recognized as SPAM.