2016-03-31 4 views
8

शीर्षक/टैग कहने के रूप में, मैं एक PHP सर्वर के लिए लिनक्स पर एसएसएमटीपी चलाता हूं।एसएसएमटीपी अब काम नहीं करता है - 'अमान्य प्रतिक्रिया: 501 5.5.4 हेल्लो/ईएचएलओ तर्क [email protected] अमान्य, बंद कनेक्शन।'

जब भी मैं एक ई-मेल भेजने का प्रयास करें, मैं इन त्रुटियों को मिल

(है कि केवल लॉग/'sudo सेवा sendmail स्थिति' या 'sudo सेवा PHP5-एफ पी एम स्थिति' में PHP में दिखाई नहीं देती हैं,) से /var/log/mail.log

Mar 31 03:34:34 ip-172-31-22-38 sSMTP[2004]: Creating SSL connection to host 
Mar 31 03:34:34 ip-172-31-22-38 sSMTP[2004]: Invalid response: 501 5.5.4 HELO/ELO argument [email protected] invalid, closing connection. v74sm9147441pfa.7- gsmtp ([email protected]) 
Mar 31 03:34:34 ip-172-31-22-38 sSMTP[2004]: SSL connection using (null) 
Mar 31 03:34:34 ip-172-31-22-38 sSMTP[2004]: Cannot open smtp.gmail.com:587 

/var/log/mail.err और mail.warn

Mar 31 03:34:10 ip-172-31-22-38 sSMTP[1997]: Cannot open smtp.gmail.com:587 
Mar 31 03:34:34 ip-172-31-22-38 sSMTP[2004]: Invalid response: 501 5.5.4 HELO/EHLO argument [email protected] invalid, closing connection. v74sm9147441pfa.7 - gsmtp ([email protected]) 
Mar 31 03:34:34 ip-172-31-22-38 sSMTP[2004]: Cannot open smtp.gmail.com:587 

मेरे /etc/ssmtp/ssmtp.conf

012,351,641 से
# 
# Config file for sSMTP sendmail 
# 
# The person who gets all mail for userids < 1000 
# Make this empty to disable rewriting. 
[email protected] 

# The place where the mail goes. The actual machine name is required no 
# MX records are consulted. Commonly mailhosts are named mail.domain.com 
mailhub=smtp.gmail.com:587 

# Where will the mail seem to come from? 
#rewriteDomain= 

# The full hostname 
[email protected] 

[email protected] 
AuthPass=[removed] 
UseSTARTTLS=YES 
# Are users allowed to set their own From: address? 
# YES - Allow the user to specify their own From: address 
# NO - Use the system generated From: address 
FromLineOverride=YES 

मेरे revaliases

root:[email protected]:smtp.gmail.com:587 
localusername:[email protected]:smtp.gmail.com:587 

उत्तर

5

उम्र के लिए मेरे बाल बाहर खींच के बाद, मैं अंत में नीचे तंगी और जीमेल और SSMTP के लिए आर्क लिनक्स के विकी लेख से config की नकल की, और कहा कि काम कर समाप्त हो गया! अपने विन्यास, लोगों की जांच तीन बार सुनिश्चित करें!

# The user that gets all the mails (UID < 1000, usually the admin) 
[email protected] 

# The mail server (where the mail is sent to), both port 465 or 587 should be acceptable 
# See also http://mail.google.com/support/bin/answer.py?answer=78799 
mailhub=smtp.gmail.com:587 

# The address where the mail appears to come from for user authentication. 
rewriteDomain=gmail.com 

# The full hostname 
hostname=localhost 

# Use SSL/TLS before starting negotiation 
UseTLS=Yes 
UseSTARTTLS=Yes 

# Username/Password 
AuthUser=username 
AuthPass=password 

# Email 'From header's can override the default domain? 
FromLineOverride=yes 
15

मेरी ssmtp.conf[email protected] शामिल है, मैं यह hostname=localhost को बदल दिया है और समस्या को हल किया गया था।

+0

यह जावा में भी मेरे लिए समाधान था। मुझे props.put ("mail.smtp.localhost", "localhost") का उपयोग करना पड़ा; – kgiannakakis

संबंधित मुद्दे