1834247 Members
2759 Online
110066 Solutions
New Discussion

Using sendmail

 

Using sendmail

Hi all,
Need assistant to use sendmail.

The way I run as below :
# cat sendmail_msg.txt | sendmail -t

Then I issue mailq, it no error and mailq is empty but I don't received the email.
Rgds.
-Kamarul
7 REPLIES 7
BONNAFOUS Jean Marc
Trusted Contributor

Re: Using sendmail

Hi,

I suppose you have started Sendmail daemon with -bd options. For testing you can use -bt options to enter in interactive test-mode. You can also use -V option for Verbose mode or -X LogfileName for logging in and out sendmail traffic (See man page).

So sendmail is usually use only like mail server (sendmail -bd). Instead of sendmail -t, prefer using mail or mailx (or interactive elm interface).

See also:
http://docs.hp.com/fr/5187-2222/ch03s08.html
or
http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90776/B2355-90776_top.html&con=/hpux/onlinedocs/B2355-90776/00/00/17-con.html&toc=/hpux/onlinedocs/B2355-90776/00/00/17-toc.html&searchterms=sendmail&queryid=20040830-030115

Rgds
JMB
Si vous ne faites jamais de bétises, c'est que vous ne faites rien de difficile. Et ça c'est une grosse bétise.
Muthukumar_5
Honored Contributor

Re: Using sendmail

Problem may be resolvation of account@FQDN of hostname.

Try to resolve that as,

are you using hosts: entry on /etc/nsswitch.conf as,

hosts: dns files ..

so that,

it will start to resolve domain name over dns as,

/etc/resolv.conf
domain celcom.com.my
nameserver IP1
nameserver IP2

nslookup celcom.com.my
Is it working fine.

or

nsquery hosts celecom.com.my "dns"

If you resolve these then you will get mail now. I have tested in my domain it is working fine. So the problem is because of domain name resolvation.

Regards
Muthu
Easy to suggest when don't know about the problem!
Elmar P. Kolkman
Honored Contributor

Re: Using sendmail

Other possible problem: the text file seems a DOS file, containing the CTRL-M characters at the end of the line... Make sure this is not the case on your file, otherwise sendmail will try to lookup the hostname including the CTRL-M

And running the sendmail in address-test mode can help too, of course. Also, check out your local mail file for errors, and /var/adm/syslog/mail.log for messages from sendmail.
Every problem has at least one solution. Only some solutions are harder to find.
Ron Brown_2
Frequent Advisor

Re: Using sendmail

Try this:

sendmail -v email_address < message.txt

That generally works for me and the -v option allows you to see the mail server in action.
should work...
someone_4
Honored Contributor

Re: Using sendmail

Hi

what does sendmail_msg.txt look like?

Richard
Elmar P. Kolkman
Honored Contributor

Re: Using sendmail

The text file is attached to the original question... That's where I saw the CTRL-M characters, but those can be caused by transferring the file to windows for posting this question, of course.
Every problem has at least one solution. Only some solutions are harder to find.
Sunil Sharma_1
Honored Contributor

Re: Using sendmail

What mail.log say? any error there ?

/var/adm/syslog/mail.log

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***