Messaging
cancel
Showing results for 
Search instead for 
Did you mean: 

Mailx and sendmail conf issues

SOLVED
Go to solution
Chitta
Frequent Advisor

Mailx and sendmail conf issues

Hi,
I want to send mail from my HP UNIX 11.23 machine to my personal mail id.

I tried sendmail -v -s "test msg" abc@xyz.com < exp.txt but no message on the screen,
then mailx -s Test abc@xyz.com < exp.txt
my /var/adm/syslog/mail.log shows below error message:

Jun 3 12:56:15 abctst sendmail[17189]: m4UI9Ra18155: to=abc@xyz.com, delay=3+22:46:48, mailer=esmtp, pri=17100006, relay=root@localhost, dsn=4.4.
3, stat=Transient parse error -- message queued for future delivery


then i checked /var/spool/mqueue , All mails are fall in the mqueue,

I am ver new to UNIX, So i don,t know whether Synatx error or mail confuguration error>

please reply ASAP,
Regs,
Chitta
10 REPLIES
OFC_EDM
Respected Contributor

Re: Mailx and sendmail conf issues

Your mail queue is full?

If so you most likely have a DNS issue.

You need to make sure your SMTP mail server is seen by the server.

Use sendmail -bv email address to test if the address is reachable.

Not if you have a lot of mail in the queue you may want to clear it out first before fixing the DNS issue. You could potentially send out a lot of old useless mail otherwise.

For the DNS start with checking your /etc/resolv.conf and your nsswitch.conf. As well as your hosts file.

You may also have to quote your subject.
mailx -s "Test" abc@xyz.com < exp.txt

To attach the file instead
uuencode exp.txt exp.txt mailx -m -s "Test" abc@xyz.com

Cheers
The Devil is in the detail.
OFC_EDM
Respected Contributor

Re: Mailx and sendmail conf issues

typo...

Not should be Note in the following paragraph...from my prev post.

Note if you have a lot of mail in the queue you may want to clear it out first before fixing the DNS issue. You could potentially send out a lot of old useless mail otherwise.
The Devil is in the detail.
Jeeshan
Honored Contributor

Re: Mailx and sendmail conf issues

where is your DNS server and mail relay server is it windows DNS?
for mail relay, is it MS Exchange server?
a warrior never quits
Chitta
Frequent Advisor

Re: Mailx and sendmail conf issues

Hi,
i had deleted all mails in the queue,
and my DNS is configured in windows,

I cannot find reslov.conf file and am not able to send local OS user to eg:

all the mail gos to dead.letter file.

Regs,
Chitta.
Chitta
Frequent Advisor

Re: Mailx and sendmail conf issues

Also p pasted the version,

Version 8.11.1 (PHNE_35951

Compiled with: LDAPMAP MAP_REGEX LOG MATCHGECOS MIME7TO8 MIME8TO7
NAMED_BIND NDBM NETINET NETINET6 NETUNIX NEWDB NIS NISPLUS
QUEUE SASL SCANF SMTP USERDB XDEBUG

============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = abctst
(canonical domain name) $j = abctst
(subdomain name) $m =
(node name) $k =
========================================================

WARNING: local host name (abctst) is not qualified; fix $j in config file
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter

> 8.11.1
Regs,
Chitta
Jeeshan
Honored Contributor
Solution

Re: Mailx and sendmail conf issues

If you have DNS and Exchange setup in windows you need to configure sendmail in different manner.

1. configure /etc/resolv.conf with domain name, nameserver IP
2. /sbin/init.d/sendmail stop
3. configure macro DS to DSexchange_relay_name
- configure macro Dj$w. to Dj$w.
- put to /etc/hosts (don't forget the dot at the end)

4. - start end stop sendmail to take modifications in sendmail.cf active.
- configure exchage to accept relay this host.

5. Save and quit sendmail.cf
6./sbin/init.d/sendmail stop
7./sbin/init.d/sendmail start
8. echo test | sendmail -v
a warrior never quits
Chitta
Frequent Advisor

Re: Mailx and sendmail conf issues

Hi ashan,

Can you tell me for mailx configuration,
Because my requirement is mailx,

Regs,
Chitta
Jeeshan
Honored Contributor

Re: Mailx and sendmail conf issues

Hi

mailx - interactive message processing system, there is not such configuration for this.

see man page of mailx

#man mailx
a warrior never quits
Chitta
Frequent Advisor

Re: Mailx and sendmail conf issues

Hi,
Thanks for quick reply,

when i tried to send mail it directly goes to mqueue,
I am not sure whether DNS is configured but am able to ping my exchange server which is resieds on Windows.

Here we Go " if wannt to send mail using MAILX from my Unix server to my personal Mail address i.e, yahoo.com " what i need to configure?

i think it will solve my issues.


Please Advice,
Regs,
Chitta.

Steven E. Protter
Exalted Contributor

Re: Mailx and sendmail conf issues

Shalom Chitta,

Your server is in a corporate lan where mail can not be sent to the outside world on port 25. Therefore though DNS resolution should be fixed, it will have no impact at all on mail.

Mandatory step.
1) Your smtp relay server, identified earlier in the thread must be configured to permit relay from this unix host, all domains, no exceptions.

Two choices next.

DSnameofrelayserver
In sendmail.cf
stop and start sendmail as shown earlier

Then run your sendmail command line test to see if the mail gets out of the sendmail queue and onto the relay server.

Or you can enable smart relay in sendmail.mc and compile a new sendmail.cf file. sendmail.mc happens to be human readable and therefore easier to remember what you did years down the road.

http://www.hpux.ws/?p=5
For a basic configuration based on sendmail.mc (which probably has a different name in HP-UX).

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