mail -N not working

Bug #1411623 reported by Tor Stenvaag
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bsd-mailx (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I have a server application that uses the command "mail -N". It has been working in Ubuntu server for "I do not know how many years". After an "apt-get dist-upgrade" yesterday this command broke. It now states that an argument is needed.

$ mail -N
mail: option requires an argument -- 'N'
usage: mail [-dEIinv] [-a header] [-b bcc-addr] [-c cc-addr] [-s subject] to-addr ...
mail [-dEIiNnv] -f [name]
mail [-dEIiNnv] [-u user]

When tracking the mail command I end up with

$ ls -l /usr/bin/bsd-mailx
-rwxr-xr-x 1 root root 97384 Jan 5 18:05 /usr/bin/bsd-mailx
$ dpkg -S /usr/bin/bsd-mailx
bsd-mailx: /usr/bin/bsd-mailx
$ lsb_release -rd
Description: Ubuntu 12.04.5 LTS
Release: 12.04
$ apt-cache policy bsd-mailx
bsd-mailx:
  Installed: 8.1.2-0.20111106cvs-1ubuntu0.1
  Candidate: 8.1.2-0.20111106cvs-1ubuntu0.1
  Version table:
 *** 8.1.2-0.20111106cvs-1ubuntu0.1 0
        500 http://no.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
        100 /var/lib/dpkg/status
     8.1.2-0.20111106cvs-1 0
        500 http://no.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

Revision history for this message
Tor Stenvaag (tor-5) wrote :

The "T" argument is removed from the getopt argument, but the corresponding ":" is not removed.

+Index: bsd-mailx-8.1.2-0.20111106cvs/main.c
+===================================================================
+--- bsd-mailx-8.1.2-0.20111106cvs.orig/main.c 2015-01-05 11:39:00.136339604 -0500
++++ bsd-mailx-8.1.2-0.20111106cvs/main.c 2015-01-05 11:39:00.132339587 -0500
+@@ -115,18 +115,8 @@
+ subject = NULL;
+ header = NULL;
+ replyto = NULL;
+- while ((i = getopt(argc, argv, "EINT:a:b:c:defins:u:v")) != -1) {
++ while ((i = getopt(argc, argv, "EIN:a:b:c:defins:u:v")) != -1) {

summary: - mail -N not woking
+ mail -N not working
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bsd-mailx - 8.1.2-0.20141216cvs-2

---------------
bsd-mailx (8.1.2-0.20141216cvs-2) unstable; urgency=medium

  * Add 27-Fix-getopt-string.patch to fix `-N' flag that does not take
    an argument (LP: #1411623).

 -- Robert Luberda <email address hidden> Sun, 15 Mar 2015 11:27:33 +0100

Changed in bsd-mailx (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.