1830031 Members
2501 Online
109998 Solutions
New Discussion

Re: mailx

 
Joe Profaizer
Super Advisor

mailx

We are attempting to send mail messages to a group alias called pldybatdis. We have a mail alias set up along with the /usr/local/lib file

/etc/mail/aliases:

# Local aliases
pldybatdis : ":include:/usr/local/lib/pldybatdis.list"

/usr/local/lib/pldybatdis.list

kleahy@rgare.com
3143787625@mobile.att.net
3143787623@mobile.att.net
lkattengell@rgare.com
rharrison@rgare.com
tchrist@rgare.com
mmccombs@rgare.com
kheimos@rgare.com

When using the following mailx command we receive an error in /var/adm/syslog/mail.log and user kleahy@rgare.com does not receive the message.

mailx -r kleahy@rgare.com -s TEST-RELAY2 pldybatdis < /tmp/test

/var/adm/syslog/mail.log

Sep 22 13:48:17 rga6 sendmail[8369]: NAA08367: to=gbarklage@rgare.com, delay=00:
00:05, xdelay=00:00:05, mailer=smtp, relay=mail.rgare.com. [10.10.10.143], stat=
Sent (OK)
Sep 22 13:48:45 rga6 sendmail[8374]: gethostbyaddr(10.10.1.72) failed: 1
Sep 22 13:48:45 rga6 sendmail[8374]: NAA08374: from=kleahy@rgare.com, size=143,
class=0, pri=60143, nrcpts=2, msgid=<200009221848.NAA08374@rga6.rgare.com>, rela
y=root@localhost

Is there any way to allow kleahy@rgare.com recipient to receive the message and also be the return address?
5 REPLIES 5
Stefan Farrelly
Honored Contributor

Re: mailx


To setup your return addres to be whatever you want you need to setup an /etc/mail/userdb file. See the following replies on how to do this;

http://forums.itrc.hp.com:80/cm/QuestionAnswer/1,1150,0xaaf16c96588ad4118fef0090279cd0f9,00.html

As for your gethost error in syslog, you need to resolve why the ip address listed cant be looked up. ie. if you do an nslookup 10.10.1.72 why doesnt it work ? either on your server or you mail relay server. Either way smtp is trying to contact this address, unsuccessfully. You need to get nslookup working for it.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Kofi ARTHIABAH
Honored Contributor

Re: mailx

Hi Joe:

A couple of things you might like to fix:
1. after adding the alias, you should do a
# newaliases
2. To fix the gethostbyaddr(10.10.1.72) failure, you might want to do the following.
a) in your /etc/nsswitch.conf the line should read:
hosts: files [NOTFOUND=continue] dns
b) include the IP address and host name combination (including FQDN) in the /etc/hosts file for your host 10.10.1.72 (unless it is listed in DNS)

3. Make sure that the directory where your alias:include resides is not "world writeable" if it is, move it to the /etc/mail directory (which isn't) Sendmail is very picky about not allowing world writeable directories to be used to store alias:include
(if you do remember to edit the /etc/mail/aliases and run newaliases)

nothing wrong with me that a few lines of code cannot fix!
Kofi ARTHIABAH
Honored Contributor

Re: mailx

In addition to the above, in order for a copy of the message to be left for the sender, edit the include file and place a \ (backslash) infront of the address - that tells mailx to leave a copy there...
so your include file should be:

/usr/local/lib/pldybatdis.list

\kleahy@rgare.com
3143787625@mobile.att.net
3143787623@mobile.att.net
lkattengell@rgare.com
rharrison@rgare.com
tchrist@rgare.com
mmccombs@rgare.com
kheimos@rgare.com

let's know how it goes.
nothing wrong with me that a few lines of code cannot fix!
CHRIS_ANORUO
Honored Contributor

Re: mailx

Include this in /etc/mail/aliases file
as follows:Use the 'DM' masquerade in /etc/mail/sendmail.cf - eg. DMfoo.com
and also DS(NTserver)
Make sure the internet services are running.
Run Newaliases and /sbin/init.d/sendmail (stop/start) and .forward in the users $HOME
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Danny Engelbarts
Frequent Advisor

Re: mailx

Joe,

In the sendmail.cf file uncomment the following line:

#O MeToo

and stop and start sendmail.

Greetz Danny.