1844088 Members
2586 Online
110227 Solutions
New Discussion

elm or mailx

 
Mani Pushpanathan
Occasional Contributor

elm or mailx

When I executed the elm command to email a text file I did not get any error but neither did I receive the file in my email id. Exchange server ip is already defined in /etc/hosts. OS is 11i and this is a new RP2470 server.
2 REPLIES 2
Lee Huei
Regular Advisor

Re: elm or mailx

you can send an attachment with mailx as shown below:
# uuencode |mailx -m -s "subject" Email_address

for mailx/sendmail to work, you need to make sure you have configured sendmail properly.

Things to check for sendmail configuration:
(1) check sendmail version
# what /usr/sbin/sendmail | grep version
eg output:
version.c 8.11.1 (Berkeley) - (Revision 1.5+JAGae91741) - 2003/09/19

eg above is sendmail version 8.11.1

(2) check whether port 25 is accepting connection:
# ps -ef | grep sendmail
eg output:
root 1367 1 0 Nov 1 ? 4:34 sendmail: accepting connections

(3)check on /etc/mail/sendmail.cf

make sure you have proper entry for:
(a) DS
eg: DSsmtp.abc.com
(b) Dj.
eg: Dj.abc.com OR Dj. --> end with a . (dot)

(4) check on /etc/mail/sendmail.cw
look at last entry, make sure you have entry such as below:
localhost

.

eg:
localhost
testmail
testmail.abc.com

(5) check connectivity:
make sure you can create a connection to mailserver by nslookup/ping:
# ping
# nslookup
--> if the two commands above display proper output, No error, then we should be able to use sendmail/mailx.

(6)restart sendmail
# /sbin/init.d/sendmail stop
# /sbin/init.d/sendmail start

(7) test
# sendmail -v root
test root
. ---------> end with a dot

# sendmail -v
test emailaddress
.

Try the above and hopefully it works


Hoefnix
Honored Contributor

Re: elm or mailx

if the exchange server is in the sendmail.cf file as a relay host(DS) you need to do one thing after restarting sendmail.

Fill in a fake IP adress for your domain that you like to send to. On HP-UX it want to resolv the domain-name.

just add an entry like:

1.1.1.1 yourdomain.com

Then using elm or mailx the email should be delivered in your mailbox.