Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: ddougan on October 06, 2006, 07:17:00 PM
-
I was looking in the qmail\current file this morning, investigating a possible mail delivery problem. I grep'd fpr a particular message id (msg 11632653), and found multiple instances of it in messages processed today.
Does qmail not use unique IDs? What would explain multiple (and quite definitely separate) instances of the same ID?
I'd appreciate any enlightenment... And I'll be happy to raise a bug if that is what it is.
Regards,
Des
-
I believe that the message ID in qmail is actually the i-node of the file containing the message. This is part of why qmail is so efficient.
You should look at using collapse_qpsmtpd_conn.pl to collapse the qpsmtpd log files. collapse_qpsmtpd_conn extracts commands and responses from qpsmtpd log files and prints a single line for each connection with the entire SMTP dialog. The output is intended to be easily filtered with grep or awk
I use it and pipe the results to the script that creates the chart.
You could use it to create a single log file with one line per connection/pid.
collapse_qpsmtpd_conn.pl /var/log/qpsmtpd/* > qpsmtpd.log
http://www.hjp.at/projekte/qpsmtpd/log-tools/
I use the "collapse_qpsmtpd_conn" script if I'm trying to track emails in the logs; just download the script and feed it your qpsmtpd logs.
I'd use something like:
mkdir -p /root/tools
cd /root/tools
wget http://www.hjp.at/projekte/qpsmtpd/log-tools/collapse_qpsmtpd_conn
chmod +x collapse_qpsmtpd_conn
./collapse_qpsmtpd_conn /var/log/qpsmtpd/current | less
- Michael
-
Thanks for the pointer. I'll have a look at it to see if it helps.
Regards,
Des
-
mmccarn & JonB
How about this variation on usage to allow display of the results in the server manager View log files panel.
Obviously choice of script location & name is personal, so change it as desired.
mkdir -p /opt/scripts/collapse_qpsmtpd_conn
cd /opt/scripts/collapse_qpsmtpd_conn
wget http://www.hjp.at/projekte/qpsmtpd/log-tools/collapse_qpsmtpd_conn
chmod u+x collapse_qpsmtpd_conn
Create a small script file to allow easy repeated log file creation (saves having to remember & type the commands later)
pico read-qpsmtpd
type in
./collapse_qpsmtpd_conn /var/log/qpsmtpd/* > /var/log/qpsmtpd-conn/current
Ctrl o to save
Ctrl x to exit
chmod u+x read-qpsmtpd
Then create a new log file location that can be easily accessed by server manager
mkdir -p /var/log/qpsmtpd-conn
Then run
./read-qpsmtpd
Then open server manager View log files
and select
qpsmtpd-conn/current
Remember to run
cd /opt/scripts/collapse_qpsmtpd_conn
./read-qpsmtpd
before looking at the log file again so it is updated with the latest activity
You can also save the output result to file (select download option) for easier analysis using another document viewing program to more easily view the wide screen format that is created.
-
Remember to run
cd /opt/scripts/collapse_qpsmtpd_conn
./read-qpsmtpd
before looking at the log file again so it is updated with the latest activity
Thanks for the nice tip there Ray, I personally would have it run the script for me via cron
*/30 * * * * /opt/scripts/collapse_qpsmtpd_conn/read-qpsmtpd
Which will run every 30 minutes.