Re: OpenSMTPD 5.7.1 portable - received invalid command RCPT TO ...
On Thu, Aug 27, 2015 at 10:00:52AM +0800, Alan Cheng wrote: > Hello, > Hello, Sorry for the delay, still catching up on mails from this summer ;-) > My OpenSMTPD is having problems sending out emails. It gets a error message > saying somthing like "received invalid command: "RCPT > TO:".Turned on debugging but still no clue. > Anyone has any pointers? thanks! > Yes: > Here is related log: > > root@cactus:/usr/local/etc# tail -f /var/log/mail.log > > Aug 27 01:51:30 cactus smtpd[12220]: debug: smtp: new client on listener: > 0x953f50 > Aug 27 01:51:30 cactus smtpd[12220]: smtp-in: session e228d1ddb97126ff: > connection from host 54.209.64.223.static.js.chinamobile [223.64.209.54] > established > Aug 27 01:51:31 cactus dovecot: imap(acheng): Connection closed in=23 out=501 > Aug 27 01:51:31 cactus smtpd[12220]: debug: session_start_ssl: switching to > SSL > Aug 27 01:51:31 cactus smtpd[12220]: debug: pony: rsae_priv_enc > Aug 27 01:51:31 cactus smtpd[12220]: smtp-in: session e228d1ddb97126ff: TLS > started version=TLSv1/SSLv3 (TLSv1.2), cipher=ECDHE-RSA-AES128-GCM-SHA256, > bits=128 > Aug 27 01:51:31 cactus smtpd[12220]: smtp-in: session e228d1ddb97126ff: > received invalid command: "RCPT TO: " > client connected to 223.64.209.54 > And here is my smtpd.conf: > pki cactus.keda.io certificate "/etc/ssl/private/cactus.keda.io.crt" > pki cactus.keda.io key "/etc/ssl/private/cactus.keda.io.key" > listen on localhost > listen on eth0 tls pki cactus.keda.io auth-optional > table aliases file:/usr/local/etc/mail/aliases > table secrets file:/usr/local/etc/mail/secrets > accept for local alias deliver to maildir > "/var/mail/%{user.username}/" ^^^--- doesn't match this rule (not a local connection) > accept from any for domain keda.io alias deliver to maildir > "/var/mail/%{user.username}/" ^^^--- doesn't match this rule (not matching domain) > accept for any relay ^^^--- doesn't match this rule (not a local connection) -- Gilles Chehade https://www.poolp.org @poolpOrg -- You received this mail because you are subscribed to misc@opensmtpd.org To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org
Fwd: Re: OpenSMTPD 5.7.1 portable - received invalid command RCPT TO ...
-- Forwarded message --From: Gilles Chehade gil...@poolp.orgDate: Aug 27, 2015 8:15 AMSubject: Re: OpenSMTPD 5.7.1 portable - received invalid command RCPT TO ...To: Alan Cheng ach...@gobsd.orgCc: Sorry, short answer cause not on computer: Look at your IP address in log, then look at ruleset, you should find the problem easily On Aug 27, 2015 4:00 AM, Alan Cheng acheng@gobsd.org wrote:Hello,My OpenSMTPD is having problems sending out emails. It gets a error message saying somthing like received invalid command: RCPT TO:alan.cheng@andex.com.Turned on debugging but still no clue. Anyone has any pointers? thanks!Here is related log:root@cactus:/usr/local/etc# tail -f /var/log/mail.logAug 27 01:51:30 cactus smtpd[12220]: debug: smtp: new client on listener: 0x953f50Aug 27 01:51:30 cactus smtpd[12220]: smtp-in: session e228d1ddb97126ff: connection from host 54.209.64.223.static.js.chinamobile [223.64.209.54] establishedAug 27 01:51:31 cactus dovecot: imap(acheng): Connection closed in=23 out=501Aug 27 01:51:31 cactus smtpd[12220]: debug: session_start_ssl: switching to SSLAug 27 01:51:31 cactus smtpd[12220]: debug: pony: rsae_priv_encAug 27 01:51:31 cactus smtpd[12220]: smtp-in: session e228d1ddb97126ff: TLS started version=TLSv1/SSLv3 (TLSv1.2), cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128Aug 27 01:51:31 cactus smtpd[12220]: smtp-in: session e228d1ddb97126ff: received invalid command: RCPT TO:alan.cheng@andex.comAnd here is my smtpd.conf:pki cactus.keda.io certificate /etc/ssl/private/cactus.keda.io.crtpki cactus.keda.io key /etc/ssl/private/cactus.keda.io.keylisten on localhostlisten on eth0 tls pki cactus.keda.io auth-optionaltable aliases file:/usr/local/etc/mail/aliasestable secrets file:/usr/local/etc/mail/secretsaccept for local alias aliases deliver to maildir /var/mail/%{user.username}/accept from any for domain keda.io alias aliases deliver to maildir /var/mail/%{user.username}/accept for any relayOS is Ubuntu 15.04 and OpenSMTPD is compiled from 5.7.1 portable release.Thanks,Alan
Re: Fwd: Re: OpenSMTPD 5.7.1 portable - received invalid command RCPT TO ...
Hi Gilles, thanks. Now the issue is fixed by adding a line like below and re-configure my client to use port 587 (submission) instead of 25. listen on eth0 port submission tls-require pki cactus.keda.io auth For those who are interested: With Gilles' msg in mind, I went through my config again, then I came to realize that my email client (or IP) is not considered local and thus SMTPD refuse to relay. I tried replacing auth-optional with auth, and that did fix the issue, but broke incoming email. Googled again and see other people handles incoming and outgoing emails on different port. That reminds me to leave port 25 for receiving emails and open another port to handle outgoing emails.Now my config looks like below:pki cactus.keda.io certificate /etc/ssl/private/cactus.keda.io.crt pki cactus.keda.io key /etc/ssl/private/cactus.keda.io.key listen on localhost listen on eth0 tls pki cactus.keda.io auth-optional listen on eth0 port submission tls-require pki cactus.keda.io auth table aliases file:/usr/local/etc/mail/aliases table secrets file:/usr/local/etc/mail/secrets accept from any for domain keda.io alias aliases deliver to maildir /var/mail/%{user.username}/ accept for any relay Then, re-configure email client to use port 587 for outgoing emails. Done. Thanks,Alan --From:Gilles Chehade gil...@poolp.orgTime:2015 Aug 27 (Thu) 14:26To:misc misc@opensmtpd.orgSubject:Fwd: Re: OpenSMTPD 5.7.1 portable - received invalid command RCPT TO ... -- Forwarded message -- From: Gilles Chehade gil...@poolp.org Date: Aug 27, 2015 8:15 AM Subject: Re: OpenSMTPD 5.7.1 portable - received invalid command RCPT TO ... To: Alan Cheng ach...@gobsd.org Cc: Sorry, short answer cause not on computer: Look at your IP address in log, then look at ruleset, you should find the problem easily On Aug 27, 2015 4:00 AM, Alan Cheng ach...@gobsd.org wrote: Hello, My OpenSMTPD is having problems sending out emails. It gets a error message saying somthing like received invalid command: RCPT TO:alan.ch...@andex.com.Turned on debugging but still no clue. Anyone has any pointers? thanks! Here is related log: root@cactus:/usr/local/etc# tail -f /var/log/mail.log Aug 27 01:51:30 cactus smtpd[12220]: debug: smtp: new client on listener: 0x953f50 Aug 27 01:51:30 cactus smtpd[12220]: smtp-in: session e228d1ddb97126ff: connection from host 54.209.64.223.static.js.chinamobile [223.64.209.54] established Aug 27 01:51:31 cactus dovecot: imap(acheng): Connection closed in=23 out=501 Aug 27 01:51:31 cactus smtpd[12220]: debug: session_start_ssl: switching to SSL Aug 27 01:51:31 cactus smtpd[12220]: debug: pony: rsae_priv_enc Aug 27 01:51:31 cactus smtpd[12220]: smtp-in: session e228d1ddb97126ff: TLS started version=TLSv1/SSLv3 (TLSv1.2), cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128 Aug 27 01:51:31 cactus smtpd[12220]: smtp-in: session e228d1ddb97126ff: received invalid command: RCPT TO:alan.ch...@andex.com And here is my smtpd.conf: pki cactus.keda.io certificate /etc/ssl/private/cactus.keda.io.crt pki cactus.keda.io key /etc/ssl/private/cactus.keda.io.key listen on localhost listen on eth0 tls pki cactus.keda.io auth-optional table aliases file:/usr/local/etc/mail/aliases table secrets file:/usr/local/etc/mail/secrets accept for local alias aliases deliver to maildir /var/mail/%{user.username}/ accept from any for domain keda.io alias aliases deliver to maildir /var/mail/%{user.username}/ accept for any relay OS is Ubuntu 15.04 and OpenSMTPD is compiled from 5.7.1 portable release. Thanks,Alan b??yǢ??m?+j)[yƮ?쨹???r??y?h?+ki??N?r?jf??ښ+??칻?ޢ???ki??
OpenSMTPD 5.7.1 portable - received invalid command RCPT TO ...
Hello, My OpenSMTPD is having problems sending out emails. It gets a error message saying somthing like received invalid command: RCPT TO:alan.ch...@andex.com.Turned on debugging but still no clue. Anyone has any pointers? thanks! Here is related log: root@cactus:/usr/local/etc# tail -f /var/log/mail.log Aug 27 01:51:30 cactus smtpd[12220]: debug: smtp: new client on listener: 0x953f50 Aug 27 01:51:30 cactus smtpd[12220]: smtp-in: session e228d1ddb97126ff: connection from host 54.209.64.223.static.js.chinamobile [223.64.209.54] established Aug 27 01:51:31 cactus dovecot: imap(acheng): Connection closed in=23 out=501 Aug 27 01:51:31 cactus smtpd[12220]: debug: session_start_ssl: switching to SSL Aug 27 01:51:31 cactus smtpd[12220]: debug: pony: rsae_priv_enc Aug 27 01:51:31 cactus smtpd[12220]: smtp-in: session e228d1ddb97126ff: TLS started version=TLSv1/SSLv3 (TLSv1.2), cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128 Aug 27 01:51:31 cactus smtpd[12220]: smtp-in: session e228d1ddb97126ff: received invalid command: RCPT TO:alan.ch...@andex.com And here is my smtpd.conf: pki cactus.keda.io certificate /etc/ssl/private/cactus.keda.io.crt pki cactus.keda.io key /etc/ssl/private/cactus.keda.io.key listen on localhost listen on eth0 tls pki cactus.keda.io auth-optional table aliases file:/usr/local/etc/mail/aliases table secrets file:/usr/local/etc/mail/secrets accept for local alias aliases deliver to maildir /var/mail/%{user.username}/ accept from any for domain keda.io alias aliases deliver to maildir /var/mail/%{user.username}/ accept for any relay OS is Ubuntu 15.04 and OpenSMTPD is compiled from 5.7.1 portable release. Thanks,Alan
Re: OpenSMTPD 5.7.1 portable - received invalid command RCPT TO ...
Ah ok, probably not the problem I was thinking of then :/ On Aug 26, 2015, at 11:26 PM, Alan Cheng ach...@gobsd.org wrote: oh, I'm not able to change that. The command was actually from email clients (I tried web mail and anroid email client). -- From:James Lott ja...@lottspot.com Time:2015 Aug 27 (Thu) 11:08 To:Alan Cheng ach...@gobsd.org Cc:misc misc@opensmtpd.org Subject:Re: OpenSMTPD 5.7.1 portable - received invalid command RCPT TO ... I believe the R conflicts with an OpenSSL command-- try 'rcpt to' rather than 'RCPT TO' On Aug 26, 2015, at 10:00 PM, Alan Cheng ach...@gobsd.org wrote: Hello, My OpenSMTPD is having problems sending out emails. It gets a error message saying somthing like received invalid command: RCPT TO:alan.ch...@andex.com. Turned on debugging but still no clue. Anyone has any pointers? thanks! Here is related log: root@cactus:/usr/local/etc# tail -f /var/log/mail.log Aug 27 01:51:30 cactus smtpd[12220]: debug: smtp: new client on listener: 0x953f50 Aug 27 01:51:30 cactus smtpd[12220]: smtp-in: session e228d1ddb97126ff: connection from host 54.209.64.223.static.js.chinamobile [223.64.209.54] established Aug 27 01:51:31 cactus dovecot: imap(acheng): Connection closed in=23 out=501 Aug 27 01:51:31 cactus smtpd[12220]: debug: session_start_ssl: switching to SSL Aug 27 01:51:31 cactus smtpd[12220]: debug: pony: rsae_priv_enc Aug 27 01:51:31 cactus smtpd[12220]: smtp-in: session e228d1ddb97126ff: TLS started version=TLSv1/SSLv3 (TLSv1.2), cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128 Aug 27 01:51:31 cactus smtpd[12220]: smtp-in: session e228d1ddb97126ff: received invalid command: RCPT TO:alan.ch...@andex.com And here is my smtpd.conf: pki cactus.keda.io certificate /etc/ssl/private/cactus.keda.io.crt pki cactus.keda.io key /etc/ssl/private/cactus.keda.io.key listen on localhost listen on eth0 tls pki cactus.keda.io auth-optional table aliases file:/usr/local/etc/mail/aliases table secrets file:/usr/local/etc/mail/secrets accept for local alias aliases deliver to maildir /var/mail/%{user.username}/ accept from any for domain keda.io alias aliases deliver to maildir /var/mail/%{user.username}/ accept for any relay OS is Ubuntu 15.04 and OpenSMTPD is compiled from 5.7.1 portable release. Thanks, Alan
Re: OpenSMTPD 5.7.1 portable - received invalid command RCPT TO ...
I believe the R conflicts with an OpenSSL command-- try 'rcpt to' rather than 'RCPT TO' On Aug 26, 2015, at 10:00 PM, Alan Cheng ach...@gobsd.org wrote: Hello, My OpenSMTPD is having problems sending out emails. It gets a error message saying somthing like received invalid command: RCPT TO:alan.ch...@andex.com. Turned on debugging but still no clue. Anyone has any pointers? thanks! Here is related log: root@cactus:/usr/local/etc# tail -f /var/log/mail.log Aug 27 01:51:30 cactus smtpd[12220]: debug: smtp: new client on listener: 0x953f50 Aug 27 01:51:30 cactus smtpd[12220]: smtp-in: session e228d1ddb97126ff: connection from host 54.209.64.223.static.js.chinamobile [223.64.209.54] established Aug 27 01:51:31 cactus dovecot: imap(acheng): Connection closed in=23 out=501 Aug 27 01:51:31 cactus smtpd[12220]: debug: session_start_ssl: switching to SSL Aug 27 01:51:31 cactus smtpd[12220]: debug: pony: rsae_priv_enc Aug 27 01:51:31 cactus smtpd[12220]: smtp-in: session e228d1ddb97126ff: TLS started version=TLSv1/SSLv3 (TLSv1.2), cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128 Aug 27 01:51:31 cactus smtpd[12220]: smtp-in: session e228d1ddb97126ff: received invalid command: RCPT TO:alan.ch...@andex.com And here is my smtpd.conf: pki cactus.keda.io certificate /etc/ssl/private/cactus.keda.io.crt pki cactus.keda.io key /etc/ssl/private/cactus.keda.io.key listen on localhost listen on eth0 tls pki cactus.keda.io auth-optional table aliases file:/usr/local/etc/mail/aliases table secrets file:/usr/local/etc/mail/secrets accept for local alias aliases deliver to maildir /var/mail/%{user.username}/ accept from any for domain keda.io alias aliases deliver to maildir /var/mail/%{user.username}/ accept for any relay OS is Ubuntu 15.04 and OpenSMTPD is compiled from 5.7.1 portable release. Thanks, Alan