rblsmtpd(1)

πŸ“¦
version 0.88 Β· 2 versions
  • 0.88 Β· debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu jammy, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 1.13.06 Β· alpine 3.24
, in debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu jammy, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

rblsmtpd β€” blocks mail from RBL-listed sites. It works with any SMTP server that can run under tcpserver(1).


✨ SYNOPSIS ✨

rblsmtpd opts prog

🌸 DESCRIPTION 🌸

okay bestie, so opts is just a series of getopt-style options, and prog is one or more arguments. Easy.

Normally rblsmtpd runs prog. And prog is expected to carry out an SMTP conversation to receive incoming mail messages. That's its whole job, its main character moment, fr fr.

But here's the plot twist πŸ”₯: rblsmtpd does not invoke prog if it's been told to block mail from this client. Instead, it carries out its own limited SMTP conversation, temporarily rejecting all attempts to send a message. And meanwhile β€” because it's a multitasking queen β€” it prints one line on descriptor 2 to log its activity.

Also, rblsmtpd drops the limited SMTP conversation after 60 seconds, even if the client has not quit by then. Like, conversation over, she's leaving πŸ’….


πŸ’… OPTIONS πŸ’…

  • -t n β€” Change the timeout to n seconds.

🚫 Blocked clients 🚫

If the $RBLSMTPD environment variable is set and is nonempty, rblsmtpd blocks mail. It uses $RBLSMTPD as an error message for the client. Normally rblsmtpd runs under tcpserver(1), and you can use tcprules(1) to set $RBLSMTPD for selected clients. Pick your faves, basically ✨.

If $RBLSMTPD is set and is empty, rblsmtpd does not block mail. (The silent treatment but make it permissive.)

If $RBLSMTPD is not set, rblsmtpd looks up $TCPREMOTEIP in the RBL, and blocks mail if $TCPREMOTEIP is listed. And tcpserver sets up $TCPREMOTEIP as the IP address of the remote host. Very much the vibe.

  • -r base β€” Use base as an RBL source. An IP address a.b.c.d is listed by that source if d.c.b.a.base has a TXT record. rblsmtpd uses the contents of the TXT record as an error message for the client.
  • -a base β€” Use base as an anti-RBL source. An IP address a.b.c.d is anti-listed by that source if d.c.b.a.base has an A record. In this case rblsmtpd does not block mail. πŸ•ŠοΈ

You may supply any number of -r and -a options. rblsmtpd tries each source in turn until it finds one that lists or anti-lists $TCPREMOTEIP. She's thorough, she's not skipping anybody.

If you want to run your own RBL source or anti-RBL source for rblsmtpd, you can use rbldns from the DNScache (djbdns) package. DIY queen energy πŸ‘‘.

😭 Temporary errors 😭

Normally, if $RBLSMTPD is set, rblsmtpd uses a 451 error code in its limited SMTP conversation. This tells legitimate clients to try again later. It gives innocent relay operators a chance to see the problem, prohibit relaying, get off the RBL, and get the mail delivered. Second chances, we love to see it 🫢.

However, if $RBLSMTPD begins with a hyphen, rblsmtpd removes the hyphen and uses a 553 error code. This tells legitimate clients to bounce the message immediately. No thoughts, just bounce πŸ’€.

There are several error-handling options for RBL lookups:

  • -B β€” (Default.) Use a 451 error code for IP addresses listed in the RBL.
  • -b β€” Use a 553 error code for IP addresses listed in the RBL.
  • -C β€” (Default.) Handle RBL lookups in a ``fail-open'' mode. If an RBL lookup fails temporarily, assume that the address is not listed; if an anti-RBL lookup fails temporarily, assume that the address is anti-listed. Unfortunately, a knowledgeable attacker can force an RBL lookup or an anti-RBL lookup to fail temporarily, so that his mail is not blocked.
bestie, that last one is not a cute little quirk, it's an actual hole someone can drive a truck through. noted. πŸ™ˆ
  • -c β€” Handle RBL lookups in a ``fail-closed'' mode. If an RBL lookup fails temporarily, assume that the address is listed (but use a 451 error code even with -b). If an anti-RBL lookup fails temporarily, assume that the address is not anti-listed (but use a 451 error code even if a subsequent RBL lookup succeeds with -b). Unfortunately, this sometimes delays legitimate mail.

πŸ¦‹ SEE ALSO πŸ¦‹

tcpserver(1), tcprules(1), tcprulescheck(1), fixcrio(1), recordio(1), rblsmtpd(1), tcpclient(1), who@(1), date@(1), finger@(1), http@(1), tcpcat(1), mconnect(1), tcp-environ(5)

http://cr.yp.to/ucspi-tcp.html


okay that's the whole page bestie, we ate and left no crumbs πŸ’–βœ¨ This one's rblsmtpd(1) out of the General Commands Manual β€” go read the rest of the ucspi-tcp lineup over at http://cr.yp.to/ucspi-tcp.html, it's giving iconic, no cap. πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from