Bug 1646480 - mail command gives error for addresses with '@' in them.
Summary: mail command gives error for addresses with '@' in them.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: swatch
Version: epel7
Hardware: All
OS: All
unspecified
low
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-05 15:31 UTC by John Horne
Modified: 2019-01-19 02:25 UTC (History)
4 users (show)

Fixed In Version: swatch-3.2.3-24.el7 swatch-3.2.3-24.fc28 swatch-3.2.3-24.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-19 00:43:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
mail command patch to cater for '@ signs (624 bytes, patch)
2018-11-05 15:31 UTC, John Horne
no flags Details | Diff

Description John Horne 2018-11-05 15:31:45 UTC
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.

Comment 1 Fedora Update System 2018-11-09 13:58:06 UTC
swatch-3.2.3-24.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-3cb720eb18

Comment 2 Fedora Update System 2018-11-09 13:58:17 UTC
swatch-3.2.3-24.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-1c5702a9f3

Comment 3 Fedora Update System 2018-11-09 13:58:24 UTC
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

Comment 4 Fedora Update System 2018-11-09 13:58:32 UTC
swatch-3.2.3-24.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-269aba4cf7

Comment 5 Fedora Update System 2018-11-10 04:06:51 UTC
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

Comment 6 Fedora Update System 2018-11-10 04:23:06 UTC
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

Comment 7 Fedora Update System 2018-11-10 05:00:56 UTC
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

Comment 8 Fedora Update System 2018-11-10 05:09:33 UTC
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

Comment 9 Fedora Update System 2019-01-19 00:43:49 UTC
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.

Comment 10 Fedora Update System 2019-01-19 01:54:33 UTC
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.

Comment 11 Fedora Update System 2019-01-19 02:25:40 UTC
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.


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