Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sendmail hangs
2012-06-25, 04:02 PM
Post: #1
sendmail hangs
I am trying to get sendmail to work with SUA, running on Windows 2008 Server 64 bit. My basic test looks like this:

cat | /usr/sbin/sendmail

And it just hangs. Any feedback will be greatly appreciated.
Find all posts by this user
Quote this message in a reply
2012-06-25, 05:29 PM
Post: #2
RE: sendmail hangs
Sendmail is running.
You gave it no options so it's doing its work.
Sendmail works the same on Interix/SUA as on all Unix systems (same options, same behavior).

You seem to be trying to use cat to direct STDIN at sendmail.
With no options sendmail is not looking to STDIN for anything.

What are you trying to do? Are you trying to use sendmail directly to send e-mail?
It would be better for you to use another utility (friendlier) such as mail.

If you are trying to get sendmail started as a daemon then you want to edit the boot scripts
in /etc/rc2.d --- specifically look at the S36sendmail and the K64sendmail files in that directory.
Edit S36sendmail to have the sendmail daemon start at system boot.
You want to have it started this way so it will run as root (aka local administrator) and have the need power/permissions.
Find all posts by this user
Quote this message in a reply
2012-06-26, 11:28 AM
Post: #3
RE: sendmail hangs
(2012-06-25 05:29 PM)rodney Wrote:  Sendmail is running.
You gave it no options so it's doing its work.
Sendmail works the same on Interix/SUA as on all Unix systems (same options, same behavior).

You seem to be trying to use cat to direct STDIN at sendmail.
With no options sendmail is not looking to STDIN for anything.

What are you trying to do? Are you trying to use sendmail directly to send e-mail?
It would be better for you to use another utility (friendlier) such as mail.

If you are trying to get sendmail started as a daemon then you want to edit the boot scripts
in /etc/rc2.d --- specifically look at the S36sendmail and the K64sendmail files in that directory.
Edit S36sendmail to have the sendmail daemon start at system boot.
You want to have it started this way so it will run as root (aka local administrator) and have the need power/permissions.
Find all posts by this user
Quote this message in a reply
2012-06-26, 11:30 AM
Post: #4
RE: sendmail hangs
Hello Rodney,

Thank-you. Very good info! Basically, I am working from some scripts written by a developer where he uses sendmail in a shell script. I am taking them from a "working" hp-ux system. Just one question, did you mean to say 'mailx' as a more friendly utility? Thanks.
Find all posts by this user
Quote this message in a reply
2012-06-26, 11:32 AM
Post: #5
RE: sendmail hangs
Oh.. The other think I wanted to mention that I am about to take a look at - would it have anything to do with not running in "case sensitvity" mode. Which I am looking to turn on.
Find all posts by this user
Quote this message in a reply
2012-06-26, 02:23 PM
Post: #6
RE: sendmail hangs
> Just one question, did you mean to say 'mailx' as a more friendly utility? Thanks.

Utility mail == mailx. It's the same thing. POSIX.2 renamed it with some minor
functionality changes. You'll see a symlink between them.

> some scripts written by a developer where he uses sendmail in a shell script.

If they were using sendmail then they should have been using some options (such as '-t', see man page).
Regardless, the daemon needs to be running to ensure delivery from the mail queue.

> would it have anything to do with not running in "case sensitvity" mode.

We always recommend running with Case Sensitive file systems "on" for best behavior.
As with SetUid being on for filesystems too. In fact you need SetUid on for sendmail.
In the FAQ there are entries for turning these on (e.g. 1.01, 1.03 & 1.13).
Find all posts by this user
Quote this message in a reply
2012-06-27, 03:09 PM
Post: #7
RE: sendmail hangs
I have taken the following actions: Set case sensitivity on (IE: FAQ 1.13 - perfect!).
I have sendmail daemon running.
I have edited /etc/mail/sendmail.cf to add our relay server.
I can telnet to port 25 on our relay server.
this SUA server is in the relay list.
I have un-commented the lines in /etc/init.d/sendmail:
${SENDMAIL} -bd -q30m &
[ $? = 0 ] && echo "sendmail started"

Run a simple test: df | /usr/sbin/sendmail mark.larochelle@doit.nh.gov
The message just sits in: /var/spool/mqueue

What else could I be missing? It almost appears that it is not getting my SMTP relay information correctly from etc/mail/sendmail.cf
Find all posts by this user
Quote this message in a reply
2012-06-27, 07:12 PM (This post was last modified: 2012-06-27 07:14 PM by rodney.)
Post: #8
RE: sendmail hangs
Uncommenting the lines in /etc/init.d/sendmail will get the daemon going on the next reboot.
What you need to do is either login as local administrator or su to local administrator or reboot the machine.
If you login or su then it *must* be the local administrator.
Once you are local administrator you can do
/usr/sbin/sendmail -bd -q30m &
(that ampersand (&) is important to let it run in the background)

Note: that gets the queue checked/re-checked every 30 minutes. Most sites are 10 or 15 now. Adjust as you see fit.
Find all posts by this user
Quote this message in a reply
2012-06-28, 10:17 AM
Post: #9
RE: sendmail hangs
(2012-06-27 07:12 PM)rodney Wrote:  Uncommenting the lines in /etc/init.d/sendmail will get the daemon going on the next reboot.
What you need to do is either login as local administrator or su to local administrator or reboot the machine.
If you login or su then it *must* be the local administrator.
Once you are local administrator you can do
/usr/sbin/sendmail -bd -q30m &
(that ampersand (&) is important to let it run in the background)

Note: that gets the queue checked/re-checked every 30 minutes. Most sites are 10 or 15 now. Adjust as you see fit.
Find all posts by this user
Quote this message in a reply
2012-06-28, 10:23 AM
Post: #10
RE: sendmail hangs
I am connecting as administratory, by logging in and su as the local administrator. And I do have the sendmail daemon
running:
$ cat sendmail.pid
3587
/usr/sbin/sendmail -bd -q30m

This is no longer a problem. The problem that still persists is that the messages just hang and sit in the queue and looks like this:

V8
T1340892456
K1340892624
N1
P30309
Mhost map: lookup (doit.nh.gov): deferred
Fs
$_SOPSNHFVAPPD+stark.john@localhost
${daemon_flags}c u
SSOPSNHFVAPPD+stark.john
ASOPSNHFVAPPD+2Bstark.john@+81w.nhfirst.nhroot.int
rRFC822; mark.larochelle@doit.nh.gov
RPFD:mark.larochelle@doit.nh.gov
H?P?Return-Path:
H??Received: (from SOPSNHFVAPPD+stark.john@localhost)
by SOPSNHFVAPPD.nhfirst.nhroot.int (8.13.6/8.13.6) id q5SE7aAN003779
for mark.larochelle@doit.nh.gov; Thu, 28 Jun 2012 10:07:36 -0400
H?D?Date: Thu, 28 Jun 2012 10:07:36 -0400
H?F?From: SOPSNHFVAPPD+stark.john
H?M?Message-Id: <201206281407.q5SE7aAN003779@SOPSNHFVAPPD.nhfirst.nhroot.int>
.
File: qfq5SE7aAN003779 (Type h for help.) ** EOF **
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)