Solved

Lunix Command to view SMTP email history / qued emails

Posted on 2007-11-19
8
939 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
Independent Software Vendors: 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 250 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 250 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
managed Distribution list in postfix 2 20
Blacked by spamhaus? 26 103
Install XRDP on Ubuntu Server 16.10 x64 3 63
DNS record 4 28
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

730 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