strider icon indicating copy to clipboard operation
strider copied to clipboard

Question about SMTP

Open sweco-sehrbe opened this issue 12 years ago • 15 comments

How do I configure strider not to use authentication for SMTP?

I always gets this in my log: Error sending email: { [AuthError: Invalid login - 502 unimplemented (#5.5.1)]

sweco-sehrbe avatar Sep 26 '14 21:09 sweco-sehrbe

Same here. I omitted the PASS and USER ENV variables, as shown in my config given by getConfig() https://github.com/Strider-CD/strider/blob/master/lib/libconfig.js#L59:

{ logging:
   { exitOnError: true,
     loggly_enabled: false,
     file_enabled: false,
     console: { level: 0, colorize: true, timestamp: true },
     console_enabled: true },
  viewpath: '/opt/docker/strider-src/views',
  port: 3000,
  server_name: 'http://localhost:3000',
  db_uri: 'mongodb://localhost/strider',
  smtp_host: 'smtp.my.server.com',
  smtp_port: '25',
  smtp_user: '',
  smtp_pass: '',
  smtp_from: 'Strider <[email protected]>',
  enablePty: false,
  extpath: 'node_modules',
  session_secret: '',
  github_app_id: '',
  github_secret: '',
  cors: false,
  _: [],
  smtp:
   { host: 'smtp.corp.snips.net',
     port: '25',
     auth: { user: '', pass: '' },
     from: 'Strider <[email protected]>' },
  plugins: {}
}

but I also get

30 Sep 15:09:54 - info: Error sending email: { [AuthError: Invalid login - 503 5.5.1 Error: authentication not enabled]
  name: 'AuthError',
  data: '503 5.5.1 Error: authentication not enabled',
  stage: 'auth' }

corradio avatar Sep 30 '14 15:09 corradio

@sweco-sehrbe so you can send an email without a username/password?

knownasilya avatar Oct 15 '14 19:10 knownasilya

Try master (as of f85dccbc5f), and don't specify an SMTP user.

knownasilya avatar Oct 15 '14 19:10 knownasilya

I get the following error:

TypeError: Cannot read property 'user' of undefined
    at module.exports (/usr/local/lib/node_modules/strider/node_modules/strider-mailer/mailer.js:40:27)
    at Object.<anonymous> (/usr/local/lib/node_modules/strider/lib/email.js:5:39)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/strider/lib/auth.js:5:14)
    at Module._compile (module.js:456:26)

Seems like config.smtp.auth is undefined. Adding a SMTP_USER env variable did not help.

corradio avatar Oct 20 '14 07:10 corradio

@corradio try using the master version of strider-mailer, git clone and npm link ../strider-mailer in your strider directory.

knownasilya avatar Oct 20 '14 12:10 knownasilya

@corradio an npm install -f should fix that error now. No need to manually npm link master version of strider-mailer

microadam avatar Oct 21 '14 16:10 microadam

seems to work! Will test the SMTP feature in the next days. Thanks!

corradio avatar Oct 22 '14 05:10 corradio

@corradio feel free to bug us again if things are broken.

knownasilya avatar Oct 22 '14 22:10 knownasilya

awesome thanks @knownasilya

corradio avatar Oct 23 '14 05:10 corradio

@knownasilya actually I still have problems with emailnotifier 0.4.2 Now I get

Error sending email:  { [Error: Greeting never received] code: 'ETIMEDOUT', errno: 'ETIMEDOUT', stage: 'connect' }

corradio avatar Nov 04 '14 11:11 corradio

I have the same problem: I have configured an account from google, but ever the time i receive the same problem.

2014-11-08T01:59:02.976Z - info: Error sending email: { [Error: Greeting never received] code: 'ETIMEDOUT', errno: 'ETIMEDOUT', stage: 'connect' }

gartox avatar Nov 08 '14 02:11 gartox

I'm receiving the same Error: Error sending email: { [Error: Greeting never received] code: 'ETIMEDOUT', errno: 'ETIMEDOUT', stage: 'connect' }

when trying to connect a SMTP server without authentication. It doesn't matter if i leave SMTP_USER and SMTP_PASS as an empty String or don't even override them.

No Email communication is possible :/

leutrimhusaj avatar Jan 28 '15 12:01 leutrimhusaj

Issue closed for me now, since switching to strider 1.6.3. The fix is contained in lib/libconfig.js, last line was 'return defaults;' before and now 'return options;'.

leutrimhusaj avatar Feb 03 '15 10:02 leutrimhusaj

@leutrimhusaj :+1:

knownasilya avatar Feb 03 '15 15:02 knownasilya

i have the same problem pls dada help me..how can i solve the problem

DeepzSandra avatar Jul 21 '15 05:07 DeepzSandra