Link to home
Start Free TrialLog in
Avatar of danths
danthsFlag for United States of America

asked on

delayed send of emails

Using solaris 2.7 and sendmail
/etc/init.d $ echo \$Z | /usr/lib/sendmail -bt -d0
Version 8.12.11
 Compiled with: DNSMAP LOG MAP_REGEX MATCHGECOS MIME7TO8 MIME8TO7
                NAMED_BIND NDBM NETINET NETUNIX NIS NISPLUS PIPELINING SCANF
                XDEBUG


mails sent with mailx and mail are being deplayed significantly, however mails sent using pine are being sent immediately.
Here is an header
V6
T1093878103
K0
N0
P224671
Fs
$_localhost [127.0.0.1]
$rESMTP
$swilma.showingtime.com
${daemon_flags}
S<root@xxx.xxx.com>
rRFC822; xxx@xxx.xxx.com
RPFD:<xxx@xxx.com>
H?P?Return-Path: <g>

nothing major was noticed while running it in the debug mode ( however Iam not sure if I had the right flags)
The P value indicates the priority, is that the cause?

/etc/init.d $ /usr/lib/sendmail -oQ/var/spool/mqueue
can not chdir(/var/spool/mqueue/): Permission denied
Aug 30 10:34:58 wilma sendmail[3729]: NOQUEUE: SYSERR(root): can not chdir(/var/spool/mqueue/): Permission denied
Program mode requires special privileges, e.g., root or TrustedUser.

How do I force the emails and how do I fix the delay in sending the email?


Thanks
danths


Avatar of jlevie
jlevie

Since you are running Sendmail 8.12.11 on a Solaris 2.7 system I'd assume that you've manually upgraded Sendmail. When doing so did you set up the MSP instance of Sendmail? 8.12.x is different from 8.11 & prior in that one must run both the usual MTA instance and an MSP instance.  The MSP is used to collect mail from local clients like mailx or from directly invoking sendmail and pass them to the MTA for delivery.

Typically, the MSP would be started with something like:

sendmail -L msp -Ac -q 30m

Also one needs to be aware that 8.12 is much pickier about file/dir ownership that previous versions. All of this covered in the Sendmail Docs included with the 8.12.11 distribution. Exactly what ownership things need to be depends on what was specified when Sendmail was built.
Avatar of danths

ASKER

thx! for the reply.
I did start the MSP, however even before executing the above command, I was still getting the emails it was just that they were delayed abnormally. Now even after executing the cmd the emails are just queued up...

any thoughts???

output of mailq
========================================================
i7UFjCGU003945X     679 Mon Aug 30 10:45 <CustomerService@xxx.com>
                 (Deferred: Connection refused by moriseiki.co.com.)
                                         <lvale@moriseiki.co>
i7UEdLQt002669X  353254 Mon Aug 30 09:39 <root@server.xxx.com>
                                         <user1@yahoo.com>
i7UEeNxO002715X  353254 Mon Aug 30 09:40 <root@server.xxx.com>
                                         <user1@yahoo.com>
i7UDalZG001720X  353254 Mon Aug 30 08:36 <oracle@server.xxx.com>
                                         <perf-monitors@xxx.com>
i7UEoZc0002914X  353254 Mon Aug 30 09:50 <root@server.xxx.com>
                                         <user2@xxx.com>
                                         <user1@yahoo.com>
What command line is used to start the MTA & MSP?

What are the ownership & perms on /var/spool/mqueue & /var/spool/clientmqueue?
Avatar of danths

ASKER

/var/spool $ ls -ld mqueue
drwx------   2 root     root        4608 Aug 30 14:07 mqueue
/var/spool $ ls -ld clientmqueue
drwxrwx---   2 smmsp    smmsp        512 Aug 30 14:01 clientmqueue



That looks okay. What about the command lines used to start the MTA & MSP?
Avatar of danths

ASKER

  smmsp  7562     1  0 14:16:42 ?        0:00 /usr/lib/sendmail -L sm-msp-queue -Ac -q15m
    root  7737  7558  0 14:28:30 ?        0:00 /usr/lib/sendmail -bd -L sm-mta -q15m
    root  7558     1  0 14:16:42 ?        0:00 /usr/lib/sendmail -bd -L sm-mta -q15m
That looks okay also. What happens if you do '/usr/lib/sendmail -v -q' as root?
Avatar of danths

ASKER

/export/home/root/xx $ /usr/lib/sendmail -v -q                                      
/export/home/root/xx $

Nothing.  no output, doesn't that mean that sendmail thinks that there are no messages in the queue.
Avatar of danths

ASKER

as a side note, the emails which are in the queue are the ones with more than 5 cc addresses or one which are decent sized.

mailq -Ac
/var/spool/clientmqueue is empty
                Total requests: 0

while mailq -v
i7UJB6vL007457X    1808     212255 Aug 30 14:11 email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
i7UJA5Ud007435X    1818     212261 Aug 30 14:10 email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
i7UJ72kD007384X    1822     212266 Aug 30 14:07 email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
i7UJ70EB007382X    1827     212269 Aug 30 14:07 email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
i7UJ70Ox007380X    1844     212294 Aug 30 14:07 email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
                                    email@xxx.com
i7UJHtmw007578X  194330     224667 Aug 30 14:17 email@xxx.com
                                    email@xxx.com



Thanks
Avatar of danths

ASKER

was reading a bit more on mailq
 The status characters are either
     * to indicate the job is being processed; X to indicate that
     the  load  is too high to process the job; and - to indicate
     that the job is too young to process.  The  following  lines
     show message recipients, one per line.

Now how is the load determined and how can I change it?
Avatar of danths

ASKER

http://www.uwsg.iu.edu/usail/mail/op/op-sh-4.4.html

more info
# load average at which we just queue messages
#O QueueLA=8
O QueueLA=25

Earlier it was set to O QueueLA=0, I guess "0" is valid for other parms but NOT this. But in any case why would it have worked in the first place, shouldn't everything have been queued up????

I changed the value to 25 and did sendmail -q -v and it immediately started spewing output and sending emails. At this point its purely of academic value but would still like to hear a pausible explanation.

Thanks

The default in the M4 files used to build a sendmail.cf is 8, not zero, which is what "#O QueueLA=8" is saying. When you upgraded to 8.12.11 did you build a new sendmail.cf using the cf hierarchy from 8.12.11?
Avatar of danths

ASKER

Yes, I did and I guess it was around that time I went for 0 rather than 8 with the assumption that no emails will be queued up and will be processed as soon as they are recieved.
ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial