SA-AWL(1p)

๐Ÿ’– SA-AWL(1p) โ€” the SpamAssassin auto-welcomelist glow-up ๐Ÿ’–

user contributed perl documentation, bestie. yes, that kind. it's giving "written by a perl person in 2004 and lovingly maintained ever since" and honestly? we respect it. ๐Ÿซถ


โœจ NAME โœจ

sa-awl โ€” peek inside SpamAssassin's auto-welcomelist db and mess with it, on purpose, controlled, slay ๐Ÿ’…


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

sa-awl [--clean] [--dry-run] [--min n] [dbfile]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

Okay so, short version: this thing checks a SpamAssassin auto-welcomelist (AWL) database file, or cleans it. That's the whole job. It's a lil maintenance gremlin and it's iconic.

The file gets named after all your options โ€” that's the dbfile argument. And if you don't say anything at all, it lowkey assumes:

$HOME/.spamassassin/auto-welcomelist

which is the default, no cap. ๐ŸŒธ


๐Ÿ’œ OPTIONS ๐Ÿ’œ

  • --clean โ€” bestie, this one goes in and yeets the infrequently-used AWL entries. "Infrequently-used" being determined by a threshold, and you set that threshold with the --min switch.
  • --dry-run โ€” the "I'm just looking, I'm not buying" option ๐Ÿ˜ญ โ€” when you pair it with the --clean option, instead of actually deleting stuff it shows you the infrequently-used AWL entries that will be deleted. Very demure, very mindful. And yeah, the --min switch works here too, to pick the threshold where entries get kept vs. deleted.
  • --min n โ€” this is your threshold dial for when entries get kept or deleted, and it only means anything when --clean is in the mix. The default is 2, which means entries that have only been seen once get deleted. seen once = gone. brutal but fair. ๐Ÿ’€

๐ŸŒˆ OUTPUT ๐ŸŒˆ

When it prints, it looks exactly like this shape:

     AVG  (TOTSCORE/COUNT)  --  EMAIL|ip=IPBASE

For example, real output, real vibes:

0.0         (0.0/7)  --  dawson@example.com|ip=208.192
21.8        (43.7/2)  --  mcdaniel_2s2000@example.com|ip=200.106

Now let's decode it, because every field is doing something:

  • AVG is the average score ๐Ÿงฎ
  • TOTSCORE is the total score of all mails seen so far
  • COUNT is the number of messages seen from that sender
  • EMAIL is the sender's email address
  • IPBASE is the AWL base IP address

๐ŸŒŸ what even is the AWL base IP address? ๐ŸŒŸ

Great question, bestie, I was hoping you'd ask. The AWL base IP address is a way to identify the sender's IP address that they frequently send from โ€” but approximately, in a fuzzy lil way โ€” while still being hard for spammers to spoof. ๐Ÿ‘‘

The algorithm is as follows, and yes we're keeping it exact:

- take the last Received header that contains a public IP address -- namely
  one which is not in private, unrouted IP space.

- chop off the last two octets, assuming that the user may be in an ISP's
  dynamic address pool.

So: last Received header with a public IP (meaning NOT private, unrouted IP space), then โœ‚๏ธ chop the last two octets off, because you might be sitting in some ISP's dynamic address pool and we're not gonna hold that against you.

periodt. ๐Ÿ’…


โš ๏ธ tiny heads up from your girl: --clean actually deletes entries. It is not a vibe check, it's the real thing. Use --dry-run first if you're feeling โœจdelicateโœจ.

that's the whole page, and yes, it was short โ€” we ate and left no crumbs ๐Ÿ“

this page is part of perl v5.40.1, dated 2026-07-23 โ€” big ups to the perl era, mwah ๐Ÿ’‹

๐Ÿ“ฆ where this page comes from