Operating System - HP-UX
1846581 Members
2183 Online
110256 Solutions
New Discussion

Sendmail and force the mqueue

 
SOLVED
Go to solution
Coolmar
Esteemed Contributor

Sendmail and force the mqueue

Hi,

I have three messages stuck in the mqueue. How can I force them through. I tried /usr/sbin/sendmail -q and nothing. Any ideas?
6 REPLIES 6
Peter Nikitka
Honored Contributor
Solution

Re: Sendmail and force the mqueue

Hi,

what is the output when running these commands:

mqueue

/usr/sbin/sendmail -q -d

mqueue


If sendmail does not give any output, check if the binary is correct.


mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Geoff Wild
Honored Contributor

Re: Sendmail and force the mqueue

sendmail -q

should suffice

If you don't want them, just delete them.

cd /var/spool/mqueue and rm them

Also - if sendmail is disabled as a daemon, add this to root's cron:

# Make sure any queued mail is delivered, as sendmail isn't a daemon anymore
39 * * * * /usr/lib/sendmail -q


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Ivan Ferreira
Honored Contributor

Re: Sendmail and force the mqueue

Normally, those messages can't go because a problem with the destination address. After you run the sendmail -q, you should check your mail log file to see why the message was not sent (No route to host, DNS failure, etc).
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Coolmar
Esteemed Contributor

Re: Sendmail and force the mqueue

What happened was that the load went up high so sendmail stopped sending messages. I then changed the RefuseLA and restarted sendmail daemon. However, these messages won't go...and they are required so I can't delete them. Here is the output of sendmail -q -d


Version 8.9.3 (PHNE_29774)
Compiled with: LDAPMAP MAP_REGEX LOG MATCHGECOS MIME7TO8 MIME8TO7
NAMED_BIND NDBM NETINET NETUNIX NEWDB NIS NISPLUS QUEUE SCANF
SMTP USERDB XDEBUG
setoption SevenBitInput (7).=False
setoption EightBitMode (8).=pass8
setoption AliasWait (a).=10
setoption AliasFile (A).=/etc/mail/aliases
setoption MinFreeBlocks (b).=100
setoption BlankSub (B).=.
setoption HoldExpensive (c).=False
setoption DeliveryMode (d).=background
setoption TempFileMode (F).=0600
setoption HelpFile (H).=/usr/share/lib/sendmail.hf
setoption SendMimeErrors (j).=True
setoption ForwardPath (J).=$z/.forward.$w+$h:$z/.forward+$h:$z/.forward.$w:$z/.forward
setoption ConnectionCacheSize (k).=2
setoption ConnectionCacheTimeout (K).=5m
setoption UseErrorsTo (l).=False
setoption LogLevel (L).=9
setoption CheckAliases (n).=False
setoption OldStyleHeaders (o).=True
setoption PrivacyOptions (p).=authwarnings
setoption QueueDirectory (Q).=/var/spool/mqueue
setoption Timeout (r).queuereturn=5d
setoption Timeout (r).queuewarn=4h
setoption SuperSafe (s).=True
setoption StatusFile (S).=/etc/mail/sendmail.st
setoption TimeZoneSpec (t).=
setoption DefaultUser (u).=1:1
setoption TryNullMXList (w).=T
setoption RefuseLA (X).=52
setoption SmtpGreetingMessage (0x90).=$j Sendmail $v/$Z; $b
setoption UnixFromLine (0x91).=From $g $d
setoption OperatorChars (0x92).=.:%@!^/[]+
setoption MaxHeadersLength (0xaa).=32768
drop_privileges(0): Real[UG]id=0:3, RunAs[UG]id=0:0
getauthinfo: root@localhost

============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = skregi25
(canonical domain name) $j = $w.agr.gc.ca
(subdomain name) $m = agr.gc.ca
(node name) $k = skregi25
========================================================

map_rewrite(@), av = (nullv)
map_rewrite => @
getla: 11
drop_privileges(0): Real[UG]id=0:3, RunAs[UG]id=0:0
map_rewrite(@), av = (nullv)
map_rewrite => @
orderq:
grow_wlist: WorkListSize=0
grow_wlist: WorkListSize now 1000

====finis: stat 0 e_id=NOQUEUE e_flags=1
Ivan Ferreira
Honored Contributor

Re: Sendmail and force the mqueue

What do you see in /var/adm/syslog/mail.log when you run sendmail -q??
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Coolmar
Esteemed Contributor

Re: Sendmail and force the mqueue

I just deleted the messages and mail seems to be going through. Thanks