[Bug 38282] New: Set ReplytoDefault syspref as the from address for sftp_file.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38282 Bug ID: 38282 Summary: Set ReplytoDefault syspref as the from address for sftp_file.pl Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: alexbuckley@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz As per https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36766#c30 we should set the from_address of the email sent by sftp_file.pl to ReplytoDefault and only fallback to KohaAdminEmailAddress if it is not set. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38282 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38282 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |36766 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36766 [Bug 36766] Add command-line utility to SFTP a file to a remote server -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38282 --- Comment #1 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 173592 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173592&action=edit Bug 38282: Set ReplytoDefault as the preferred from_address of sftp_file.pl Default to KohaAdminEmailAddress if ReplytoDefault is not set Test plan: 1. Enter a valid email address into ReplytoDefault and KohaAdminEmailAddress sysprefs 2. Apply patch and restart services 3. Generate a file on your Koha server. Place it in /tmp/test.mrc 4. Manually connect to the SFTP remote host and accept the hostkey 5. Enter Koha shell 6. Run the sftp_file.pl command-line script ./sftp_file.pl --host <your remote hostname> --user <your user> --pass <your password> --upload_dir <your upload directory> --file /tmp/test.mrc --email <your email> 7. Confirm the SFTP was successful 8. Confirm that the email that you received has a from address matching the ReplytoDefault syspref 9. Empty out the ReplytoDefault syspref and repeat steps 5 and 6 10. Confirm that the new email you received has a from address matching the KohaAdminEmailAddress syspref Sponsored-by: Catalyst IT -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38282 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #2 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Thanks for requesting the follow-up in https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36766#c30 Katrin! I've attached the follow-up patch here. Hopefully it does what you are after, if not I can amend it as needed :) -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38282 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38282 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173592|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 173739 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173739&action=edit Bug 38282: Set ReplytoDefault as the preferred from_address of sftp_file.pl Default to KohaAdminEmailAddress if ReplytoDefault is not set Test plan: 1. Enter a valid email address into ReplytoDefault and KohaAdminEmailAddress sysprefs 2. Apply patch and restart services 3. Generate a file on your Koha server. Place it in /tmp/test.mrc 4. Manually connect to the SFTP remote host and accept the hostkey 5. Enter Koha shell 6. Run the sftp_file.pl command-line script ./sftp_file.pl --host <your remote hostname> --user <your user> --pass <your password> --upload_dir <your upload directory> --file /tmp/test.mrc --email <your email> 7. Confirm the SFTP was successful 8. Confirm that the email that you received has a from address matching the ReplytoDefault syspref 9. Empty out the ReplytoDefault syspref and repeat steps 5 and 6 10. Confirm that the new email you received has a from address matching the KohaAdminEmailAddress syspref Sponsored-by: Catalyst IT Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38282 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #4 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. Test plan notes: . See comment #21 from bug 36766 for notes on how to set up KTD to use an SFTP server. . To set up KTD to send email using a Google account, see [1]. . To receive the emails for step 8 of this bug's test plan (this bug), you need to run misc/cronjobs/process_message_queue.pl 2. Because of the way sending email works when using a Google account (I think), the from address in the actual emails you receive is always the email address for your Google account (the 'User name' setting). 3. However, if you read the output from running misc/cronjobs/process_message_queue.pl, then the 'From:' address will be the address you set in ReplytoDefault, and if that is empty it will show the address from KohaAdminEmailAddress. 5. So, I think testing with a real SMTP server would have the correct from addresses for the emails you actually receive. [1] Set up KTD to use a Gmail account for sending email (for testing purposes only) =========================================================== To test sending emails using a Google account: 1.1 Set up an App password for your Google Account (search the internet for how to do this). 1.2 Edit /etc/koha/sites/kohadev/koha-conf.xml file and add this configuration near the end (where <user_name> = your Google email address; <password> = your APP password, not your Google account password): <smtp_server> <host>smtp.gmail.com</host> <port>587</port> <timeout>5</timeout> <ssl_mode>STARTTLS</ssl_mode> <user_name>GOOGLEACCOUNTUSER</user_name> <password>GOOGLEAPPPASSWORD</password> <debug>1</debug> </smtp_server> OR (preferred, easiest) 1.3 Configure a new 'SMTP Server' under 'Administration > SMTP servers' using the following settings where `User name` = your Google email address and `Password` = your APP password, not your Google account password: Host: smtp.gmail.com Port: 587 Timeout: 5 SSL: STARTTLS User name: GOOGLEACCOUNTUSER Password: GOOGLEAPPPASSWORD Debug mode: Enabled Default server: select -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38282 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Signed Off |RESOLVED --- Comment #5 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Hi David, Thanks so much for testing. I'm sorry I dont think this follow-up is required after all. I attached the above commit (as a follow-up) onto https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36766 so Katrin could include it in main. So the commit on this bug report should already have been upstreamed. I'll mark this bug report as resolved fixed. Sorry again for not making that clearer here! Alex -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38282 --- Comment #6 from David Nind <david@davidnind.com> --- No worries! -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org