Installation

Mandrill emailer error: "Relay access denied"

Mandrill emailer error: "Relay access denied"

by Mark McClure -
Number of replies: 3
I'm having difficulty getting webwork to deliver email properly. I'm a
professor and teacher of mathematics but I'm running my own webwork
server entirely unsupported. The server is available here:
http://www.marksmath.org/webwork2/

My webwork is installed on an Ubuntu 14.04 LTS system running on Linode.
Installation is extremely easy using the installation script here:
https://github.com/aubreyja/ww_install

I do *not* have an SMTP installed on my Linode. Rather, I use an SMTP
server provided by Mandrill:
https://mandrillapp.com/

I *do* have postfix properly installed and configured on my Linode to
use Mandrill's SMTP server. Thus, I can login into my Linode as wwadmin
and send mail from that account no problem. Nonetheless, when I attempt
to send email from within webwork, the email is not delivered and the
following error message is generated in the webwork webpage:

Failed to open the mailer: 4.7.1 : Relay access denied for
""Mark McClure" " on host "smtp.mandrillapp.com"

There is an obvious workaround: Mandrill has an API so the file
/opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Feedback.pm
could be reworked to take advantage of the API. (I know there are
other emailers, but I don't think I care about those.) I'm quite
sure I could do this, if necessary, but I've researched the
"Relay access denied" message and I'm pretty sure there's some small
permissions tweak that could done to fix the problem quickly, easily,
and more robustly than my hack would accomplish.

So, any advice?

In reply to Mark McClure

Re: Mandrill emailer error: "Relay access denied"

by Danny Glin -
Can you link us to what you found regarding "Relay access denied" and permissions?  It might make it easier for someone here to provide a quick fix.
In reply to Danny Glin

Re: Mandrill emailer error: "Relay access denied"

by Mark McClure -
As Danny mentions, I could probably provide a little information on what I have found on the "Relay access denied" message. It's really just a little I've garnered from the top few hits from the following Google searches:
"4.7.1 Relay access denied"
and
"Relay access denied"
Note that the quotes are included as part of the search query.

Consistently, the links mention that the message indicates that I'm trying to send the email to an unauthorized address and they say that the problem can be fixed by fiddling with my postfix main.cf file. *However*, postfix is properly installed on my server and I am able to send email as wwadmin without difficulty. In infer (perhaps incorrectly) that wwadmin, as invoked by webwork, runs perhaps with a lower permission level than when I log in as wwadmin.

I should also mention that I have run WebWork and used Mandrill as my emailer in the past just fine. I just set up a new system in preparation for the coming semester but can't seem to get it to work this time.
In reply to Mark McClure

Re: Mandrill emailer error: "Relay access denied"

by Mark McClure -
Lacking suggestions, I have successfully modified the file
/opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Feedback.pm
so that my version of WebWork now works with Mandrill via the Mandrill API. While this probably an unusual set up, I would be happy to share the code.