PHP and Ruby send mail configuration help

Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems

Moderator: Qbik Staff

PHP and Ruby send mail configuration help

Postby suporteagro » Jul 29 14 7:15 am

Hi,

I'm trying to install two bug tracking tools im my company: MantisBT and RedMine.
These tools use PHP and Ruby to send e-mails to the users and I'm having troubles to configure them.

Looking at the SMTP Debug I encountered a "504 command parameter not implemented" message and "Cliente closed connection unexpectedly expecting MAIL - termination" error.

Could you help me ?
I use Wingate 6.6.4 (Build 1338).

Thanks,
Gabriel
suporteagro
 
Posts: 30
Joined: Dec 23 08 1:15 am

Re: PHP and Ruby send mail configuration help

Postby adrien » Jul 29 14 7:16 pm

Hi Gabriel

if you turn on debug logging in the SMTP server, you'll be able to see what commands the clients are sending. Post them here or send them to our support desk and we can help you decipher them.

Regards

Adrien de Croy
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: PHP and Ruby send mail configuration help

Postby suporteagro » Jul 31 14 7:55 am

Hi Adrien,

When I try this configuration in RedMine:

# Outgoing emails configuration
email_delivery:
delivery_method: :smtp
smtp_settings:
enable_starttls_auto: true
address: 192.168.0.3
port: 587
domain: 'RedMine'
authentication: :plain
user_name: gabriel
password: password

Wingate SMTP Log says:

07/30/14 15:47:34 192.168.0.126 gabriel 0000015569 Created:
07/30/14 15:47:34 192.168.0.126 gabriel 0000015569 Debug: <=S: 220 agroalimentos.com.br ESMTP Service ready
07/30/14 15:47:34 192.168.0.126 gabriel 0000015569 Debug: C=>: EHLO RedMine
07/30/14 15:47:34 192.168.0.126 gabriel 0000015569 Debug: <=S: 250-agroalimentos.com.br greets you
07/30/14 15:47:34 192.168.0.126 gabriel 0000015569 Debug: <=S: 250-AUTH CRAM-MD5
07/30/14 15:47:34 192.168.0.126 gabriel 0000015569 Debug: <=S: 250 SIZE 0
07/30/14 15:47:34 192.168.0.126 gabriel 0000015569 Debug: C=>: AUTH PLAIN AGdhYnJpZWwyAGxlc21h
07/30/14 15:47:34 192.168.0.126 gabriel 0000015569 Debug: <=S: 504 Command parameter not implemented
07/30/14 15:47:34 192.168.0.126 gabriel 0000015569 Error: Client closed connection unexpectedly expecting MAIL - terminating
07/30/14 15:47:34 192.168.0.126 gabriel 0000015569 Traffic 153 47 0 0 0s
07/30/14 15:47:34 192.168.0.126 gabriel 0000015569 Terminated exit code 0

And when I tray this

# Outgoing emails configuration
email_delivery:
delivery_method: :smtp
smtp_settings:
address: 192.168.0.3
port: 587
domain: 'RedMine'
authentication: :login
user_name: gabriel
password: password

And Wingate SMTP Server log debug always says:

07/30/14 15:53:49 192.168.0.126 gabriel 0000017444 Created:
07/30/14 15:53:49 192.168.0.126 gabriel 0000017444 Debug: <=S: 220 agroalimentos.com.br ESMTP Service ready
07/30/14 15:53:49 192.168.0.126 gabriel 0000017444 Debug: C=>: EHLO RedMine
07/30/14 15:53:49 192.168.0.126 gabriel 0000017444 Debug: <=S: 250-agroalimentos.com.br greets you
07/30/14 15:53:49 192.168.0.126 gabriel 0000017444 Debug: <=S: 250-AUTH CRAM-MD5
07/30/14 15:53:49 192.168.0.126 gabriel 0000017444 Debug: <=S: 250 SIZE 0
07/30/14 15:53:49 192.168.0.126 gabriel 0000017444 Debug: C=>: AUTH LOGIN
07/30/14 15:53:49 192.168.0.126 gabriel 0000017444 Debug: <=S: 504 Command parameter not implemented
07/30/14 15:53:50 192.168.0.126 gabriel 0000017444 Error: Client closed connection unexpectedly expecting MAIL - terminating
07/30/14 15:53:50 192.168.0.126 gabriel 0000017444 Traffic 153 26 0 0 1s
07/30/14 15:53:50 192.168.0.126 gabriel 0000017444 Terminated exit code 0


Thanks,
Gabriel
suporteagro
 
Posts: 30
Joined: Dec 23 08 1:15 am

Re: PHP and Ruby send mail configuration help

Postby adrien » Jul 31 14 9:41 pm

HI gabriel

the script is attempting to use a login method that is not published by WinGate. So that's a bug in the client.

250-AUTH CRAM-MD5

indicates that only CRAM-MD5 is available, yet the client tries to use

AUTH PLAIN AGdhYnJpZWwyAGxlc21h

and

AUTH LOGIN

so that 504 response is entirely justified.

Having said all that, WinGate 7 onwards supports PLAIN and LOGIN for SMTP so this issue would likely go away.

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: PHP and Ruby send mail configuration help

Postby suporteagro » Aug 01 14 2:31 am

Hi Adrien,

With your explanation, I found the solution.
Correcting the authentication method like this:

authentication: :cram_md5

RedMine worked fine.

Thank you !!

Regards,
Gabriel
suporteagro
 
Posts: 30
Joined: Dec 23 08 1:15 am


Return to WinGate

Who is online

Users browsing this forum: No registered users and 2 guests