Solved

delayed send of emails

Posted on 2004-08-30
14
934 Views
Last Modified: 2013-12-17
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


0
Comment
Question by:danths
  • 8
  • 6
14 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 11933339
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.
0
 
LVL 6

Author Comment

by:danths
ID: 11933613
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>
0
 
LVL 40

Expert Comment

by:jlevie
ID: 11934153
What command line is used to start the MTA & MSP?

What are the ownership & perms on /var/spool/mqueue & /var/spool/clientmqueue?
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 6

Author Comment

by:danths
ID: 11934858
/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



0
 
LVL 40

Expert Comment

by:jlevie
ID: 11934924
That looks okay. What about the command lines used to start the MTA & MSP?
0
 
LVL 6

Author Comment

by:danths
ID: 11935062
  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
0
 
LVL 40

Expert Comment

by:jlevie
ID: 11935212
That looks okay also. What happens if you do '/usr/lib/sendmail -v -q' as root?
0
 
LVL 6

Author Comment

by:danths
ID: 11935499
/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.
0
 
LVL 6

Author Comment

by:danths
ID: 11935746
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
0
 
LVL 6

Author Comment

by:danths
ID: 11935945
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?
0
 
LVL 6

Author Comment

by:danths
ID: 11936124
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

0
 
LVL 40

Expert Comment

by:jlevie
ID: 11937366
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?
0
 
LVL 6

Author Comment

by:danths
ID: 11941888
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.
0
 
LVL 40

Accepted Solution

by:
jlevie earned 500 total points
ID: 11942363
Oh, so you set QueueLA to 0. As you've found that's a bad thing to do and it was a result of simply misunderstanding what QueueLA is used for.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Spam invasion 8 79
Best secure sending email service 1 65
changing email : how to reload all of my data from Yahoo mail to Gmail 4 146
URL to post Gmail webmail issues 2 62
Resolve DNS query failed errors for Exchange
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
In this video we show how to create a Distribution Group in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >>…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question