Opened 14 years ago

Closed 12 years ago

#24 closed defect (wontfix)

smtp support for people who don't have an smtp server running

Reported by: Will Kahn-Greene Owned by:
Priority: minor Milestone:
Component: programming Keywords:
Cc: Parent Tickets:

Description (last modified by Elrond)

There are a series of things that GNU MediaGoblin will send email
for.

This issue is to figure out how to GNU MediaGoblin can send email
without an MTA running on the local machine.

Perhaps just log sent email to a log file?



Change History (15)

comment:1 by Will Kahn-Greene, 14 years ago

Milestone: 0.0.2
I think this is a good thing to do for 0.0.2.



comment:2 by Will Kahn-Greene, 14 years ago

How does Django and other web app development systems suggest doing
this? I think looking at how they do it is probably a good first
action on this issue.



comment:3 by Christopher Allan Webber, 14 years ago

Note that we do handle this in unit tests by actually storing the
mail to a fake mbox folder, so that's not the issue.

`http://docs.djangoproject.com/en/dev/topics/email/#email-backends <http://docs.djangoproject.com/en/dev/topics/email/#email-backends>`_
provides systems for sending mail that look like they'd be useful
for debugging. We could write an interface similar to the
mediagoblin.storage.StorageInterface that you can plug in with the
appropriate type of mail sender?

For now we could probably put in the docs:

::

    sudo apt-get install postfix

or

::

    sudo apt-get install exim4



comment:4 by Will Kahn-Greene, 14 years ago

Gah... so then in order to hack on GNU MediaGoblin, you have to
install postfix/exim? Yuck.

Why can't we make it configurable to store it in a fake mbox?



comment:5 by Reiner Gerecke, 14 years ago

Christopher Webber wrote:

    For now we could probably put in the docs:

    [...]

    or

    [...]


Would a simple SMTP server work? Django shows an alternative to a
different mail sending backend here
`http://docs.djangoproject.com/en/dev/topics/email/#testing-email-sending <http://docs.djangoproject.com/en/dev/topics/email/#testing-email-sending>`_,
by using the built-in SMTP server in Python.

::

    python -m smtpd -n -c DebuggingServer localhost:1025

I'm not suggesting this as a solution to the issue, but it could be
an alternative to installing postfix/exim4 for development.



comment:6 by Christopher Allan Webber, 14 years ago

There's a new setting you can add to your mediagoblin.ini which is
in fact set on by default now:

::

    # set to false to enable sending notices
    email_debug_mode = true

... this will print email to stdout. Not a perfect solution but
good enough for us for now :)



comment:7 by Christopher Allan Webber, 14 years ago

Status: NewClosed

comment:7 by Sebastian Spaeth, 14 years ago

I am sorry, I request this bug to be reopened. :-) Outputting to a
STDOUT is a nice debug feature but it actually doesn't help to run
mgm on abox without local smtp daemon running.

What I would love is a simple configure option that specified a
command that is run and to which the email body is handed. THis
way, I could specify "mailcommand = /usr/bin/sendmail -t %m" (%m
being the recipient address), or I could even simulate the current
way by saying "mailcommand = echo" or whatever.

Alternatively let us configure a remote host (we already use
smtplib in the app and that has an option for a remote host).

To sum it up, this bug is not resolved yet. "smtp support for
people who don't have an smtp server running" is not existent. :) I
cannot run foo.sspaeth.de and actually have people use it because I
cannot send out email.



comment:8 by Christopher Allan Webber, 14 years ago

Status: ClosedIn Progress
Reopened!



comment:9 by Elrond, 14 years ago

Milestone: 0.0.2
0.0.2 is getting pushed out of the door currently. So this bug
surely doesn't get fixed for 0.0.2.
As this issue was not on our todo list / radar for 0.0.3: I'm
clearing the target version.

Just as an unrelated note: debug\_email to stdout is a good variant
of having restricted registration. Only the admin viewing stdout
can approve new users.



comment:10 by joar, 13 years ago

Elvenlord Elrond wrote:

    Just as an unrelated note: debug\_email to stdout is a good variant
    of having restricted registration. Only the admin viewing stdout
    can approve new users.


It's not entirely convenient however as stderr and debug logging
also prints in the terminal.

EDIT: But I agree, it's quite convenient as long as the email
doesn't get buried in stderr and you don't have the ability to
scroll back to it.

Usually, restricted instances are for people that already have
contact with the admin through alternative channels, so I will say
what you suggest is a good solution.



comment:11 by Will Kahn-Greene, 13 years ago

The original url for this bug was http://bugs.foocorp.net/issues/290 .
Relations:
#195: related

comment:12 by Elrond, 12 years ago

Component: programming
Description: modified (diff)

Status update:

  1. We allow setting a remote smtp-server (including user/pass) from the config. So you don't have to run your own MTA. You just need one, that you can feed mails into.
  1. That part might need better docs. Haven't checked the docs.
  1. Do we really want to also provide a mailcommand setting, so that people can have a special command that gets the mail off the system to its destination? Nobody has asked for this in ages.

comment:13 by Christopher Allan Webber, 12 years ago

Status: assignedaccepted

comment:14 by Christopher Allan Webber, 12 years ago

Resolution: wontfix
Status: acceptedclosed

We have email debug mode; I think this ticket is no longer needed.

Note: See TracTickets for help on using tickets.