Setting Up Local LAN Email Using XMH
Novell Cool Solutions: Feature
Digg This -
Posted: 25 Oct 2005
MR wrote: I had set up several accounts on the same PC for the family. Is there a way which I can send a mail (or message, without going through the internet) to another user such that the other user will receive and be able to reply when she logins later? Also, how do I change the machine name? (which is accidentally/default set to be called linux)
Answer: For SUSE
I have found a relatively easy way to send local mail from one user to another on the same machine, or even over a LAN, which doesn't interfere with Internet email.
The front end uses a GUI based interface and is called "xmh". This is an X windows front end to the "mh" command line mail handler program.
You will have to install the "mh" program which you can obtain in RPM format. You can see how to do this in another one of my dumb question answers on Cool Solutions.
I used an updated version of "mh" called "nmh" which was for Fedora Core 3, which installed OK. Here is the link:
Once you have installed this program, run the command:
in each of your users home folders, as each user, so the permissions are setup OK. Use Mail as the folder name when it asks you.
Next run the command
which will set up the sub folders.
You shouldn't have to download the xmh program as it's part of the standard X windows suite. Here is a picture of "yours truly" creating some mail.
Notice that I sent it to "stomfi@localhost". Localhost is the name of the current machine. I also could have sent it to "firstname.lastname@example.org" or whatever my hostname is set to. If there were more machines connected to my LAN, I could send a copy to say "email@example.com".
When this mail is sent, it goes to the system mail drop folder, which by default is "/var/spool/mail/$USER".
The "inc" command will retrieve it and place it in the users Mail/inbox folder where "xmh" can see it.
To make things nice and easy for you, I have created a simple shell script which you can, as the root user, put into a common folder like "/usr/local/bin", and run it on startup for each user login.
#!/bin/bash #LocalMail.sh #Get any local mail and put it into the mh system #Exit if no new mail if [ `inc 2>&1 | grep -c "no mail"` -gt 0 ] then exit fi #Start the x windows mh mail utility xmh -path $HOME/Mail &
Don't forget to change the mode to executable with the command:
chmod +x /usr/local/bin/LocalMail.sh
Here is the results of running the command:
If you wish to run the "xmh" command as a user, create an icon with the command:
xmh -path $HOME/Mail
For your last question, you can set the hostname from YaST ? Network Services ? Host Names, or you can use the shell command line like this:
Or, use whatever name you wish. :)
This Newbie answer has covered:
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com