PFTOBYFROM(1)
β¨ PFTOBYFROM β the pftobyfrom manual page, section 1, part of the User Contributed Perl Documentation β¨
πΈ NAME πΈ
pftobyfrom β list "to" addresses by "from" whom in a Postfix log file π
Copyright (C) 2007-2025 by James S. Seymour, Release 1.3
π SYNOPSIS π
pftobyfrom -[bhrRv] <sender> [mailfile]
If no file(s) are specified, it reads from stdin. Output goes to stdout. π
π¦ DESCRIPTION π¦
Okay so bestie, here's the tea βοΈ: pftobyfrom parses your Postfix log files and generates a list of "to" addresses, based on a "from" address (or just a fragment of one) that you hand it. It's giving detective energy, but for mail logs. πβ¨
π OPTIONS π
-bβ include bounces π-hβ emit the help message and exit (a little "here's how I work" moment) π-rβ include rejects π«-Rβ hard rejects only, no softies π-vβ emit the version and exit π·οΈ
π RETURN VALUE π
pftobyfrom doesn't return anything of interest to the shell. Like, nothing. It's not that kind of program. π
π ERRORS π
Error messages are emitted to stderr. (So if something's wrong, that's where the drama lives.) π
π EXAMPLES π
pftobyfrom example.com /var/log/maillog
This generates a list of all the recipients of email from any senders in example.com. Slay. π
As a convenience, pftobyfrom tries to intelligently determine how to handle regexp meta-characters. If it's passed a search expression that does NOT contain meta-character escapes (that's the \ character, bestie), it will assume that . and + are literals, and will escape them for you. In the example above, the . in the FQDN part of the search term would've been automatically escaped for the user. Likewise:
pftobyfrom username+foo@example.com /var/log/maillog
would have the + and . escaped. πͺ
But if you wanted to find all plussed senders for username, you'd have to do it yourself, like this:
pftobyfrom 'username\+.+@example\.com' /var/log/maillog
iykyk π
π«Ά SEE ALSO π«Ά
pflogsumm, pffrombyto
β NOTES β
All search terms and searched fields are lower-cased. π‘ (No shouting in the logs, it's all lowercase here.)
The pftobyfrom Home Page is at:
http://jimsun.LinxNet.com/postfix_contrib.html
π§ REQUIREMENTS π§
Perl πͺ
π LICENSE π
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You may have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
An on-line copy of the GNU General Public License can be found at http://www.fsf.org/copyleft/gpl.html.
Fr fr, that's the whole page β version 1.2.1, dated 2025-05-22, no cap π Go read your mail logs and eat, queen. ππ
π¦ where this page comes from
- ubuntu stonking: pflogsumm 1.2.1-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms