From owner-freebsd-questions@FreeBSD.ORG Wed Jul 25 15:44:18 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27E82106566B for ; Wed, 25 Jul 2012 15:44:18 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.freebsd.org (Postfix) with ESMTP id D901B8FC1A for ; Wed, 25 Jul 2012 15:44:17 +0000 (UTC) Received: from ncsc.bris.ac.uk ([137.222.10.41]) by dirg.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1Su3ko-0005md-WA for freebsd-questions@freebsd.org; Wed, 25 Jul 2012 16:44:17 +0100 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncsc.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Su3ko-0002eB-Hx for freebsd-questions@freebsd.org; Wed, 25 Jul 2012 16:44:02 +0100 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5) with ESMTP id q6PFi25c012354 for ; Wed, 25 Jul 2012 16:44:02 +0100 (BST) (envelope-from mexas@mech-cluster241.men.bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.5/8.14.5/Submit) id q6PFi23j012353 for freebsd-questions@freebsd.org; Wed, 25 Jul 2012 16:44:02 +0100 (BST) (envelope-from mexas) Date: Wed, 25 Jul 2012 16:44:02 +0100 (BST) From: Anton Shterenlikht Message-Id: <201207251544.q6PFi23j012353@mech-cluster241.men.bris.ac.uk> To: freebsd-questions@freebsd.org Subject: mail(1) save command does not work as in the man page X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jul 2012 15:44:18 -0000 According to the man mail(1): save (s) Takes a message list and a filename and appends each message in turn to the end of the file. The filename in quotes, followed by the line count and character count is echoed on the user's terminal. However, it seems the mail is copied, but not deleted on exit: $ mail -f mbox Mail version 8.1 6/6/93. Type ? for help. "mbox": 1 message > 1 mexas@bristol.ac.uk Wed Jul 25 16:36 46/2045 "kuku" & s 1 somefile "somefile" [New file] & h >* 1 mexas@bristol.ac.uk Wed Jul 25 16:36 46/2045 "kuku" & q $ mail -f somefile Mail version 8.1 6/6/93. Type ? for help. "somefile": 1 message > 1 mexas@bristol.ac.uk Wed Jul 25 16:36 46/2045 "kuku" & q So the mail was copied to file, as expected. However, it's still in mbox file too: $ mail -f mbox Mail version 8.1 6/6/93. Type ? for help. "mbox": 1 message > 1 mexas@bristol.ac.uk Wed Jul 25 16:36 46/2045 "kuku" & q $ This shouldn't happen. According to the man page the expected behaviour is that message 1 should be deleted from mbox on quit. Any comments?