Created attachment 1501988 [details] mail command patch to cater for '@ signs Description of problem: The swatch man page for the mail command shows the syntax as: mail [addresses=address:address:...][,subject=your_text_here] However, if the email address contains an '@' sign, then swatch fails to start and gives an error. (A similar error will also occur if the 'subject' contains an '@' sign.) Version-Release number of selected component (if applicable): swatch-3.2.3-22.el7.noarch How reproducible: 1) Easily. Just create the swatchrc file, and run swatch. Steps to Reproduce: 1. As root create the ~/.swatchrc file: watchfor /error/ mail addresses=abc 2. Run: swatch -c $HOME/.swatchrc -t /var/log/messages 3. Modify the .swatchrc file, and remove just the 'addresses=' part. So the line is now 'mail abc' 4) Rerun the swatch command. It will work this time. This is despite not following the man page 'mail' command syntax. However, further down the man page shows a use of 'mail' which itself does not include 'addresses='. (mail=sysad-pager,when=1-6:8-17) Actual results: Swatch stops, showing the following error message: Global symbol "@example" requires explicit package name at /root/.swatch_script.30106 line 97. Execution of /root/.swatch_script.30106 aborted due to compilation errors. Expected results: No error should show when starting swatch. Additional info: The problem is that the 'addresses=' and 'subject=' parts do not cater for '@' signs in them. When 'addresses=' is left out, then swatch does handle them because it goes through a different bit of code. A patch is attached to correct this. It is only a few lines long. It has been tested with one and multiple addresses, and the subject line, with an '@' in it has been tested too.
swatch-3.2.3-24.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-3cb720eb18
swatch-3.2.3-24.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-1c5702a9f3
swatch-3.2.3-24.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-1d9486d9c6
swatch-3.2.3-24.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-269aba4cf7
swatch-3.2.3-24.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-269aba4cf7
swatch-3.2.3-24.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-1d9486d9c6
swatch-3.2.3-24.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-1c5702a9f3
swatch-3.2.3-24.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-3cb720eb18
swatch-3.2.3-24.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.
swatch-3.2.3-24.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.
swatch-3.2.3-24.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.