[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Lunix Command to view SMTP email history / qued emails

Posted on 2007-11-19
8
Medium Priority
?
961 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
  • 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
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!

 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article outlines some of the reasons why an email message gets flagged as spam on a recipient's end.
We aren’t perfect, just like everyone else.  Check out the email errors our community caught and learn the top errors every email marketer should avoid.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month18 days, 12 hours left to enroll

834 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