Solved

Lunix Command to view SMTP email history / qued emails

Posted on 2007-11-19
8
903 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
 

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
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Microsoft has released various new features which are capable of handling various tasks. One of these tasks is ‘Migration from pop3 to Exchange Server’. Pop3 data stores various data along mailboxes like contacts, tasks, etc. So, it becomes the need…
Granting full access permission allows users to access mailboxes present in their database. By giving full access permission one can open and read the content of any mailbox but cannot send emails from that mailbox.
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now