Operating System - HP-UX
1752700 Members
6135 Online
108789 Solutions
New Discussion юеВ

Re: elm command on hp ux 11i

 
SOLVED
Go to solution
John Jimenez
Super Advisor

elm command on hp ux 11i

We are upgrading from 10.20 to 11i. We have programs that e-mail results. But on the new system it is asking to create a .elm directory and alias files. It also says that it can't run in "batch mode", but to run in "normal mode". Is it possible to create a system .elm directory?
Hustle Makes things happen
11 REPLIES 11
Paul Sperry
Honored Contributor

Re: elm command on hp ux 11i

Go ahead and let elm create the dir
It will only do this the first time a user
uses elm. After that it will work as normal
Helen French
Honored Contributor

Re: elm command on hp ux 11i

Did you install all patches after OS installation? Installing this patch and it's dependencies might solve your issue: PHNE_24522 (s700_800 11.11 elm patch).
Life is a promise, fulfill it!
Steven E. Protter
Exalted Contributor
Solution

Re: elm command on hp ux 11i

First time you use elm its going to want to create those directories.

elm is not a batch tool, its an interactive one.

use mailx -s for simple batch emails and sendmail scripts for the really complicated ones.

Attaching an example.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Helen French
Honored Contributor

Re: elm command on hp ux 11i

To add: If you want to preserve old system mail setting, copy required files and parameters to the new OS from $HOME/.elm directory. This directory normally contains user configurable files, alias databse etc. To answer your other question about creating .elm directory - Yes the "elm" command will create it for you and it does not give any problems. You can leep your configuration files and alias on this directory if needed.
Life is a promise, fulfill it!
A. Clay Stephenson
Acclaimed Contributor

Re: elm command on hp ux 11i

Elm is most definitely a batch tool as well as an interactive command. The difference is that in command-line mode, elm will not automatically create a .elm directory in the sender's home directory if .elm does not already exist. In interactive mode the .elm directory will be created if needed. All you need to do is:
cd to sender's home dir
mkdir -m 700 .elm

If it ain't broke, I can fix that.
John Jimenez
Super Advisor

Re: elm command on hp ux 11i

I installed the patch, but it did not make any difference. We replaced elm -s with mailx -s and it seems to work fine. This is a perfect fix for most of our programmer, (except 1 prgrammer who has about 40-50 scripts to change) oh well....Thanks a lot for the help
Hustle Makes things happen
Pete Randall
Outstanding Contributor

Re: elm command on hp ux 11i

John,

There's no need to rewrite all those scripts. Simply create a ".elm" directory in each users' home, as Clay suggested.

for dir in /home/*
do
mkdir -m 700 $dir/.elm
done

That should be all there is to it.


Pete


Pete
Steven E. Protter
Exalted Contributor

Re: elm command on hp ux 11i

I honestly didn't know elm could be effectively used in batch.

mailx -s of course will work.

elm in batch probably won't because of the different characteristics of the utility. If mailx -s is a solution, thats great.

If the need is to simply get the mail out and get on to other things, then mailx -s is good.

I use it in cron as follows:

* * * * * /usr/contrib/bin/script 2>&1 | mailx -s "subject" someone@aol.com

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
John Jimenez
Super Advisor

Re: elm command on hp ux 11i

Yes,I can get it to e-mail but is echoes everything to my screen instead of to the
.elm or Mail directories
Hustle Makes things happen