Погуглил, похоже популярная ошибка для новичков. Вроде все верно написал, но всё равно вылетает. Тыкните мордой, что ему не нравится и почему выкидывается «554 synchronization error»?
.
sc = (SocketConnection)Connector.open(«socket://» + smtpServerAddress + «:» + port);
is = sc.openInputStream();
os = sc.openOutputStream();
os.write((«HELO there» + »
«).getBytes());
os.write((«MAIL FROM: » + from + »
«).getBytes());
os.write((«RCPT TO: » + to + »
«).getBytes());
os.write(«DATA
«.getBytes());
// stamp the msg with date
os.write((«Date: » + new Date() + »
«).getBytes());
os.write((«From: » + from + »
«).getBytes());
os.write((«To: » + to + »
«).getBytes());
os.write((«Subject: » + subject + »
«).getBytes());
os.write((msg + »
«).getBytes()); // message body
os.write(«.
«.getBytes());
os.write(«QUIT
«.getBytes());
// debug
StringBuffer sb = new StringBuffer();
int c = 0;
while (((c = is.read()) != -1) )
<
sb.append((char) c);
>
si.setText(«SMTP server response — » + sb.toString());
.
RPI.su — самая большая русскоязычная база вопросов и ответов. Наш проект был реализован как продолжение популярного сервиса otvety.google.ru, который был закрыт и удален 30 апреля 2015 года. Мы решили воскресить полезный сервис Ответы Гугл, чтобы любой человек смог публично узнать ответ на свой вопрос у интернет сообщества.
Все вопросы, добавленные на сайт ответов Google, мы скопировали и сохранили здесь. Имена старых пользователей также отображены в том виде, в котором они существовали ранее. Только нужно заново пройти регистрацию, чтобы иметь возможность задавать вопросы, или отвечать другим.
Чтобы связаться с нами по любому вопросу О САЙТЕ (реклама, сотрудничество, отзыв о сервисе), пишите на почту [email protected] . Только все общие вопросы размещайте на сайте, на них ответ по почте не предоставляется.
I have run headfirst into this reject error from exim4:
2010-02-15 01:46:05 SMTP protocol synchronization error (input sent without waiting for greeting): rejected connection from H=ender [192.168.20.49] input=»HELO 192.168.20.49
«
I have modified my exim4 config to not enforce sync, like so:
But that doesn’t seem to matter. What makes less sense to me is why I’m getting the 554 in the first place. I send a HELO, I wait for a response, and somehow in the midst of that, I manage to generate the «554 Error»
What am I doing wrong in the code below, that makes this fail 99% of the time (yes, it has worked twice). Yes, the socket is blocking, I hang in recv for
5 seconds waiting for the rejection. On the 2 times when it has worked, it didn’t pause at all.
I’ve tried sending EHLO instead of HELO, no better luck. I’ve even had grief getting a telnet session to connect and say HELO. However, i can use python smtp (from another machine) to send emails just fine against this same server!
I have a Exim 4.92 server running on a Debian machine, everything works fine. Now I want to send mails from Gmail through that Exim server, since Gmail needs an STMP server for alias addresses.
However, when I try to send a mail from Gmail via my server using SSL, I get the following error in Exim’s mainlog file:
I am not an Exim expert, and I don’t have messed around with its configuration file so far. I am using the default settings I get from Debian’s Exim configuration tool.