Strider-CD / strider

Open Source Continuous Integration & Deployment Server
http://strider-cd.github.io/
4.6k stars 431 forks source link

Question about SMTP #590

Closed sweco-sehrbe closed 10 years ago

sweco-sehrbe commented 10 years ago

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)]

corradio commented 10 years ago

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 <noreply@stridercd.com>',
  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 <noreply@stridercd.com>' },
  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' }
knownasilya commented 10 years ago

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

knownasilya commented 10 years ago

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

corradio commented 10 years ago

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.

knownasilya commented 10 years ago

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

microadam commented 10 years ago

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

corradio commented 10 years ago

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

knownasilya commented 10 years ago

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

corradio commented 10 years ago

awesome thanks @knownasilya

corradio commented 10 years ago

@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' }
gartox commented 9 years ago

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' }

leutrimhusaj commented 9 years ago

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 commented 9 years ago

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;'.

knownasilya commented 9 years ago

@leutrimhusaj :+1:

DeepzSandra commented 9 years ago

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