Project

General

Profile

Actions

tickets #182201

open

mailman3 /usr/local/bin/postfix-domnotfound

Added by crameleon about 18 hours ago. Updated about 18 hours ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Mailing lists
Target version:
-
Start date:
2025-05-12
Due date:
% Done:

0%

Estimated time:

Description

mailman3.i.o.o has this:

$ more /usr/local/bin/postfix-domnotfound
#!/bin/sh
#
# 20230327 pjessen
# every day, we have a few of these queued.
# they can never be delivered, so we might as well get
# rid of them.
#
len=${1:-22}
postqueue -p | egrep -q -B2 "@[^.-]{$len}.*Domain not found" || exit 0

echo -e "postfix queue clean-up: mails from long ($len chars or more) unresolvable domains:\n"
postqueue -p |\
egrep -B2 "@[^.-]{$len}.*Domain not found" |\
awk '/^[0-9A-F]+[^!*]/{print $1}' |\
postsuper -d -

$ more /etc/cron.d/postfix-dom-not-found
SHELL=/bin/sh
PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin
MAILTO=admin-auto@opensuse.org
0 6 * * *  root /usr/local/bin/postfix-domnotfound
  1. Assess if this is still needed
  2. if yes, track it in Git/Salt and replace obsolete egrep call whilst at it
  3. if no, remove
Actions #1

Updated by crameleon about 18 hours ago

  • Subject changed from /usr/local/bin/postfix-domnotfound to mailman3 /usr/local/bin/postfix-domnotfound
  • Private changed from Yes to No
Actions

Also available in: Atom PDF