Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Lunix Command to view SMTP email history / qued emails

Posted on 2007-11-19
8
Medium Priority
?
958 Views
Last Modified: 2013-12-16
What is the command line to preview both history and current emails in the SMTP que?

We have our own virtual dedicated server, Lunix, Red Hat 9 with Apache.

Thanks in advance.
0
Comment
Question by:amakaram
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 14

Expert Comment

by:arrkerr1024
ID: 20313453
What mail server are you running?  sendmail, qmail, exim, etc?

You should have a /var/log/mailllog to view history, and probably a /var/spool/mqueue for the queue - but those vary between mail software.
0
 

Author Comment

by:amakaram
ID: 20315337
sorry should have specified that...

psa-qmail        1.03-rh9.build75050128.10
0
 
LVL 4

Expert Comment

by:infotactix
ID: 20320980
Did you try qmail-qstat ? That may give you what you want. Not sure where it is located in your installation, but may be in /var/qmail/bin/.

You might also want to check out qmailmrtg. It integrates qmail with MRTG for "real-time" mail stats.
http://www.inter7.com/?page=qmailmrtg7
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:amakaram
ID: 20325459
Found the file, you are correct on the location, however, not sure what to do beyond that.

Not sure what command line to use to run this or get this to echo the info.

"qmail-qstat" gets me "-bash: qmail-qstat: command not found"

Here is what is in the file:

#!/bin/sh
# WARNING: This file was auto-generated. Do not edit!
cd /var/qmail
messdirs=`echo queue/mess/* | wc -w`
messfiles=`find queue/mess/* -print | wc -w`
tododirs=`echo queue/todo/* | wc -w`
todofiles=`find queue/todo/* -print | wc -w`
echo messages in queue: `expr $messfiles - $messdirs`
echo messages in queue but not yet preprocessed: `expr $todofiles - $tododirs`
~
~
~

Just to make sure we are both on the same page, Im looking to see for example, how many emails total, and/or per account etc, have gone out from 2007-10-20 12:00:01 - 2007-11-20 12:00:01.  Our Plesk control panel has nothing in that area!

Thanks again
0
 
LVL 14

Accepted Solution

by:
arrkerr1024 earned 750 total points
ID: 20328204
You aren't going to get anything like that with out some custom scripting or an add-on package. Qmail doesn't have anything like that built in.  qmailanalog, with help from qlogtools, is one common program, but you have to know what you're doing.  Try following through that part of qmailrocks.org.

One thing to note - the funny long numbers in the qmail log files are indeed timestamps, you just have to convert them over to readable timestamps with tai64n2tai (in qlogtools).

Wish there was a more straightforward answer, but qmail is really a pain in the butt to get anything out of with out adding things on - which actually is intentional and part of their model - but its hard the first few times to get everything together.  qmailrocks.org is really a big help.
0
 
LVL 4

Assisted Solution

by:infotactix
infotactix earned 750 total points
ID: 20332121
The error:

      "qmail-qstat" gets me "-bash: qmail-qstat: command not found"

just means that the command isn't in your path. Try it again using the absolute path:

/var/qmail/bin/qmail-qstat

0
 

Author Comment

by:amakaram
ID: 20332493
Yes, Im getting that feeling.

I will leave this question open for a bit to see if anyone else has some ideas.

Thanks
0
 

Author Closing Comment

by:amakaram
ID: 31409911
There are no more new posts.

Thank you both for your help.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Here in this article, you will get a step by step guidance on how to restore an Exchange database to a recovery database. Get a brief on Recovery Database and how it can be used to restore Exchange database in this section!
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

636 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