Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMTP Not working #816

Closed
hsitaa opened this issue Jul 28, 2016 · 15 comments
Closed

SMTP Not working #816

hsitaa opened this issue Jul 28, 2016 · 15 comments

Comments

@hsitaa
Copy link

hsitaa commented Jul 28, 2016

Its not Working. Specified the conf. Do i need to expose any port in Docker compose yml.

my Host machine : Centos7
running it on Docker for gitlab,

mails are working for Host machine. But when try to send mail from gitlab. Nothing happens.

1.) Do i need to install postfix on Docker machine?
2.) Do i need to expose any port.
3.) Tried using Gmail smtp as well as extrernal mailserver. : Which 1 suggested?

@hsitaa
Copy link
Author

hsitaa commented Jul 28, 2016

@sameersbn @mikew

Please help

@mikew
Copy link
Contributor

mikew commented Jul 28, 2016

Where is the server hosted? EC2? Is port 25 open?

@hsitaa
Copy link
Author

hsitaa commented Jul 28, 2016

No Local Hosted Server , but can send mail through Terminal. Yes Port 25 is open.

@lazyfrosch
Copy link
Contributor

@hsitaa what have you configured for the SMTP_* environment variables?

@hsitaa
Copy link
Author

hsitaa commented Jul 28, 2016

- SMTP_ENABLED=true
- SMTP_DOMAIN=example.com  = our company domain
- SMTP_HOST=smtp.gmail.com
- SMTP_PORT=465
- SMTP_USER={{email}}  = gmail id
- SMTP_PASS={{pass}}   = gmail pass
- SMTP_STARTTLS=true
- SMTP_AUTHENTICATION=plain

@lazyfrosch

@hsitaa
Copy link
Author

hsitaa commented Jul 28, 2016

Anyone any Idea ?

@lazyfrosch
Copy link
Contributor

Im relaying locally, and don't have problems:

GITLAB_EMAIL=info@example.com
SMTP_ENABLED=true
SMTP_DOMAIN=example.com
SMTP_HOST=host.example.com
SMTP_PORT=25

With your config and my gmail account I see the following error in Background jobs:

EOFError: end of file reached

Your mistake is with the SSL settings, you will need:

#SMTP_STARTTLS=true
SMTP_SSL=true

Port 465 is a normal TLS connection, no STARTTLS used there (which would be on port 25).

@patrickc91
Copy link

@hsitaa Did you ever get this issue resolved?

@sameersbn
Copy link
Owner

can you update the status? were you able to resolve the issue?

@dh1tw
Copy link

dh1tw commented Aug 9, 2016

I have the same problem. Emails don´t get delivered.

@solidnerd
Copy link
Collaborator

@dh1tw Could you post your SMTP envvar's. So we can check it.

@sameersbn
Copy link
Owner

@dh1tw @hsitaa It would help if you could provide some basic information about your mail delivery system.

Anyways, I think this is a basic configuration issue. Consider looking through past mail delivery issues. I'm sure you'll find an answer.

@YahirAlejandro
Copy link

Worked for me when set:

gitlab_rails['smtp_enable_starttls_auto'] = false
gitlab_rails['smtp_tls'] = false

Since I wasn't using TLS.
Also:

gitlab_rails['smtp_authentication'] = "plain"

Worth notting that I'm using a GoDaddy domain.

Hope that helps.

@alofeoluwafemi
Copy link

alofeoluwafemi commented May 15, 2017

@YahirAlejandro What smpt port 25 or 465

@hsitaa
Copy link
Author

hsitaa commented Aug 10, 2017

Apologies for delayed response. I changed the setting to relay from mailserver instead Gmail SMTP. and also whitelisted gitlab server at mailserver . It worked. Thanks for all the help @sameersbn @patrickc91

@hsitaa hsitaa closed this as completed Aug 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants