Page 1 of 1

some mail problems

Posted: Sat Jul 04, 2009 2:19 pm
by exa
Hi there,

I came accross a very strange problem with /tool email. When invoked, mikrotik tries to send the mail, but fails, with message "server is not ready".

On the SMTP server (which is properly configured, working and tested, i made this for sure), I see only following error in the postfix log:

(IPs are x'ed)
Jul  4 12:14:59 [postfix/smtpd] connect from unknown[192.168.xxx.xxx]
Jul  4 12:14:59 [postfix/smtpd] disconnect from unknown[192.168.xxx.xxx]
Such behavior seems strange - like mikrotik didn't even try to send the mail. Further investigation lead me to enabling verbose logging on SMTP, which returned that roughly this conversation takes place between mikrotik and smtp:
Jul  3 23:16:19 [postfix/smtpd] > unknown[192.168.xxx.xxx]: 220 xx--mailserver-name-xx
Jul  3 23:16:19 [postfix/smtpd] < unknown[192.168.xxx.xxx]: RSET
Jul  3 23:16:19 [postfix/smtpd] > unknown[192.168.xxx.xxx]: 250 2.0.0 Ok
Jul  3 23:16:19 [postfix/smtpd] < unknown[192.168.xxx.xxx]: QUIT
Jul  3 23:16:19 [postfix/smtpd] > unknown[192.168.xxx.xxx]: 221 2.0.0 Bye
So for me it seems that mikrotik just quits the session and doesn't try to do anything. Notice that this doesn't happen really everytime, just only in like 99.9% cases (which is really bad though) - because of that i'm suspecting some kind of race condition bug in mikrotik SMTP client tool.

Anyway - Has anyone seen this before? If so, is there any known solution?

It would be great if only anyone from mikrotik staff here would be so kind and at least comment on where to try to find the errors. :D

Thanks in advance
exa

Re: some mail problems

Posted: Mon Jul 06, 2009 4:49 pm
by mrz
enable debug logs on router
/system logging add topics=e-mail

what version you are running?

Re: some mail problems

Posted: Mon Jul 06, 2009 9:12 pm
by exa
Hm, i finally came to the problem - something just delays the connection for those 20 seconds between the two boxes, so I guess mikrotik just timeouts and then asks the smtp nicely to quit (no idea how the mail sending code is written, but looks like a fair guess doesnt it :D )

the thing between is a machine that also runs smtp redirection, i will try to somehow fix the redirection rule (done with dst-nat now). (Anyone who would know how dst-nat would mess with that..please help ;) )

Anyway, thanks for concern, seems solved, problem is elsewhere.
exa

Re: some mail problems

Posted: Wed Jul 08, 2009 12:46 am
by Chupaka
(Anyone who would know how dst-nat would mess with that..please help ;) )
you cannot dst-nat to the same subnet =)