Operating System - HP-UX
1822350 Members
4769 Online
109642 Solutions
New Discussion юеВ

mailx - sendmail configuration

 
SOLVED
Go to solution
Alpha977
Valued Contributor

mailx - sendmail configuration

Hello!

I need to know how to configure sendmail to send mail on internet.
I have already an account and smtp server.

Thanks!
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: mailx - sendmail configuration

Shalom,

By default, sendmail can send mail to the Internet. You need change nothing.

All you need to do is make sure /etc/resolv.conf permits resolution of host names. You mail might not be accepted without configuration and Reverse DNS addresses, but that is not the question posed.

To use a relay server.

vi /etc/mail/sendmail.cf

Change
DS

DSrelayserver

or

DS
[ip of relay server]

example
DS
[192.168.0.10]

Where 192.168.0.10 is the ip address of the relay (smtp) server.

/sbin/init.d/semdmail stop
/sbin/init.d/sendmail start

Then test:
sendmail -v -d8.99 -d38.99 someone@yahoo.com

type some text

.



Watch the diagnostic flow.

mailq will show whether the mail is queued for local delivery or made it off the system.

mailx uses sendmail as its MTA

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
Adisuria Wangsadinata_1
Honored Contributor

Re: mailx - sendmail configuration

Hi Alpha977,

You can check the url below for configuring sendmail :

http://docs.hp.com/en/5991-6611/ch02s01.html

And check the thread below :

http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=992396&admit=-682735245+1154594692100+28353475

And also this as you need to relay the mail to your mail server that connected to the internet :

http://www2.itrc.hp.com/service/iv/docDisplay.do?docId=prodITRC/DE_SW_UX_sendmail_EN_01_E/relaying_smarthost2.htm

Hope this information can help you.

Cheers,
AW

now working, next not working ... that's unix
Alpha977
Valued Contributor

Re: mailx - sendmail configuration

Thank guys, but don't work... i have follow the topics of forum you send me, but don't work...

i don't understand...

i have the smtp server (exapmle smtp.server.com)

the accont of the system is (sysadm@server.com)

How i can configure with this parameter?
Alpha977
Valued Contributor

Re: mailx - sendmail configuration


I receive this error:

#sendmail -v -d8.99 -d38.99 my.name@domain.com
getcanonname(umgl008l), trying files
text_getcanonname(umgl008l)
getcanonname(umgl008l), trying dns
dns_getcanonname(umgl008l, trymx=1)
dns_getcanonname: trying umgl008l.domain.com (ANY)
;; res_querydomain(umgl008l, domain.com, 1, 255)
;; res_query(umgl008l.domain.com, 1, 255)
;; Querying server (# 1) address = 172.31.32.11
;; rcode = 3, ancount=0
NO: errno=0, h_errno=1
getcanonname(umgl008l), trying files
text_getcanonname(umgl008l)
getcanonname(umgl008l), trying dns
dns_getcanonname(umgl008l, trymx=1)
dns_getcanonname: trying umgl008l.domain.com (ANY)
;; res_querydomain(umgl008l, domain.com, 1, 255)
;; res_query(umgl008l.domain.com, 1, 255)
;; Querying server (# 1) address = 172.31.32.11
;; rcode = 3, ancount=0
NO: errno=0, h_errno=1
getcanonname(umgl008l), failed, stat=68
seq_map_parse(aliases.files, )
WARNING: local host name (umgl008l) is not qualified; fix $j in config file
map_init(sequence:aliases.files, NULL, 0)
sequence:aliases.files NULL: valid
map_init(implicit:Alias0, /etc/mail/aliases, 0)
wrong pass (pass = 0, rebuildable = 1)
map_init(host:host, NULL, 0)
host:host NULL: valid
map_init(switch:aliases, aliases, 0)
switch_map_open(aliases, aliases, 0)
switch_map_find => 2
files
files
map_stack[0] = sequence:aliases.files
map_stack[1] = sequence:aliases.files
switch:aliases aliases: valid
map_init(dequote:dequote, NULL, 0)
dequote:dequote NULL: valid
map_init(host:resolve, NULL, 0)
host:resolve NULL: valid
map_init(sequence:aliases.files, NULL, 1)
wrong pass (pass = 1, rebuildable = 0)
map_init(implicit:Alias0, /etc/mail/aliases, 1)
impl_map_open(Alias0, /etc/mail/aliases, 0)
hash_map_open(Alias0, /etc/mail/aliases, 0)
impl_map_lookup(Alias0, @)
db_map_lookup(Alias0, @)
impl_map_close(Alias0, /etc/mail/aliases, 1b83)
db_map_close(Alias0, /etc/mail/aliases, 1b83)
impl_map_open(Alias0, /etc/mail/aliases, 0)
hash_map_open(Alias0, /etc/mail/aliases, 0)
impl_map_lookup(Alias0, @)
db_map_lookup(Alias0, @)
impl_map_close(Alias0, /etc/mail/aliases, 1b83)
db_map_close(Alias0, /etc/mail/aliases, 1b83)
impl_map_open(Alias0, /etc/mail/aliases, 0)
hash_map_open(Alias0, /etc/mail/aliases, 0)
impl_map_lookup(Alias0, @)
db_map_lookup(Alias0, @)
impl_map_close(Alias0, /etc/mail/aliases, 1b83)
db_map_close(Alias0, /etc/mail/aliases, 1b83)
closemaps: closing aliases.files (NULL)
closemaps: closing host (NULL)
closemaps: closing aliases (aliases)
closemaps: closing dequote (NULL)
closemaps: closing resolve (NULL)
Mancboy
Valued Contributor

Re: mailx - sendmail configuration

You need to qualify your hostname. Either ensure that your MX records are properly setup or the first line of /etc/hosts is the FQDN and then check that nslookup of your hostname returns the FQDN.

Or modify the sendmail.cf file by adding a similar line like this:
Dj$w.domainname.com
Alpha977
Valued Contributor

Re: mailx - sendmail configuration

ok, but the machine is not connected to a domain...

How i can do?
Mancboy
Valued Contributor
Solution

Re: mailx - sendmail configuration

just put in domain.com as the domain.
it's purely cosmetic and only really used (I think anyway:-) ) for reverse DNS look ups.

When you connect to a remote sendmail server, the first your server does is to announce itself. Some remote sendmails will try and double check who you say you are against your IP address.
Alpha977
Valued Contributor

Re: mailx - sendmail configuration

Thanks now all works!!! :)

Thanks to all!
Alpha977
Valued Contributor

Re: mailx - sendmail configuration

Thanks to all!

Was a domain problem!