On Mon, Oct 10, 2022 at 07:22:18 -0400, Wietse Venema wrote:
>     To find out if you have messages flagged as "corrupt", you can
>     use the "postfix check" command.
> 
>     Execute as root:
> 
>         postfix check
> 



FYI, with grep 3.8, this triggers deprecation warnings on 'egrep':

$ sudo postfix check
egrep: warning: egrep is obsolescent; using grep -E

Usage of 'egrep' in postfix-script (as well as postfix-tls-script)
should be replaced with 'grep -E', patch attached.

The documentation refers to egrep/fgrep in several places as well.


        Geert


--- postfix-script.orig 2022-10-10 14:44:51.000000000 +0200
+++ postfix-script      2022-10-10 17:03:24.466658356 +0200
@@ -328,7 +328,7 @@
        # Check Postfix mail_owner-owned directory tree owner.
 
        find `ls -d $queue_directory/* | \
-           egrep 
'/(saved|incoming|active|defer|deferred|bounce|hold|trace|corrupt|public|private|flush)$'`
 \
+           grep -E 
'/(saved|incoming|active|defer|deferred|bounce|hold|trace|corrupt|public|private|flush)$'`
 \
            ! \( -type p -o -type s \) ! -user $mail_owner \
                -exec $WARN not owned by $mail_owner: {} \;
 
--- postfix-tls-script.orig     2022-10-10 14:44:51.000000000 +0200
+++ postfix-tls-script  2022-10-10 17:03:32.139954539 +0200
@@ -333,7 +333,7 @@
 }
 rsa=
 ecdsa=
-for _algo in `$postconf -T public-key-algorithms | egrep '^(rsa|ecdsa)$'`
+for _algo in `$postconf -T public-key-algorithms | grep -E '^(rsa|ecdsa)$'`
 do
     eval $_algo=$_algo
 done
@@ -415,7 +415,7 @@
     for cmd in ec rsa; do
        $openssl $cmd -passin "pass:umask 077" -in "$1" -pubout |
        $openssl $cmd -pubin -outform DER |
-       hex_sha256 | egrep -v "${null256}" && return 0
+       hex_sha256 | grep -E -v "${null256}" && return 0
     done 2>/dev/null
     return 1
 }
@@ -429,7 +429,7 @@
     for cmd in ec rsa; do
        $openssl x509 -pubkey -noout -in "$1" |
        $openssl $cmd -pubin -outform DER |
-       hex_sha256 | egrep -v "${null256}" && return 0
+       hex_sha256 | grep -E -v "${null256}" && return 0
     done 2>/dev/null
     return 1
 }

Reply via email to