You are not logged in.

#1 2007-12-03 10:05:26

awagner
Member
From: Mainz, Germany
Registered: 2007-08-24
Posts: 191

mailx vs. mailx

Hi all,
can anyone bring some light into the differences between the mailx that's included in core (http://www.opengroup.org/onlinepubs/007 … mailx.html) and the one from heirloom (http://heirloom.sourceforge.net/mailx.html) and why the one rather than the other is featured in core?
I came across the issue when researching the 'nail' command which a couple of scripts (such as logcheck) are using and which is now merged to or superceded by heirloom mailx. One of the IMHO more important differences is that heirloom's mailx (as well as nail) support an attach commandline switch, but the core mailx doesn't.

PS. There is some info at http://heirloom.sourceforge.net/mailx_history.html, but I couldn't (yet) get my mind around it...

TIA,
Andreas

Last edited by awagner (2007-12-03 10:06:17)

Offline

#2 2007-12-03 18:13:57

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: mailx vs. mailx

Hrm, personally I didn't know there was another mailx. Do you happen to know which is more common in distro packages? If heirloom is more common, it might be worthwhile to change the core mailx to the heirloom one.

Offline

#3 2007-12-03 19:49:51

gunnihinn
Member
From: Torreón, Mexico
Registered: 2007-10-28
Posts: 81

Re: mailx vs. mailx

I don't know the differences, but got interested and am in the process of configuring it on my setup.

A quick note for anyone interested in setting up Heirloom mailx on their system; instead of the vanilla "make install" you have to run "make install UCBINSTALL=/bin/install", and mailx gets installed in /usr/local/bin, so make sure it's in your path.

Offline

#4 2007-12-04 01:10:30

awagner
Member
From: Mainz, Germany
Registered: 2007-08-24
Posts: 191

Re: mailx vs. mailx

heirloom is a bigger package, but that is understandable since it also provides direct smtp/imap/pop (+TLS & Co.) connections to a smarthost, utf-8 and maildir compatibility and attachment sending by CLI. (More on the homepage.) It is used by default by OpenSuse [1], BeyondLFS [2] and Mandriva [3], whereas fedora [4] and debian [5] provide it via an extra 'nail' package. AFAIU, that is. And its CLI should be compatible with core mailx...

That's all I could find out in the few minutes I can spare right now, better everyone check it yourselves...

HTH,
Andreas

PS. The install instructions on the BLFS page are an interesting read.

[1] http://linux.derkeiler.com/Mailing-List … 03256.html
[2] http://www.linuxfromscratch.org/blfs/vi … mailx.html
[3] http://www.webservertalk.com/message1836040.html
[4] http://forums.fedoraforum.org/showthread.php?t=143690
[5] http://packages.debian.org/sid/mailx vs. http://packages.debian.org/sid/nail

Offline

#5 2007-12-04 06:55:19

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: mailx vs. mailx

Would you mind filing a Feature Request in the bug tracker with this information?

Offline

#6 2007-12-04 11:44:56

awagner
Member
From: Mainz, Germany
Registered: 2007-08-24
Posts: 191

Re: mailx vs. mailx

done: http://bugs.archlinux.org/task/8834

btw: there is an orphaned mailx-heirloom package on AUR: http://aur.archlinux.org/packages.php?d … =1&ID=7924

Last edited by awagner (2007-12-04 11:46:15)

Offline

#7 2007-12-04 14:25:38

neildarlow
Member
From: United Kingdom
Registered: 2007-10-23
Posts: 17

Re: mailx vs. mailx

core mailx is *the* canonical mailer and I would see its replacement by heirloom as unnecessary. It provides a lightweight /bin/mail for the likes of cron which just need a means to send out mail without excessive baggage.

I use mailx and ssmtp to handle system-level mail support for my desktop system (together they forward cron mail etc. to my smarthost) saving the need to install a full MTA.

I would suggest that core mailx is the essence of KISS and it should be retained.

Last edited by neildarlow (2007-12-04 14:25:56)

Offline

#8 2007-12-04 15:06:42

awagner
Member
From: Mainz, Germany
Registered: 2007-08-24
Posts: 191

Re: mailx vs. mailx

neildarlow wrote:

It [i.e. core mailx] provides a lightweight /bin/mail

to be more specific: the heirloom mailx binary uses 328K, whereas core mailx uses 100K (+36K for ssmtp binary in the example mentioned)

Personally, the only problem I have with core mailx is that it doesn't support attachments -- which was annoying for me on at least two occasions (one being the logcheck script mentioned and the other one a private backup script). I am currently tweaking heirloom-mailx PKGBUILD from AUR to provide nail rather than mailx, but I'm not sure this is a wise approach either...

On a sidenote, debian's packages are pulled from cvs but still have a version number 8.1.2 whereas arch's still has 8.1.1 (but it has some patches of its own)...

Last edited by awagner (2007-12-04 15:24:25)

Offline

#9 2007-12-04 15:29:46

neildarlow
Member
From: United Kingdom
Registered: 2007-10-23
Posts: 17

Re: mailx vs. mailx

/bin/mail has the following option:

~rfilename
             Read the named file into the message.

Would that not be sufficient to add your attachment (assuming it is appropriately encoded if binary)?

Offline

#10 2007-12-04 15:47:11

awagner
Member
From: Mainz, Germany
Registered: 2007-08-24
Posts: 191

Re: mailx vs. mailx

neildarlow wrote:

/bin/mail has the following option:

~rfilename
             Read the named file into the message.

Would that not be sufficient to add your attachment (assuming it is appropriately encoded if binary)?

Oh well. In a way yes...
I admit I've been hoping KISS wouldn't mean I'd have to pipe my file(s) through a long (at least compared to the -a switch of the other mailx) chain of encoding and/or MIME-wrapping commands. But I can probably live with that.

Or with installing mailx-heirloom alongside of core mailx -- while they share the same name, much of the same functionality, the core mailx package installs only a 'mail' binary, so mailx-heirloom's mailx (and my nail symlink) maybe don't even get in one another's way, will they?

Offline

#11 2007-12-04 21:07:59

neildarlow
Member
From: United Kingdom
Registered: 2007-10-23
Posts: 17

Re: mailx vs. mailx

Probably not. Being an old *NIX hack, I would do things the hard way and construct the mail body from its component parts big_smile

Offline

Board footer

Powered by FluxBB