Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7027067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:11:57+00:00 2026-05-28T00:11:57+00:00

Trying to anonymize received headers for relayed messages from authenticated postfix users, there is

  • 0

Trying to anonymize received headers for relayed messages from authenticated postfix users, there is an example from https://we.riseup.net/debian/anonymizing-postfix:

/^Received: from (.* \([-._[:alnum:]]+ \[[.[:digit:]]{7,15}\]\)).*?([[:space:]]+).*\(Authenticated sender: ([^)]+)\).*by (auk\.riseup\.net) \(([^)]+)\) with (E?SMTPS?A?) id ([A-F[:digit:]]+).*/ REPLACE Received: from [127.0.0.1] (localhost [127.0.0.1])$2(Authenticated sender: $3)${2}with $6 id $7

When editing the file regexp:/etc/postfix/header_checks the result is an error message:

line 15: repetition-operator operand invalid

Now my guess is that the above regex is in PCRE format, where my Postfix requests a POSIX compatible regular expression.

How to make the above regular expression POSIX regexp compliant for use in a Postfix header_checks file?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:11:58+00:00Added an answer on May 28, 2026 at 12:11 am

    Your hunch is correct, .*? is a PCRE construct: .* is normal “any character, as many times as possible, at least zero times”, and the trailing question mark changes that to “… as few times as possible …”. SUSv4 says:

    The behavior of multiple adjacent duplication symbols ( ‘+’ , ‘*’ , ‘?’ , and intervals) produces undefined results.

    i haven’t studied the pattern too much, but you should be able to work around this particular incompatibility: the next subpattern is ([[:space:]]+), so you should be able to reformulate it as “any non-space character…”:

    [^[:space:]]*([[:space:]]+)
    

    or maybe just get rid of the problem by omitting the question mark. the space-eater is followed by another .* after all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to use RSS.NET . Example on the site is: (C#) string url =
Trying to honor a feature request from our customers, I'd like that my application,
I'm trying to use jQuery.getJSON to get data from a domain I don't own
Trying to launch and pass tel. no. to skype by this code from my
Trying to use Net::SFTP, version 2.05 (appears to be the latest). But it fails
I'm trying to secure a connection from a Java Client/Server application that communicates over
trying to do below, but don't know enough about reflection obviously. Example of what
trying to follow example in the expert f# book, and having an issue with
Trying to implement a MSMQ-backed WCF PubSub. I understand that net.msmq is one-way; however
Trying to learn asio, and I'm following the examples from the website. Why is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.