PFTOBYFROM(1)

πŸ“¦
version 1.2.1 Β· 2 versions
, in ubuntu stonking

✨ 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