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

Use "sendmail" or equivalent alias to send mail without SMTP #997

Open
lbeltrame opened this Issue Mar 2, 2015 · 27 comments

Comments

@lbeltrame
Copy link
Contributor

lbeltrame commented Mar 2, 2015

This applies only if the SMTP server runs on the same host as Gogs. Use case: my mail server has a lot of checks for legitimate users, but OTOH this would require a huge burden for services (which usually do not need a full account).

Therefore, using "sendmail" (quotes, because a lot of other MTAs like Postfix offer a sendmail-compatible interface) makes sense (of course, only if the system running Gogs and the mail server are one and the same) and doesn't even require a connection to the SMTP server.

@Unknwon

This comment has been minimized.

Copy link
Member

Unknwon commented Mar 2, 2015

Hi @lbeltrame , thanks for the feedback!

I'm not familiar with "sendmail" thing, would you mind to give some example? Or even better, a PR to show how code could be done?

@lbeltrame

This comment has been minimized.

Copy link
Contributor

lbeltrame commented Mar 2, 2015

@Unknwon

This comment has been minimized.

Copy link
Member

Unknwon commented Mar 2, 2015

Based on the link you give, it looks fairly easy, I think give a configure option would be good. How do you think?

@lbeltrame

This comment has been minimized.

Copy link
Contributor

lbeltrame commented Mar 3, 2015

That would work, perhaps note in the doc that's Unix/Linux only.

@nd2s

This comment has been minimized.

Copy link

nd2s commented Aug 17, 2015

+1

2 similar comments
@LouisMT

This comment has been minimized.

Copy link
Contributor

LouisMT commented Aug 22, 2015

+1

@tkisme

This comment has been minimized.

Copy link

tkisme commented Aug 26, 2015

+1

@Unknwon Unknwon added this to the 0.7.5 milestone Sep 3, 2015

@iquidus

This comment has been minimized.

Copy link

iquidus commented Sep 12, 2015

+1

@hasufell

This comment has been minimized.

Copy link

hasufell commented Sep 13, 2015

yep, a full SMTP account is tedious if you want to have as little configuration as possible

@gnue

This comment has been minimized.

Copy link

gnue commented Nov 5, 2015

+1

@Unknwon Unknwon modified the milestones: 0.7.5, 0.8.0 Nov 15, 2015

@renannprado

This comment has been minimized.

Copy link

renannprado commented Dec 1, 2015

+1
Also it would be nice to have a "test sendmail" functionality even while using gmail, for example.

@lucashalbert

This comment has been minimized.

Copy link

lucashalbert commented Dec 2, 2015

+1

@Unknwon Unknwon removed this from the 0.9.0 milestone Feb 7, 2016

@Jonny007-MKD

This comment has been minimized.

Copy link

Jonny007-MKD commented Mar 19, 2016

Does gomail (@alexcesaro) have any ambitions to support the sendmail binary? Or is it only targeted for SMTP connections?

@alexcesaro

This comment has been minimized.

Copy link

alexcesaro commented Mar 20, 2016

You can easily use sendmail with Gomail. You just have to implement the Sender interface.

Just adapt the mail function of the link above to match Sender.Send signature and you're done.

@Jonny007-MKD

This comment has been minimized.

Copy link

Jonny007-MKD commented Mar 20, 2016

Ok, thank you :) as soon as the other gomail PR is merged, I'll create one for this issue.

@lilmike

This comment has been minimized.

Copy link

lilmike commented May 5, 2016

Has there been any news on this issue? Really looking forward.
-Michael.

@jsieler

This comment has been minimized.

Copy link

jsieler commented Jun 29, 2016

Interested too. +1

@AlexDunmow

This comment has been minimized.

Copy link

AlexDunmow commented Nov 13, 2016

+1

@MarcelSimon

This comment has been minimized.

Copy link

MarcelSimon commented Jan 27, 2017

+1

@blankoworld

This comment has been minimized.

Copy link

blankoworld commented Apr 2, 2017

Definitly need it as gomail seems not working very well here.

@JacobDrummond

This comment has been minimized.

Copy link

JacobDrummond commented Aug 29, 2017

@Unknwon, has this feature request attracted enough interest to be part of a milestone, or is it de-facto closed?

@blankoworld

This comment has been minimized.

Copy link

blankoworld commented Aug 30, 2017

This is typically the kind of feature that makes Gitea have some users. Send a mail is needed for our users to register. Sendmail-like is more useful than using private services.
As Gitea includes this fonctionnality, why not have a look into its code?

@Fastidious

This comment has been minimized.

Copy link
Contributor

Fastidious commented Aug 30, 2017

@blankoworld did you know that, if you have sendmail properly configured, you can use localhost/127.0.0.1 as the SMTP server?

@blankoworld

This comment has been minimized.

Copy link

blankoworld commented Sep 5, 2017

That's the point: I didn't achieve this kind of configuration. I probably forget something. Have you any example of how it works: Gogs + sendmail + some external mail service (as Google, Gandi, etc)?

I finally install msmtp with only 10+ lines configuration. And link it to Gitea. Not because I prefer Gitea, but just because it works in a more easy way.

@MarcelSimon

This comment has been minimized.

Copy link

MarcelSimon commented Sep 5, 2017

It is of course always possible to set up a local SMTP server. However, gogs is about easy configuration and easy deployment and I certainly would not consider setting up a SMTP server contributing to this goal. Proper and especially secure setup of SMTP is a discipline for itself imho. I can't imaging sendmail has by default a server running.

@Unknwon Unknwon added this to the 0.12 milestone Oct 13, 2017

@plujon

This comment has been minimized.

Copy link

plujon commented Oct 26, 2017

Here's a recpie for those who, like me, have postfix or a similar SMTP server running on the localhost:

[mailer]
ENABLED = true
HOST = localhost:25
FROM = "Gogs" <gogs@your.tld>
SKIP_VERIFY = true
@webracer999

This comment has been minimized.

Copy link

webracer999 commented Jun 1, 2018

+1 for sendmail support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment