On Fri, Aug 12, 2011 at 4:37 AM, Holger Klein <h.kl...@imb-mainz.de> wrote:
> Hi Dannon,
> thanks for the info. I'd like to take this a small step further. I added
> the variable smtp_from to universe_wsgi.ini. Then I modified the
> util.send_mail in ./lib/galaxy/util/__init__.py to check if
> config.smtp_from is set:
> if config.smtp_from is None:
> msg[ 'From' ] = frm
> msg[ 'From' ] = config.smtp_from
> Still frm is set to the old value (galaxy-no-reply@computeserver). Can
> anyone point me to the place where universe_wsgi.ini is actually parsed
> and the config dictionary is filled?
The parsing of the config file is done as part of Python's paste and it's
then made available to the rest of Galaxy via lib/galaxy/config.py. There is
only one instance of that class for the entire app but the send_mail method
you were looking at does not have access to that object. So, you should look
higher up in the hierarchy and set frm in the method that calls send_mail
(there seem to be several places where it's called).
> On 08/03/2011 02:53 PM, Dannon Baker wrote:
> > Holger,
> > There isn't currently a galaxy-wide configuration for the from header
> address. Most places use frm = 'galaxy-noreply@%s' % host, where host is
> the fqdn of the box, as you've seen. I took a quick look, and it does look
> like everything that sends mail uses util.send_mail, so you could just
> modify that method to ignore the input frm parameter and immediately set it
> to frm = 'gal...@imb-mainz.de' and you should be good to go.
> > -Dannon
> > On Aug 3, 2011, at 4:52 AM, Holger Klein wrote:
> >> Hi all,
> >> for the email functionality of our local galaxy instance I'm forced to
> >> use SMTP authentication and to use a specific "from", which is different
> >> to what galaxy generates automatically.
> >> Now galaxy generates a "from" like
> >> gal...@computeserver.imb.uni-mainz.de
> >> but I want to set this to
> >> gal...@imb-mainz.de.
> >> A quick check shows that the send_mail function defined in
> >> lib/galaxy/util/__init__.py is called in various places.
> >> Is there a way to set the "from" to a specific value?
> >> If not, it send_mail the only galaxy-function used to send mail?
> >> Cheers,
> >> Holger
> >> --
> >> Dr. Holger Klein
> >> Core Facility Bioinformatics
> >> Institute of Molecular Biology gGmbH (IMB)
> >> http://www.imb-mainz.de/
> >> Tel: +49(6131) 39 21511
> >> ___________________________________________________________
> >> Please keep all replies on the list by using "reply all"
> >> in your mail client. To manage your subscriptions to this
> >> and other Galaxy lists, please use the interface at:
> >> http://lists.bx.psu.edu/
> Dr. Holger Klein
> Core Facility Bioinformatics
> Institute of Molecular Biology gGmbH (IMB)
> Tel: +49(6131) 39 21511
> Please keep all replies on the list by using "reply all"
> in your mail client. To manage your subscriptions to this
> and other Galaxy lists, please use the interface at:
Please keep all replies on the list by using "reply all"
in your mail client. To manage your subscriptions to this
and other Galaxy lists, please use the interface at: