mail command in mailutiils hangs and has to be killed.

Bug #589453 reported by James Sparenberg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mailutils (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: mailutils

package mailutils-1:2.1+dfsg1-4ubuntu1 Lucid Lynx x86_64

Problem:

When attempting to send a mail from the command line you get the following.

mail <email address hidden>
Cc:
Subject: test me
helo
.

At this point it's hung. I am able to enter the return key and lines increase... I can enter more text but after 15 minutes still nothing has happened. As you see I did enter a (.) on a new line. This is an unmodified 10.4 install currently up to date. This is a real problem as I've a number of systems that won't be going to LTS until I can get them to be able to send mail out of reports, cron jobs etc.

Revision history for this message
Mitch Sheean (mitch-sheean) wrote :

I managed to get it to work with a Control-d after the last period. Good luck.

Revision history for this message
James Sparenberg (james-linuxrebel) wrote :

The control-d is not a viable option for cron jobs and scripts though. this alone is why we didn't move to 10.4 on our desktops (would really like to, but can't.) as of today this still doesn't work (I keep a test bed for these bugs just in case, since we'd like to move to LTS)

Revision history for this message
Sergio Gelato (sergio-gelato) wrote :

I think this bug is invalid. Control-D is just a way to simulate an end of file. In a cron job or a script, where one pipes the output of another program into /usr/bin/mail, a real EOF occurs naturally.

Note that the last period is not needed; if you include it, it becomes part of the message body. According to the documentation, "[i]f mail variable dot is set, typing dot (‘.’) on a line alone achieves the same effect as ‘C[ontrol]-D’". I've tested this (adding "set dot" to ~/.mailrc before invoking the mail command) and it works (in lucid).

So:
1) if you want a single dot by itself to terminate input, set the mail variable "dot". This can be done in /etc/mail.rc if you want to change the system-wide default.
2) Terminating the message on EOF is a perfectly viable option for scripts and cron jobs in my experience.

Changed in mailutils (Ubuntu):
status: New → Invalid
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.