?
Solved

Lunix Command to view SMTP email history / qued emails

Posted on 2007-11-19
8
Medium Priority
?
953 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

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…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In this video we show how to create an email address policy 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 Mail Flow…
Suggested Courses
Course of the Month15 days, 14 hours left to enroll

741 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