/go/outgoing reads today's entries in the Postfix mail log (/var/log/maillog) and lists the messages the server sent out. For each message it shows: It prints the list as a table and saves it as a dated report file. It leaves out mail to the administrator address and mail from system senders, so the list shows your customers' outbound mail rather than GoAdmio's own notices. Use it to spot spam or a compromised mail account. Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
# Show today's outgoing mail
/go/outgoing
Options
None.
Examples
# Show today's outgoing mail
/go/outgoing
# Show only messages sent by one domain
/go/outgoing | grep '@example.com'
# Count today's outgoing messages (subtract 2 for the header rows)
wc -l /var/log/go/mail/outgoing/outgoing-$(date +%F).log
# Find the senders with the most messages today
cut -d'|' -f2 /var/log/go/mail/outgoing/outgoing-$(date +%F).log | sort | uniq -c | sort -rn | head
Output
The command prints a table with one row per message, then saves the same data to a file.
| Column | Meaning |
|---|---|
Time |
Time of the first delivery entry for the message (HH:MM:SS). |
From |
The sender address. |
To |
The recipient address. Only the first recipient is shown. |
IP |
The first IPv4 address found in the message’s log lines. For mail submitted by a mail client, this is normally the client’s address. |
Subject |
The subject, cut to 75 characters. Blank if the subject wasn’t recorded in the log. |
Time From To IP Subject
---- ---- -- -- -------
09:15:02 info@example.com client@gmail.com 203.0.113.10 Your invoice
Report file
The report is saved to:
/var/log/go/mail/outgoing/outgoing-<YYYY-MM-DD>.log
In the file, columns are separated by | instead of aligned with spaces, so it is easy to import elsewhere:
Time|From|To|IP|Subject
----|----|--|--|-------
09:15:02|info@example.com|client@gmail.com|203.0.113.10|Your invoice
[!NOTE]
Running the command again on the same day overwrites that day’s report file. Copy the file first if you need to keep an earlier version.
Log
Each run appends one line to /var/log/go/outgoing.log:
[Nov 21 12:00:00]# outgoing
See the full reference at /go/outgoing and the GoAdmio command index.
GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.
