* I'd suggest making the path that's used for temporary files configurable. Some hosted installations might not have access to /tmp. The use of a number for the filename might also conflict with other users of /tmp.
Perhaps http://api.drupal.org/api/function/file_directory_temp/6 would help? But I'm not sure this is an issue as OGM will only work on Linux anyways do to its reliance on the command line to send off emails. How about prefixing the temp files with og_mailinglist?
* Probably also a good idea to delete the file afterwards (security issue?)
That makes sense. I'll leave it as is for now as having the emails there is very helpful when debugging something.
* Creating the /tmp file could potentially fail. I don't see any error handling for that at the moment.
True. Will work on this.
Comments
Comment #1
kyle_mathews commentedOh, forgot to identify the source. These items came from this comment by Nigel:
http://groups.drupal.org/node/42688#comment-209218
Comment #2
nigelcunningham commentedI like the idea of prefixing /tmp files with something more unique. Perhaps include some attribute of the email (group address?) to make the namespace even more collision proof?
I also agree that leaving them there for now makes sense. Perhaps deletion could simply be made optional, to help users debug their installations later? (Default to deleting once closer to a 1.0 release?)
Thanks for the replies.
Comment #3
kyle_mathews commentedThe chance of collisions are pretty low as it is as the file only needs to sit on the disk for a fraction of a second before being used again. But adding a bit more prefixing would be trivial.
Making deleting optional makes sense.