Using dl 0.18.1
When uploading a file via the web interface, all works correctly except that the recipient specified in the "Send link to e-mail" field never gets sent an email.

I tried troubleshooting this from the dl server and found the following when creating a ticket:
- No DNS lookup is done for a mail record for
- No traffic goes from the dl server to the mail server
- No errors are reported in DL's or httpd's logs

So, not wanting to jump the gun, I started a php shell as the www user(`sudo -u www php-7.0 -a`) and tried running functions manually looking for something that doesn't work (don't laugh, I know nothing about debugging PHP) starting from "hooks.php:onTicketCreate()". I made a $DATA array as follows:

  php > print_r($DATA);
      [sent_email] =>
      [id] => c919107775e8aa272c9cf5ba2d94baa4
      [locale] => en_US
      [name] => file.txt

where ""is a valid email address. Each of the following function calls successfully sends an email as expected:
onTicketCreate($DATA); sends an email
mailUTF8("", "test", "test", "From:"); sends an email
mail("", "test", "test"); sends an email.

I'm sure the email address is properly fetched from the database because it is displayed on the "Upload result" page.

I also logged the parameters passed to the mailUTF8() function in onTicketCreate() and they are all correct:   logTicketEvent($DATA, "mailUTF8($email, $subject, $body, \"From: $fromAddr)\") returned $ret");
except that the $ret value is empty (I don't know whether this is expected).

Finally, I pulled out trusty ktrace and traced the php process run by the webserver and that run by my console. The web interface never invokes the system's mailer, whereas running in the PHP console properly calls mailUTF8()->mail()->/usr/sbin/sendmail and everything works.

Any pointers or tests for narrowing down the problem would be greatly appreciated.


Reply via email to