V
V
VaaL20042014-01-14 23:48:28
PHP
VaaL2004, 2014-01-14 23:48:28

How to properly configure the windows->iis->php->sendmail->hmailserver link?

Hello!
There is a server on Windows 2008 R2 on which IIS7+PHP 5.5.6 is lifted.
There is also a configured hmailserver. Telnet connects to it perfectly, letters go, external clients (I tried The Bat!) also work. They send letters both inside the server and outside.
I downloaded www.glob.com.au/sendmail/sendmail.zip, threw it into a folder, wrote in php.ini:

smtp_port = 587
sendmail_path = "C:\php\sendmail\sendmail.exe -t"

Next, I wrote the settings in sendmail.ini:
[sendmail]
smtp_server=worldofmonopoly.ru
smtp_port=587
default_domain=worldofmonopoly.ru
error_logfile=error.log
debug_logfile=debug.log
[email protected]
auth_password=mypass
;pop3_server=
;pop3_username=
;pop3_password=
force_sender=
hostname=

However, if you use the mail() function in php, then sendmail just falls out.
A crash.txt file is created, with the content:
date/time         : 2014-01-15, 00:27:27, 706ms
computer name     : SD-137-223
user name         : IUSR
registered owner  : Пользователь Windows
operating system  : Windows NT New x64 Service Pack 1 build 7601
system language   : Russian
system up time    : 1 hour 10 minutes
program up time   : 73 milliseconds
processors        : 3x Intel(R) Xeon(R) CPU E5-2620 0 @ 2.00GHz
physical memory   : 339/3600 MB (free/total)
free disk space   : (C:) 14,23 GB
display mode      : 1024x768, 32 bit
process id        : $bf0
allocated memory  : 9,44 MB
command line      : C:\php\sendmail\sendmail.exe -t
executable        : sendmail.exe
exec. date/time   : 2008-12-02 23:09
compiled with     : Delphi 2006/07
madExcept version : 3.0h
callstack crc     : $ecbb6b3b, $ec454833, $ec454833
exception number  : 1
exception class   : EInOutError
exception message : I/O error 105.

main thread ($cb0):
004ac049 +15e1 sendmail.exe sendmail       846 +393 initialization
7763012e +000a ntdll.dll                            KiUserExceptionDispatcher
004046dd +001d sendmail.exe System          53   +0 @AfterConstruction
004406a5 +0031 sendmail.exe IdEMailAddress 736   +2 TIdEMailAddressItem.Create
004046dd +001d sendmail.exe System          53   +0 @AfterConstruction
76263368 +0010 kernel32.dll                         BaseThreadInitThunk

thread $a0c:
76263368 +10 kernel32.dll  BaseThreadInitThunk

modules:
00400000 sendmail.exe                    C:\php\sendmail
6bb60000 wsock32.dll    6.1.7600.16385   C:\Windows\system32
6d4d0000 comctl32.dll   5.82.7601.18201  C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18201_none_ec80f00e8593ece5
73390000 version.dll    6.1.7600.16385   C:\Windows\system32
74600000 winrnr.dll     6.1.7600.16385   C:\Windows\System32
74610000 napinsp.dll    6.1.7600.16385   C:\Windows\system32
74620000 NLAapi.dll     6.1.7601.17761   C:\Windows\system32
74b60000 mswsock.dll    6.1.7601.17514   C:\Windows\System32
74ba0000 DNSAPI.dll     6.1.7601.17570   C:\Windows\system32
74cf0000 CRYPTBASE.dll  6.1.7600.16385   C:\Windows\syswow64
74d00000 SspiCli.dll    6.1.7601.17940   C:\Windows\syswow64
74f00000 LPK.dll        6.1.7601.18177   C:\Windows\syswow64
75030000 RPCRT4.dll     6.1.7601.17514   C:\Windows\syswow64
75120000 oleaut32.dll   6.1.7601.17676   C:\Windows\syswow64
751c0000 shell32.dll    6.1.7601.18222   C:\Windows\syswow64
75e10000 NSI.dll        6.1.7600.16385   C:\Windows\syswow64
75e20000 ole32.dll      6.1.7601.17514   C:\Windows\syswow64
760a0000 sechost.dll    6.1.7600.16385   C:\Windows\SysWOW64
76150000 USER32.dll     6.1.7601.17514   C:\Windows\syswow64
76250000 kernel32.dll   6.1.7601.18229   C:\Windows\syswow64
76370000 IMM32.DLL      6.1.7601.17514   C:\Windows\system32
763d0000 KERNELBASE.dll 6.1.7601.18229   C:\Windows\syswow64
76420000 ADVAPI32.dll   6.1.7601.17514   C:\Windows\syswow64
764f0000 comdlg32.dll   6.1.7601.17514   C:\Windows\syswow64
76570000 MSCTF.dll      6.1.7600.16385   C:\Windows\syswow64
76670000 WS2_32.dll     6.1.7601.17514   C:\Windows\syswow64
766b0000 USP10.dll      1.626.7601.18009 C:\Windows\syswow64
769d0000 GDI32.dll      6.1.7601.17514   C:\Windows\syswow64
76a60000 SHLWAPI.dll    6.1.7601.17514   C:\Windows\syswow64
76cb0000 msvcrt.dll     7.0.7601.17744   C:\Windows\syswow64
77620000 ntdll.dll      6.1.7601.18229   C:\Windows\SysWOW64

processes:
000 Idle              0
004 System            0
15c smss.exe          0
1b4 csrss.exe         0
1dc csrss.exe         1
1e4 wininit.exe       0
1fc winlogon.exe      1
240 services.exe      0
248 lsass.exe         0
250 lsm.exe           0
2a8 svchost.exe       0
2f8 svchost.exe       0
344 LogonUI.exe       1
358 svchost.exe       0
384 svchost.exe       0
3c4 svchost.exe       0
3e8 svchost.exe       0
170 svchost.exe       0
1e0 svchost.exe       0
474 spoolsv.exe       0
490 svchost.exe       0
4e4 svchost.exe       0
500 svchost.exe       0
51c inetinfo.exe      0
5b0 mysqld.exe        0
5f8 svchost.exe       0
618 svchost.exe       0
7e4 hMailServer.exe   0
350 svchost.exe       0
7d0 svchost.exe       0
904 csrss.exe         2
91c winlogon.exe      2
aa0 taskhost.exe      2
b54 rdpclip.exe       2
bc0 dwm.exe           2
bd4 explorer.exe      2
780 MySQLNotifier.exe 2
75c murmur.exe        2
8c8 WOMmessengerp.exe 2
c20 msdtc.exe         0
fe0 TOTALCMD64.EXE    2
6b4 WmiPrvSE.exe      0
f38 wuauclt.exe       2
b8c explorer.exe      2
ea0 InetMgr.exe       2
fa8 taskmgr.exe       2
694 mmc.exe           2
b00 w3wp.exe          0
b80 php-cgi.exe       0
444 cmd.exe           0 normal
4c8 conhost.exe       0 normal
bf0 sendmail.exe      0 normal C:\php\sendmail


stack dump:
0018f7a8  49 c0 4a 00 de fa ed 0e - 01 00 00 00 07 00 00 00  I.J.............
0018f7b8  bc f7 18 00 49 c0 4a 00 - 20 f6 bd 00 49 c0 4a 00  ....I.J.....I.J.
0018f7c8  49 c0 4a 00 3c fe 18 00 - 88 ff 18 00 d8 f7 18 00  I.J.<...........
0018f7d8  00 00 00 00 f0 2f 40 00 - 00 00 00 00 0a c0 4a 00  ...../@.......J.
0018f7e8  49 c0 4a 00 00 00 00 00 - c5 b4 4a 00 20 53 bd 00  I.J.......J..S..
0018f7f8  f8 f8 18 00 24 f8 18 00 - 30 f8 18 00 00 00 00 00  ....$...0.......
0018f808  00 00 00 00 00 00 00 00 - 99 b4 67 77 f8 f8 18 00  ..........gw....
0018f818  3c fe 18 00 48 f9 18 00 - cc f8 18 00 30 fe 18 00  <...H.......0...
0018f828  ad b4 67 77 3c fe 18 00 - e0 f8 18 00 6b b4 67 77  ..gw<.......k.gw
0018f838  f8 f8 18 00 3c fe 18 00 - 48 f9 18 00 cc f8 18 00  ....<...H.......
0018f848  01 c0 4a 00 00 00 00 00 - f8 f8 18 00 3c fe 18 00  ..J.........<...
0018f858  0e b4 67 77 f8 f8 18 00 - 3c fe 18 00 48 f9 18 00  ..gw....<...H...
0018f868  cc f8 18 00 01 c0 4a 00 - 00 00 00 00 f8 f8 18 00  ......J.........
0018f878  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
0018f888  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
0018f898  02 01 00 00 5c f8 18 00 - 00 00 00 00 58 fc 18 00  ....\.......X...
0018f8a8  02 00 00 00 30 b5 6b 00 - 00 00 00 00 01 00 00 08  ....0.k.........
0018f8b8  f4 17 3e 76 c8 00 00 00 - 00 00 00 00 00 00 00 00  ..>v............
0018f8c8  e4 f8 18 00 d0 49 40 76 - 00 00 00 00 00 00 19 00  [email protected]
0018f8d8  00 c0 18 00 20 19 41 00 - fc fd 18 00 33 01 63 77  ......A.....3.cw

disassembling:
[...]
004ac02f       mov     edx, [ebp-$128]
004ac035       mov     eax, [$4b2550]
004ac03a       call    -$a6587 ($405ab8)      ; [email protected]
004ac03f       call    -$a82d8 ($403d6c)      ; [email protected]
004ac044       call    -$a901d ($40302c)      ; [email protected]_IOTest
004ac049 846 > mov     eax, [$4b9cfc]
004ac04e       mov     eax, [eax+4]
004ac051       call    -$35da ($4a8a7c)       ; sendmail.errorLog
004ac056 848   call    -$a73b7 ($404ca4)      ; [email protected]
004ac05b       call    -$a7368 ($404cf8)      ; [email protected]
004ac060 855   xor     eax, eax
[...]

However, in sendmail's debug.log, the text of the letter is present in a normal form, which indicates that everything normally comes from php to sendmail.
There is nothing in the hmailserver logs at all. He doesn't get there.
Help me understand where I went wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
VaaL2004, 2014-01-15
@VaaL2004

Sendmail is not needed, you need to directly specify the address of the smtp server (hmailserver).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question