Bug 1225597 - /usr/sbin/sendmail: line 83: return: can only `return' from a function or sourced script
Summary: /usr/sbin/sendmail: line 83: return: can only `return' from a function or sou...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: esmtp
Version: 23
Hardware: All
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-27 18:33 UTC by Aaron Knowles
Modified: 2016-07-28 13:58 UTC (History)
5 users (show)

Fixed In Version: esmtp-1.0-15.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-28 13:58:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch to correct bug (282 bytes, patch)
2015-05-27 18:33 UTC, Aaron Knowles
no flags Details | Diff

Description Aaron Knowles 2015-05-27 18:33:40 UTC
Created attachment 1030744 [details]
Patch to correct bug

Description of problem:
The esmtp-wrapper script reports "line 83: return: can only `return' from a function or sourced script" when it fails to queue a message.  For example, when it's affected by bug 1202562.

Version-Release number of selected component (if applicable):
1.0-13.fc22

How reproducible:
Always

Steps to Reproduce:
1. Ensure sendmail is linked to /usr/bin/esmtp-wrapper
2. unset HOME
3. echo 'Test' | sendmail root

Actual results:
The "line 83" error message appears due to the esmtp-wrapper script attempting to return in response to the queue_mail function failing.

Expected results:
The script should be calling exit instead of return in this instance.

Additional info:
I've attached a unified diff patch to correct the error in the script.

Comment 1 Jan Kurik 2015-07-15 14:06:00 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 2 Fedora Admin XMLRPC Client 2016-02-12 18:21:08 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 Fedora Admin XMLRPC Client 2016-02-14 23:18:25 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Jaroslav Škarvada 2016-07-28 13:58:58 UTC
Thanks for the report it's already fixed in:
esmtp-1.0-15.fc23


Note You need to log in before you can comment on or make changes to this bug.