Socket error 10054 eol connection reset by peer

I'm trying to run phpmailer/sendmail from localhost with a gmail account. I use XAMPP. I use the template from http://www.html-form-guide.com/php-form/php-registration-form.html I try since few w...

I’m trying to run phpmailer/sendmail from localhost with a gmail account. I use XAMPP.

I use the template from http://www.html-form-guide.com/php-form/php-registration-form.html

I try since few weeks now but still did not manage to make it work.
Do you have an idea from the following logs ?

I’m a beginner so feel free to ask me if you need further data.
Thanks

crash.txt

date/time         : 2016-01-22, 12:23:46, 747ms
computer name     : **
user name         : SYSTEM <admin>
registered owner  : Microsoft / Microsoft
operating system  : Windows XP Media Center x64 Service Pack 3 build 2600 (in fact this is a compatibility as admin. My real version is Win7 x64
system language   : English
system up time    : 12 days 2 hours
program up time   : 21 seconds
processors        : 8x Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz
physical memory   : 2936/8044 MB (free/total)
free disk space   : (C:) 165.48 GB
display mode      : 1024x768, 32 bit
process id        : $6d20
allocated memory  : 17.00 MB
command line      : "C:xamppsendmailsendmail.exe" -t
executable        : sendmail.exe
exec. date/time   : 2012-04-16 18:30
compiled with     : Delphi 2006/07
madExcept version : 3.0l
callstack crc     : $1d5da2f6, $426ead6b, $426ead6b
exception number  : 1
exception class   : EIdSocketError
exception message : Socket Error # 10054 Connection reset by peer.

debug.log

16/01/22 12:23:25 ** --- MESSAGE BEGIN ---
16/01/22 12:23:25 ** To:  email <email@gmail.com>
16/01/22 12:23:25 ** Subject: Your registration with user11.com
16/01/22 12:23:25 ** Date: Fri, 22 Jan 2016 12:23:25 +0100
16/01/22 12:23:25 ** Return-Path: nobody@localhost
16/01/22 12:23:25 ** From: Root User <nobody@localhost>
16/01/22 12:23:25 ** Message-ID: <f7667d2c9812101585751b11c67b9c84@localhost>
16/01/22 12:23:25 ** X-Priority: 3
16/01/22 12:23:25 ** X-Mailer: PHPMailer (phpmailer.sourceforge.net) [version 2.0.4]
16/01/22 12:23:25 ** MIME-Version: 1.0
16/01/22 12:23:25 ** Content-Transfer-Encoding: 8bit
16/01/22 12:23:25 ** Content-Type: text/plain; charset="utf-8"
16/01/22 12:23:25 ** 
16/01/22 12:23:25 ** Hello email 
16/01/22 12:23:25 ** 
16/01/22 12:23:25 ** Thanks for your registration with user11.com
16/01/22 12:23:25 ** Please click the link below to confirm your registration.
16/01/22 12:23:25 ** http://localhost/project_webapp/registration_login_forms/confirmreg.php?code=a3c8d5758bdcec87a8ac4dfe8c85fa1d
16/01/22 12:23:25 ** 
16/01/22 12:23:25 ** Regards,
16/01/22 12:23:25 ** Webmaster
16/01/22 12:23:25 ** user11.com
16/01/22 12:23:25 ** 
16/01/22 12:23:25 ** --- MESSAGE END ---
16/01/22 12:23:25 ** Connecting to smtp.gmail.com:587
16/01/22 12:23:46 ** Disconnected.
16/01/22 12:23:46 ** Disconnected.
16/01/22 12:23:46 ** Disconnected.
16/01/22 12:23:46 ** Socket Error # 10054<EOL>Connection reset by peer.

sendmail.ini:

smtp_server=smtp.gmail.com
smtp_port=587
smtp_ssl=ssl
error_logfile=error.log
debug_logfile=debug.log
auth_username=email@gmail.com
auth_password=*******
pop3_server=
pop3_username=
pop3_password=
force_sender=email@gmail.com
force_recipient=
hostname=smtp.gmail.com

php.ini

[mail function]
 smtp=smtp.gmail.com
 smtp_port = 587

; For Win32 only.
 sendmail_from = email@gmail.com
sendmail_path = ""C:xamppsendmailsendmail.exe" -t"
mail.add_x_header=Off

    Configuring PHP under Windows to use Gmail or External SMTP Server [SSL]

    Keywords: SSL, SMTP Authentication, External SMTP, Google Apps, Fake Sendmail

    When installing and setting up Apache, PHP and MySQL on my Windows Server box I have a unique problem, I didn’t run my own mail server. I got sick of having to deal with spam issues as well as ensuring maximum uptime or end up losing mail. I then decided to take advantage of Google Apps, which allows you to use Google Services for your domains including the Gmail Service, which allows you to have your email handled by Google. What’s best? You still keep the domain name, so you get all the features of Gmail, but with your own domain name and you still retain full control of users. To see an example of the log on, check out http://mail.digiex.net.

    One big problem with this though, how do you configure PHP so it can send mail now that you don’t run the mail service yourself? In the PHP.ini you can configure to use SMTP to drop off mail but it doesnt offer you many options, whats missing is SSL support which Gmail uses as well as SMTP authentication which yet again, Gmail uses.

    This is the best part, I found a «Unix fake sendmail» application for Windows, what this does is accepts mail in the same way Unix does, but then passes it onto another mail server and supports SSL and authentication.

    Configuration

    Note: If you are intending to use Gmail or Google Apps with Custom Domain, please read this for an update regarding the SSL problems.

    This configuration will talk you through setting up the service with Gmail using a Custom Domain. If you have not yet done this, you will need to set up Google Apps for your Domain by clicking here. Once you have enabled Gmail for your domain you will need to set up an account for webmaster or whatever email address you intend to use for your PHP Mails. Once the account is created you must log into it once and enable POP3 or IMAP under Settings, this usually then enables SMTP on your Gmail so that you can use it with this.

    If you are not using Gmail you will need to do some additional steps like setting up the SMTP server and port. You will need to find these out from your email provider. This does NOT work with Windows Live Domains due to the lack of SMTP.

    Step 1 — Download and Configure Sendmail

    The first step is to download Fake Sendmail created by Byron Jones. I have provided a copy which already has SSL supported added in and configured to work with Gmail which can be downloaded by clicking here.

    You will need to extract it somewhere on your Server. Its recommended you choose somewhere sensible because once set up you will need to reconfigure PHP if you change the path, so don’t bother with your Desktop. If you have locked down Apache and PHP with a seperate locked down user account, that user account with need access to read and run applications in the folder where you store Sendmail. For the purpose of this guide, I have stored it in C:inetpubsendmail

    Once extracted, open Sendmail.ini in your favourite text editor, Notepad will do. You will need to customize this configuration to your own. The lines highlighted in red must be changed and configured to your domain settings. Words highlighted in blue should ONLY be changed if you are not using Gmail for your email.

    ; configuration for fake sendmail
    
    ; if this file doesn't exist, sendmail.exe will look for the settings in
    ; the registry, under HKLMSoftwareSendmail
    
    [sendmail]
    
    ; you must change mail.mydomain.com to your smtp server,
    ; or to IIS's "pickup" directory.  (generally C:InetpubmailrootPickup)
    ; emails delivered via IIS's pickup directory cause sendmail to
    ; run quicker, but you won't get error messages back to the calling
    ; application.
    
    smtp_server=[COLOR=Blue][B]smtp.gmail.com[/B][/COLOR]
    
    ; smtp port (normally 25)
    
    smtp_port=[COLOR=Blue][B]587[/B][/COLOR]
    
    ; the default domain for this server will be read from the registry
    ; this will be appended to email addresses when one isn't provided
    ; if you want to override the value in the registry, uncomment and modify
    
    default_domain=[COLOR=Red][B]domain.com[/B][/COLOR]
    
    ; log smtp errors to error.log (defaults to same directory as sendmail.exe)
    ; uncomment to enable logging
    
    error_logfile=error.log
    
    ; create debug log as debug.log (defaults to same directory as sendmail.exe)
    ; uncomment to enable debugging
    
    ;debug_logfile=debug.log
    
    ; if your smtp server requires authentication, modify the following two lines
    
    auth_username=[COLOR=Red][B]webmaster@domain.com[/B][/COLOR]
    auth_password=[B][COLOR=Red]password[/COLOR][/B]
    
    ; if your smtp server uses pop3 before smtp authentication, modify the
    ; following three lines
    
    pop3_server=
    pop3_username=
    pop3_password=
    
    ; to force the sender to always be the following email address, uncomment and
    ; populate with a valid email address.  this will only affect the "MAIL FROM"
    ; command, it won't modify the "From: " header of the message content
    
    force_sender=[COLOR=Red][B]webmaster@domain.com[/B][/COLOR]
    
    ; sendmail will use your hostname and your default_domain in the ehlo/helo
    ; smtp greeting.  you can manually set the ehlo/helo name if required
    
    ;hostname=
    

    Once you have configured this you can save your sendmail.ini and Sendmail is configured. Its now time to move onto Step 2.

    Step 2 — Configuring PHP to use Sendmail

    You will need to open your PHP configuration (PHP.ini), you will then need to look for the [mail function] section. Once there, look for the line which asks for Sendmail path, you may notice it says for Unix only, but ignore this.

    ; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
    sendmail_path = "C:inetpubsendmailsendmail.exe -t"
    

    In this case, I am storing «sendmail.exe» in C:inetpubsendmail. If you are storing it elsewhere, be sure to declare it here. You also need to add the argument -t for it to work.

    Also ensure all other options under [mail function] is commented out using ; so that the sendmail path is the only option uncommented.

    Your [mail function] should now look something like this:

    [mail function]
    ; For Win32 only.
    ;SMTP = localhost
    ;smtp_port = 25
    
    ; For Win32 only.
    ;sendmail_from = me@example.com
    
    ; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
    sendmail_path = "C:inetpubsendmailsendmail.exe -t"
    
    ; Force the addition of the specified parameters to be passed as extra parameters
    ; to the sendmail binary. These parameters will always replace the value of
    ; the 5th parameter to mail(), even in safe mode.
    ;mail.force_extra_parameters =
    

    You have now configured PHP to use your sendmail which should in turn send the mail via your Gmail account (or whatever account you configured). Now its time to test it…

    Step 3 — Test

    You will need to now run a php script under your PHP environment which sends mail via the PHP sendmail command. In my case it was easy to test with vBulletin.

    [​IMG]

    Once you have sent the email, check the Inbox for whichever account you sent it in a couple of minutes and the email should be there!

    If you received an email, congratulations you have configured your web server perfectly :)

    If not, there could be a problem. To help with troubleshooting heres a few things to check:

    Check the error log of the PHP script and make sure it didnt have any problems running the Sendmail command in PHP.
    Check the error.log in the Sendmail.exe directory and see if it had problems logging into your SMTP server to send the mail
    Make sure the receipt is not having email problems, try it with a few people with different mail providers incase theres a problem there.

    Attached Files:


  1. ade

    ade
    New Member

    Joined:
    May 7, 2009
    Messages:
    1
    Likes Received:
    0

    thanks

    Hello, thank you, this is an excellent guide. Really helped me out.


  2. exodus

    exodus
    New Member

    Joined:
    Jun 12, 2009
    Messages:
    1
    Likes Received:
    0

    great post m8!

    i just followed your tutorial to the dot and got it to work..

    there was a slight hitch in between.. even though i changed the php.ini file, the phpinfo() on server still showed no value for sendmail parameters…

    i just restarted the server and voila.. mails came!!!

    i’m learning php and it feels nice to get things working…. thanks for your effort!


  3. neozaga

    neozaga
    New Member

    Joined:
    Jun 16, 2009
    Messages:
    2
    Likes Received:
    0

    Promblem when sending mail using fake send mail

    Hi all!

    I’m having a problem sending mail using fake sendmail, I have a windows 2003 machine with IIS and PHP,

    If i try to send mail via command line and a script I created in php, it all works fine.

    If i try to send mail via IIS I get this error:
    «Could not execute mail delivery program C:Inetpubsendmailsendmail.exe -t»

    Thanks in advance for all your help,
    Jorge

  4. Are you sure you configured your php.ini correctly? Make sure you set your sendmail directory correctly. should say, sendmail_path = «C:inetpubsendmailsendmail.exe -t» if thats the directory which you saved the sendmail program to.

    Also


  5. neozaga

    neozaga
    New Member

    Joined:
    Jun 16, 2009
    Messages:
    2
    Likes Received:
    0

    Yes, the php.ini is configured correctly, I can send e-mails if I do php.exe C:inetpubsnigdevtestemails.php in the command line, but via IIS doesn’t work.

    It seems to be a premissions issue, but I can’t find what more premissions do I have to give in the directory sendmail.exe resides.

    Thanks in advanced,
    Jorge


  6. andr

    andr
    New Member

    Joined:
    Jun 17, 2009
    Messages:
    1
    Likes Received:
    0

    neozaga,
    Check permissions for cmd.exe in system32 folder. I had the same problem. Having set Read and Execute to IUSR_MACHINENAME I’ve solved the issue.
    If doesn’t help download ProcMon and see what inetinfo.exe fails to do.


  7. scifisi

    scifisi
    New Member

    Joined:
    Sep 29, 2009
    Messages:
    2
    Likes Received:
    0

    Stunning!

    Thank you! What a great article. I’ve just written a post about this on my blog with a link to it.

    That was one of the most easy to follow — well explained and useful technical postings I’ve seen in a long time.

    I now have my Drupal site with mailhandler working like a dream — you superstar!

    Muah! — lol


  8. scifisi

    scifisi
    New Member

    Joined:
    Sep 29, 2009
    Messages:
    2
    Likes Received:
    0

    Doh!

    Looks as though I spoke a little too soon. The first test I ran no errors came back but subsequently I’m getting the same errors as everyone else:

    warning: mail() [function.mail]: Could not execute mail delivery program ‘C:inetpubsendmailsendmail.exe in W:WWWRootmydomainnameincludesmail.inc on line 193.

    I have put sendmail.exe in the same directory as you just for simplicity sake. Also my php.ini file is correct with my sendmail_path pointing to the correct place and is the only line in the [mail function] uncommented.

    I have added IUSER_(MACHINENAME) with read and execute properties to cmd.exe in windowssystem32 and rebooted my server.

    (Mail is being retrieved from the above address fine)

    Any ideas?

    Last edited: Sep 30, 2009


  9. preetim2010

    preetim2010
    New Member

    Joined:
    Mar 30, 2010
    Messages:
    1
    Likes Received:
    0

    Socket Error # 10054<EOL>Connection reset by peer.

    Hi
    I have a stand-alone PC connected only to the Internet. I work on Windows XP. I am trying to send mail in PHP using the mail() function. My working directory is c:wampwww.
    With the default settings in php.ini , i.e. SMTP=localhost and smtp_port=25, the mail() finction in PHP did not work.
    Since I do not have an SMTP server running in my standalone PC connected only to internet, I tried to use smtp of google.
    To send mail using wampserver, I followed your steps. I downloaded and installed sendmail in C:inetpubsendmail
    Then, I set default_domain=gmail.com and auth_username=myemailID@gmail.com
    auth_password=mygmailpassword

    and also set
    force_sender=myemailID@gmail.com

    Next i modified my php.ini to
    [mail function]
    ; For Win32 only.
    ;SMTP = localhost
    ;smtp_port = 25

    ; For Win32 only.
    ;sendmail_from = me@example.com

    ; For Unix only. You may supply arguments as well (default: «sendmail -t -i»).
    sendmail_path = «C:inetpubsendmailsendmail.exe -t»

    ; Force the addition of the specified parameters to be passed as extra parameters
    ; to the sendmail binary. These parameters will always replace the value of
    ; the 5th parameter to mail(), even in safe mode.
    ;mail.force_extra_parameters =

    When I ran my mail() in PHP, it gives no errors. It seems to have run successfully but the actual email is never delivered to the specified inbox. So I checked the error.log of sendmail. It says » Socket Error # 10054<EOL>Connection reset by peer.»

    What am I to do next?

    All I want to achieve is to send mail through PHP

  10. An update to this thread, Google Mail has changed its SSL security and removed support for v2 which the Sendmail.exe used. I used a fix posted up on Google Groups by Aaron, and the problem was solved.


  11. foilman

    foilman
    New Member

    Joined:
    Aug 8, 2010
    Messages:
    2
    Likes Received:
    0

    SSL is not available says error.log

    hello I downloaded sendmail configured it in a way you did. I used google smtp to do this. but got an error in error.log

    10.08.08 16:51:25 : SSL is not available on this server.

    any suggestion?

  12. Look above your post for the fix…..


  13. foilman

    foilman
    New Member

    Joined:
    Aug 8, 2010
    Messages:
    2
    Likes Received:
    0

    stunnel does not work

    I configured stunnel changed the conf in sentmail.ini but did not work…did you work this program before?


  14. strider_m

    strider_m
    New Member

    Joined:
    Sep 29, 2010
    Messages:
    2
    Likes Received:
    0

    SIt works. (stunnel ) Thank You for that guide. Check weather all parameter set. look their is

    [smtpg] 
    accept = 127.0.0.1:25 
    connect = smtp.gmail.com:465 

    copy this code directly to stunnel.ini … dont replace. there is parameter called [ssmtp]..
    u probably change ‘accept’ and ‘connect’ parameters on that……


  15. strider_m

    strider_m
    New Member

    Joined:
    Sep 29, 2010
    Messages:
    2
    Likes Received:
    0

    Thanks for Guide.. It works. Great !!!!!!!!!!!!!!!!!!!!!!


  16. snazy2000

    snazy2000
    New Member

    Joined:
    Nov 22, 2010
    Messages:
    4
    Likes Received:
    0

    Error

    Help i keep getting this

    Warning: mail() [function.mail]: Could not execute mail delivery program ‘C:InetpubDOMAINMainSendmailsendmail.exe -t’

    ve set the prmistion to all te fles nthe Sedmail folder toread an execude but it wont work?
    pleaee help

  17. The variable is right, so thats solely a permission problem which I doubt I can help you with. Just make sure whatever user the web server and php are running in, has permission to execute sendmail.exe in the directory its in.


  18. snazy2000

    snazy2000
    New Member

    Joined:
    Nov 22, 2010
    Messages:
    4
    Likes Received:
    0

    Even if i pout Everyone with full permition it still fails… :/ Please someone help!


  19. snazy2000

    snazy2000
    New Member

    Joined:
    Nov 22, 2010
    Messages:
    4
    Likes Received:
    0

Share This Page


лого sendmail

sendmail

24.01.2010
сайт автора: http://webi.ru
публикация данной статьи разрешена только со ссылкой на сайт автора статьи

В этой статье я расскажу как установить и настроить sendmail на домашнем сервере под windows.
Для начала скачайте комплект sendmail.
Если у вас уже стоит sendmail можете его удалить, а на его место скопировать скаченные файлы.
Особенно это касается тех, кто устанавливал сервер с помощью xampp.
Дело в том, что в последних версиях xampp лежит новая версия sendmail, лично я так и не смог его запустить, к тому же он работает с уже другим типом конфигурации.
Возможно проблемы с этим новым sendmail и будут решены в дальнейшем, а пока предлагаю использовать старый проверенный вариант, который работает как «трактор».
Так же в архиве лежит две библиотеки, с помощью которых sendmail может работать с защищенными соединениями TLS, типа почты гугла(gmail).

Скачали архив, распаковали, закачали файлы в папку sendmail, если такой папки нет, создайте ее.
Для xampp это путь /xampp/sendmail.
Теперь открывайте настройки sendmail.ini, в архиве находится пример этого файла с русскими комментариями.
Привожу пример файла настроек

; конфигурационный файл sendmail

[sendmail]

; здесь укажите сервер исходящей почты
smtp_server=smtp.mail.ru

; порт smtp, если обычный режим отправки, то порт будет 25
; если сервер работает в защищенном режиме (TLS), то порт 465, например почта гугла работает через 465 порт
smtp_port=25

; домен по умолчанию (совсем не обязательно)
;default_domain=local

; лог ошибок
error_logfile=error.log

; лог отправки, необходим на стадии тестирования. содержит весь текст переговоров с сервером при отправке писем.
debug_logfile=debug.log

; Если smtp сервер с авторизацией, укажите логин пароль(без кавычек), если без авторизации ничего не пишите
auth_username=
auth_password=

; если перед отправкой почты сервер требует авторизацию через POP, заполните эти поля
;pop3_server=
;pop3_username=
;pop3_password=

; email адрес, от которого идет отправка, вставится в заголовок "From: "
; если отправка писем идет через mail.ru, здесь обязательно должен быть адрес, через который произведена авторизация.

force_sender=

; хост, который указывается при авторизации в команде ehlo/helo
; указывайте домен, через который авторизуетесь

hostname=mail.ru

Вносите свои данные, логин-пароль и т.д. и все готово.
Сейчас настройте PHP, чтобы он мог использовать sendmail.
Откройте php.ini и найдите следующие строки

[mail function]
; SMTP = localhost
; smtp_port = 25
; sendmail_from = postmaster@localhost

sendmail_path = "xamppsendmailsendmail.exe -t"

Первые строки указанные здесь закройте комментарием как показано (они не нужны), нужна только последняя строка указанная здесь, это путь до sendmail. Укажите свой путь и снимите комментарий (;) если он стоит.
Теперь перегружайте сервер и все готово, функция mail() должна работать.

Если возникают проблемы с отправкой почты, смотрите файлы
error.log и debug.log в sendmail(если вы их конечно включили в настройках sendmail.ini)



Комментарии


RSS комментарии

03.12.2010 Andrei

Если у мя сервер www.server.ru , то в
smtp_server=smtp.server.ru указываю так?


04.12.2010 админ

Andrei, совсем не обязательно.
Смотря как настроен smtp сервер.
Чаще всего mail.server.ru или smtp.server.ru. А может быть и без поддомена, например просто server.ru.
Это надо узнать там, где smtp сервер находится.


05.12.2010 Sheg

Письмо почему то не доходит.
В error.log:
SSL is not available on this server.
В чём проблема, smtp Гугловский.


05.12.2010 админ

Sheg, в ошибке сказано, что ваш сервер не поддерживает SSL соединение. Гугловская почта работает только в защищенном режиме SSL, поэтому вам нужно установить поддержку SSL для sendmail.
http://webi.ru/webi_files/sendmail_ssl.html — здесь комплект с поддержкой SSL.


09.12.2010 Вячеслав.

Все настроил, при отправке письма скрипт ошибок не выдает — но в итоге, письмо для адресата так и не доходит.
В чем может быть проблема ?
Спасибо.


09.12.2010 админ

Вячеслав, включите логи.
Лог ошибок и лог отправки и посмотрите в эти файлы.
И сразу все будет ясно.

error_logfile=error.log
debug_logfile=debug.log


10.12.2010 Вячеслав.

Логи включены — ни каких сообщение об ошибках нет.


10.12.2010 Evengar

Вчера всё работало норм, сегодня письмо не доходит через мейл.ру. Ошибка Socket Error # 10054<EOL>Connection reset by peer.


11.12.2010 админ

Вячеслав, ну а в debug.log что?
Там ошибок нет, по этим логам письмо отправляется?


11.12.2010 админ

Evengar, ну если вчера отправлялось, а сегодня нет, значит проблемы с вашей связью или с сервером mail.ru


21.12.2010 Алексей

У меня sendmail даже на *.exe никак не реагирует, не говоря о скриптах, и в логах тож ниче нет(((


21.12.2010 админ

Алексей, можно подробнее? Что значит «sendmail на *.exe не реагирует»?


26.12.2010 Виталий

debug — 31457280<EOL>250-8BITMIME<EOL>250-AUTH PLAIN LOGIN<EOL>250 STARTTLS<EOL>
10.12.26 11:50:44 ** Authenticating as er45633
10.12.26 11:50:44 >> STARTTLS<EOL>
10.12.26 11:50:44 << 220 2.0.0 Start TLS<EOL>
10.12.26 11:50:44 ** Disconnected.
10.12.26 11:50:44 ** Disconnected.
10.12.26 11:50:44 ** Disconnected.
10.12.26 11:50:44 ** Socket Error # 10054<EOL>Connection reset by peer.

и письмо не отправляется в чем причина , что не так???


26.12.2010 админ

Виталий, что-то не совсем понятно. вроде начинается защищенное соединение и обрывается.
с другими серверами пробовали коннектиться?


04.01.2011 Алексей К.

Та же проблема с ошибкой:
«Socket Error # 10054<EOL>Connection reset by peer.»

И еще, по моему на Unix такой ошибки нету… Но письма все-равно не отправляются.


04.01.2011 Алексей К.

Спасибо вам большое !!!
Все получилось при использовании другого сервера почты!


04.01.2011

И еще вопрос,до каких размеров будет расти debug.log ? Или его можно отключить?


04.01.2011 админ

конечно лог отправки и лог ошибок можно отключить, просто удалите эту строку из конфига или закройте комментарием (;)

;error_logfile=error.log
;debug_logfile=debug.log


05.01.2011 Алексей К.

Спасибо еще раз! С Новым годом!!!!


10.01.2011 Alex

Подскажите пожалуйста. Я первый раз пытаюсь настроить sendmail.
Вообщем если я правильно понял настройки которые в sendmail.ini это для почты с которой будет отправляться письма, а адресс почты который указан в mail(); это куда будет производиться отправка. Если да, все делаю по примеру, почта у меня на гугле:
smtp_server=smtp.gmail.com
smtp_port=587
auth_username=name@gmail.com
auth_password=pass
force_sender=name@gmail.com
hostname=gmail.com

log из debug.log:

11.01.10 21:33:22 ** — MESSAGE END —
11.01.10 21:33:22 ** Connecting to smtp.gmail.com:465
11.01.10 21:33:23 ** Disconnected.
11.01.10 21:33:23 ** Disconnected.
11.01.10 21:33:23 ** Disconnected.
11.01.10 21:33:23 ** Error connecting with SSL.

log из error.log:

11.01.10 21:33:23 : Error connecting with SSL.

Что делать ? о_О


Добавить свой комментарий

Symptoms

Consider the following scenario:

  • You have a computer that is running Windows 7 or Windows Server 2008 R2.

  • A Transport Driver Interface (TDI) filter driver is installed on the computer. For example, a TDI filter driver is installed when you install McAfee VirusScan.

  • An application opens a TCP listening port to receive connections.

In this scenario, the application may receive the following error message:

WSAECONNRESET (10054) Connection reset by peer.
A existing connection was forcibly closed by the remote host.

This issue occurs because the TCP/IP driver does not close an incomplete TCP connection. Instead, the TCP/IP driver sends a notification that the TCP/IP driver is ready to receive data when the incomplete TCP connection is created. Therefore, the application receives an instance of the 10054 error that indicates that a connection is reset when the application receives data from the connection.

Resolution

To resolve this issue, install this hotfix.

Note This hotfix temporarily resolves this issue for application vendors before they migrate their implementation to Windows Filtering Platform (WFP). These application vendors use the TDI filter driver or the TDI extension driver (TDX) on a computer that is running Windows 7 or Windows Server 2008 R2.

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a «Hotfix download available» section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=supportNote The «Hotfix download available» form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

To apply this hotfix, you must be running Windows 7 or Windows Server 2008 R2.

Registry information

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:

322756 How to back up and restore the registry in WindowsTo enable the hotfix in this package, follow these steps:

  1. In Registry Editor, locate the following registry subkey:

    HKEY_LOCAL_MACHINESYSTEMCurrentControlSetservicesTcpipParameters

  2. If you are running a 32-bit operating system, perform the following step:

    Right-click the Parameters registry subkey, point to New, and then click DWORD Value.If you are running a 64-bit operating system, perform the following step:

    Right-click the Parameters registry subkey, point to New, and then click DWORD (32-bit) Value.

  3. Rename the new registry entry to TdxPrematureConnectIndDisabled and set the value to 1.

Restart requirement

You may have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace a previously released hotfix.

File information

The global version of this hotfix installs files that have the attributes that are listed in the following tables. The dates and the times for these files are listed in Coordinated Universal Time (UTC). The dates and the times for these files on your local computer are displayed in your local time together with your current daylight saving time (DST) bias. Additionally, the dates and the times may change when you perform certain operations on the files.

Windows 7 and Windows Server 2008 R2 file information notes


Important Windows 7 hotfixes and Windows Server 2008 R2 hotfixes are included in the same packages. However, hotfixes on the Hotfix Request page are listed under both operating systems. To request the hotfix package that applies to one or both operating systems, select the hotfix that is listed under «Windows 7/Windows Server 2008 R2» on the page. Always refer to the «Applies To» section in articles to determine the actual operating system that each hotfix applies to.

  • The MANIFEST files (.manifest) and the MUM files (.mum) that are installed for each environment are listed separately in the «Additional file information for Windows Server 2008 R2 and for Windows 7» section. MUM and MANIFEST files, and the associated security catalog (.cat) files, are extremely important to maintain the state of the updated components. The security catalog files, for which the attributes are not listed, are signed with a Microsoft digital signature.

For all supported x86-based versions of Windows 7

File name

File version

File size

Date

Time

Platform

Tdx.sys

6.1.7600.20796

74,752

09-Sep-2010

02:19

x86

For all supported x64-based versions of Windows 7 and of Windows Server 2008 R2

File name

File version

File size

Date

Time

Platform

Tdx.sys

6.1.7600.20796

101,376

09-Sep-2010

02:52

x64

For all supported IA-64-based versions of Windows Server 2008 R2

File name

File version

File size

Date

Time

Platform

Tdx.sys

6.1.7600.20796

236,032

09-Sep-2010

01:47

IA-64

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.

More Information

For more information about WFP, visit the following Microsoft website:

General information about WFPFor more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Additional file information

Additional file information for Windows 7 and for Windows Server 2008 R2

Additional files for all supported x86-based versions of Windows 7

File name

Package_1_for_kb981344~31bf3856ad364e35~x86~~6.1.2.0.mum

File version

Not Applicable

File size

1,820

Date (UTC)

09-Sep-2010

Time (UTC)

18:48

Platform

Not Applicable

File name

Package_2_for_kb981344~31bf3856ad364e35~x86~~6.1.2.0.mum

File version

Not Applicable

File size

1,825

Date (UTC)

09-Sep-2010

Time (UTC)

18:48

Platform

Not Applicable

File name

Package_3_for_kb981344~31bf3856ad364e35~x86~~6.1.2.0.mum

File version

Not Applicable

File size

1,805

Date (UTC)

09-Sep-2010

Time (UTC)

18:48

Platform

Not Applicable

File name

Package_for_kb981344_rtm~31bf3856ad364e35~x86~~6.1.2.0.mum

File version

Not Applicable

File size

2,421

Date (UTC)

09-Sep-2010

Time (UTC)

18:48

Platform

Not Applicable

File name

X86_bfb7f2e54887b839240a44ae0de89137_31bf3856ad364e35_6.1.7600.20796_none_3f3df7432361a4c5.manifest

File version

Not Applicable

File size

702

Date (UTC)

09-Sep-2010

Time (UTC)

18:48

Platform

Not Applicable

File name

X86_microsoft-windows-tdi-over-tcpip_31bf3856ad364e35_6.1.7600.20796_none_ea93f14a568e0aaf.manifest

File version

Not Applicable

File size

2,924

Date (UTC)

09-Sep-2010

Time (UTC)

04:58

Platform

Not Applicable

Additional files for all supported x64-based versions of Windows 7 and of Windows Server 2008 R2

File name

Amd64_8e30a6e4951f89c20ce3f8a1c04b9f2a_31bf3856ad364e35_6.1.7600.20796_none_8d28eb4c99ddf2d4.manifest

File version

Not Applicable

File size

706

Date (UTC)

09-Sep-2010

Time (UTC)

18:48

Platform

Not Applicable

File name

Amd64_microsoft-windows-tdi-over-tcpip_31bf3856ad364e35_6.1.7600.20796_none_46b28cce0eeb7be5.manifest

File version

Not Applicable

File size

2,926

Date (UTC)

09-Sep-2010

Time (UTC)

06:11

Platform

Not Applicable

File name

Package_1_for_kb981344~31bf3856ad364e35~amd64~~6.1.2.0.mum

File version

Not Applicable

File size

1,830

Date (UTC)

09-Sep-2010

Time (UTC)

18:48

Platform

Not Applicable

File name

Package_2_for_kb981344~31bf3856ad364e35~amd64~~6.1.2.0.mum

File version

Not Applicable

File size

2,057

Date (UTC)

09-Sep-2010

Time (UTC)

18:48

Platform

Not Applicable

File name

Package_3_for_kb981344~31bf3856ad364e35~amd64~~6.1.2.0.mum

File version

Not Applicable

File size

1,815

Date (UTC)

09-Sep-2010

Time (UTC)

18:48

Platform

Not Applicable

File name

Package_for_kb981344_rtm~31bf3856ad364e35~amd64~~6.1.2.0.mum

File version

Not Applicable

File size

2,659

Date (UTC)

09-Sep-2010

Time (UTC)

18:48

Platform

Not Applicable

Additional files for all supported IA-64-based versions of Windows Server 2008 R2

File name

Ia64_0bb425f9d3502a4be9efc4af61147428_31bf3856ad364e35_6.1.7600.20796_none_09467879be47b542.manifest

File version

Not Applicable

File size

704

Date (UTC)

09-Sep-2010

Time (UTC)

18:48

Platform

Not Applicable

File name

Ia64_microsoft-windows-tdi-over-tcpip_31bf3856ad364e35_6.1.7600.20796_none_ea959540568c13ab.manifest

File version

Not Applicable

File size

2,925

Date (UTC)

09-Sep-2010

Time (UTC)

05:48

Platform

Not Applicable

File name

Package_1_for_kb981344~31bf3856ad364e35~ia64~~6.1.2.0.mum

File version

Not Applicable

File size

2,051

Date (UTC)

09-Sep-2010

Time (UTC)

18:48

Platform

Not Applicable

File name

Package_for_kb981344_rtm~31bf3856ad364e35~ia64~~6.1.2.0.mum

File version

Not Applicable

File size

1,683

Date (UTC)

09-Sep-2010

Time (UTC)

18:48

Platform

Not Applicable

Need more help?

I receive the ftp socket error 10054 when I try to connect to FTP for an upload. Please fix this problem.

That was a recent support ticket received from one of our customers as part of our Dedicated Support Services.

This FTP error occurs when the existing remote connection is forcibly closed by the remote host.

Today, let’s see the top 6 reasons for the ftp socket error 10054 and how our Support Engineers fix them.

FTP socket error 10054 – A Brief explanation

A socket is the endpoint of client-server communication.

FTP socket error 10054 indicates that the remote host has forcibly terminated or reset the existing connection of the FTP client. And, users see the complete error message as shown below.

Upload failed.
Socket Error # 10054
Connection reset by peer.

This broken connection can be at the FTP server side or at the user’s side. So, our Support Engineers primarily check the server logs to determine if this is a network error at the client side or at the server side.

FTP socket error 10054 – Reasons & Solutions

Now, let’s see the main causes of this error and how our Support Engineers rule out each possibility to fix this problem.

1) Remote server issues

FTP socket error 10054 can occur due to the problems at the remote server end. This error usually occurs during the following scenarios.

  • The remote host is suddenly rebooted or restarted.
  • Network interface of the remote server is disabled.
  • User’s account on the remote server is disabled or restricted.
  • Too many users logged on to the server.
How we fix?

Firstly, our Support Experts check the availability of the remote host using the ping command.

ping test.remotehost.com

In addition to that, we check the uptime of the server to verify that a reboot has been initiated on the server.

uptime

Thus, we can confirm whether the server reboot created problems for the user. Moreover, we ensure that the network settings on the server are intact and the FTP user is allowed to connect to the remote host.

2) Invalid FTP host

Once we’ve confirmed that there are no issues at the remote host, we then check the FTP client settings. And, one of the common reasons for this error is the use of invalid FTP host address.

Users should enter the hostname details in the FTP host field to initiate a connection. For example, customers usually give it as ftp.servername.com or servername.com.

However, a typo in the FTP hostname or missing hostname field can result in this error. Even a single additional space in the FTP hostname can create problems.

How we fix?

Firstly our Support Experts confirm the DNS connectivity of the FTP host using the dig command.

dig ftp.servername.com

Further, we double check and confirm that customer is using the correct FTP host address in their FTP client.

3) Firewall restrictions

Similarly, firewalls can act up and break the FTP connection. Moreover, Antivirus or Antispyware tools can act as a second layer firewall and close the connections. Even the firewalls at the ISP end, firewall on a router can block connections through FTP ports.

How we fix?

In such cases, we ask the customers to temporarily disable the security applications such as Windows firewall, Antivirus, etc. one by one on their system. This helps us to identify the application that’s exactly creating problems and fix it’s settings.

Likewise, to resolve the firewall issues at the network level, our Support Engineers ask the customers to disable gateways and routers to establish a direct connection. Thus, we can verify if the problem lies at the intermediate level. Once we’ve confirmed that the problem is with the intermediate devices, we ask the customers to work with their ISPs to configure ISP firewall to allow connections to FTP ports.

[Messed up firewall rules on your server? Click here and get one of our Server Experts to fix your firewall rules.]

4) Issues with File transfer mode

File transfer can happen in 2 types – Active and Passive mode, and most of the FTP clients use Passive mode by default. However, some remote servers accept the connections only in Active mode or PORT mode resulting in this error.

How we fix?

The steps to enable Active mode differs based on the FTP client software used by the customers.

So, our Dedicated Engineers get the FTP client details from the users, and help them navigate the settings and enable Active mode. For example, we enable Active mode in Filezilla from Site Manager > Transfer settings > Transfer mode.

5) Connection timeout issues

Ftp socket error 10054 occurs when users try to upload relatively large files which conflict with the internal timeout settings of the FTP client. In other words, when user uploads a large file, the upload process may fail if it’s not completed within the predefined connection timeout limit.

How we fix?

In such cases, we recommend users to increase the connection timeout settings in their FTP client. For example, we increase the connection timeout limit from Edit > Settings > Connection > Timeout > Timeout in seconds.

Alternatively, in some cases we disable this timeout value by making it’s value as 0.

6) Advanced FTP client settings

Some of the FTP clients such as CuteFTP use advanced configurations which may not be compatible with the remote server you’re connecting. For example, some remote servers may be configured to allow only a limited number of connections or sessions. However, some users configure their FTP client to set large number of concurrent file transfers. In such cases, remote server terminates the connection and result in ftp socket error 10054.

Similarly, users set large values for send and receive buffer sizes in their FTP client settings. However, this may conflict with the remote server values and causes problems.

How we fix?

In such cases, our Dedicated Engineers help the customers navigate the FTP client settings and limit the number of concurrent connections. For example, on CuteFTP client, we change this parameter from Tools > Global options > Connection > Per site max concurrent transfers >Transfer.

Moreover, we tweak the send and receive buffer size values accordingly. For instance, we change the buffer size from Tools > Global options > Transfer in CuteFTP.

[Need help in resolving your FTP issue? Our Support Experts can help you here.]

Conclusion

In short, ftp socket error 10054 can occur due to remote server issues, firewall restrictions, and more. Today, we’ve discussed the top 6 reasons for this error and how our Dedicated Engineers fix them.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

1. Ошибка при попытке передать почту на почтовый ящик. 

Описание ошибки
Ошибка Outlook. Ошибка сокета: 10054.
 Код ошибки: 0x800CCC0E

Ошибка при соединении с сервером. Учетная запись: ‘КартинаM’, Сервер: ‘smtp.mail.ru’, Протокол: SMTP, Порт: 25, Защита (SSL): Нет, Ошибка сокета: 10054, Код ошибки: 0x800CCC0E

1.1 Собрал файлы, описывающие ошибку сокета 10054  и другие ошибки Winsock. Также собрал файлы описывающие код ошибки 0x800CCC0E и другие почтовой программы Outlook. Все в одном файле — здесь: 10054-800CCC0E.rar или здесь : 10054-800CCC0E.rar

2.   Ошибка сокета: 10054

2.1 Вот что говорит Help  Microsoft Windows Sockets 2 Reference 

WSAECONNRESET      (10054)      Connection reset by peer.

A existing connection was forcibly closed by the remote host. This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, or the remote host used a «hard close» (see setsockopt for more information on the SO_LINGER option on the remote socket.)

 

2.2   Без описаний список  кодов всех ошибок WinSock  можно найти из файлов WinSock.pas и winsock.h 

2.3   Список кодов ошибок и краткое описание ошибок от Microsoft MSDN  Windows Sockets Error Codes и  от Microsoft Support   Windows sockets error codes, values, and meanings

2.4   На русском языке   Коды ошибок TCP/IP    описывают ошибку 10054 следующим образом :

10054   

WSAECONNRESET   Connection reset by peer (Соединение сброшено удаленной системой).

Существующее соединение принудительно закрыто удаленной стороной. Обычно это случается в случае неожиданного останова приложения на удаленной стороне, при перезагрузке удаленной машины, или в случае, когда удаленный хост использует «жесткое закрытие» ( setsockopt(SO_LINGER)) удаленного сокета.

2.5 По ссылке  Socket error 10054 when testing email alerts  описана ошибка и несколько возможных причин

This error happens when a connection is started (and working), but then closed by the other side of things before the SMTP conversation is completed

There are several common reasons:

  • The wrong SMTP server was specified (Edit -> Options, Email). Check your email client to see what it’s using for an SMTP server, or talk to your system administratory.
  • There is a firewall or antivirus package running that’s aborting the SMTP conversation. This might be something running on your machine (like Norton Antivirus), or some hardware firewall that does stateful inspection. If other software works, but PingPlotter/MultiPing does not, then it’s probably local to your machine — something that is filtering by which application is sending data.
  • There might be something wrong with the SMTP server. Try using another email client and make sure the same SMTP server works with that.

2.6   По описанию ошибки сокета 10054   можно сделать предварительный вывод, что соединение начинает работать,  следовательно ,скорее всего,  с сетью проблем нет. Однако какие то проблемы с сервером ‘smtp.mail.ru’  (в данном конкретном случае).Если ошибка не устраняется сама через некоторое время, то скорее всего, ошибка в настройках SMTP — сервера  Надо внимательно проверить настройки SMTP- сервера.

3. Код ошибки: 0x800CCC0E

0x800CCC0E     IXP_E_FAILED_TO_CONNECT       Не удается подключиться к серверу

3.2. В интернет документе   Коды ошибок электронной почты  приведены некоторые методы устранения  этой и некоторых других ошибок:

0x800CCC0E     FAILED_TO_CONNECT. Не удается подключиться к серверу

—Если Нортон Антивирус установлен, то возможно проблема в нем .

—Можете ли вы открыть веб-страницы? Если это так, то вы может просто неправильно ввели адрес почтового сервера  на учетной записи или сервер именно сейчас может быть недоступен.

—Если вы не можете открыть веб-страницы, то разорвите интернет соединение и попробуйте подключиться снова

—Перезагрузите компьютер и повторите попытку.

—Если он по-прежнему не работает, и вы не получаете любые веб-страницы, то данные могут передаваться через сеть надлежащим образом. Проверить настройки DNS, удалить и переустановить TCP / IP в Панель управления> Сеть (Control Panel > Network).

—Можно попробовать удалить кэш DNS командой ipconfig /flushdns (Пуск -> Все программы -> Стандартные -> Командная строка. Вести в командную строку ipconfig /flushdns)

—Эта ошибка может появиться, если у вас есть опция ‘уведомьте меня, если есть какие-нибудь новые группы новостей’ выбран, но не имеете созданной учетной записи новостей. Зайдите в меню Сервис> Свойства обозревателя> Общие TAB (TOOLS > OPTIONS > GENERAL TAB) и отключите эту опцию.

3.3 В описаниях ошибки сказано , что возможно вы неправильно ввели адрес сервера в учетной записи . Так что в совокупности ошибок сокета и Outlook –а , вероятнее всего какая то ошибка в настройках  сервера ‘smtp.mail.ru’.

4. Причина ошибки.

—Оказалась в настройках сервера ‘smtp.mail.ru’  Надо было заменить порт сервера на 587.Раньше стоял 25. Видимо, на mail.ru  решили отключить 25 порт, на котором работал сервер раньше

Правильная настройка

5. Повторю . Собрал файлы, описывающие ошибку сокета 10054  и другие ошибки Winsock. Также собрал файлы описывающие код ошибки 0x800CCC0E и другие почтовой программы Outlook. Все в одном файле — здесь: 10054-800CCC0E.rar  или здесь : 10054-800CCC0E.rar 

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Socket error 10054 connection reset by peer что это
  • Socket error 10054 connection reset by peer перевод
  • Socket error 10054 connection reset by peer как исправить
  • Socket error 10054 connection reset by peer effector saver
  • Socket error 10054 connection reset by peer delphi

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии