Giter Club home page Giter Club logo

Comments (10)

emersion avatar emersion commented on May 15, 2024 2

LGTM

from maddy.

Avamander avatar Avamander commented on May 15, 2024 2

Postfix can read these out of a database, it would be really nice if Maddy could as well.

from maddy.

foxcpp avatar foxcpp commented on May 15, 2024

Generic solution - rewrite operation

Single address rewrite defined directly in configuration

Generic form:

rewrite <initial address> [new address...]

This will replace a single address with multiple:

Rewrites are applied only once, so the directive above will not loop forever.

Regexp can be used in "Initial address" by wrapping it with /:

rewrite /(postmaster|admin)(@emersion\.fr)?/ [email protected]
Aliases mappings

More advanced rewriting (including mappings from files) is done using generic filter interface:

filter alias_map /etc/maddy/aliases 

We define a singleton module alias_map that performs rewriting using postfix's aliases file.

from maddy.

chaoticryptidz avatar chaoticryptidz commented on May 15, 2024

This is a REQUIRED feature and I NEED it to be a thing. Please don't assign this task to me. I just really require this.

from maddy.

chaoticryptidz avatar chaoticryptidz commented on May 15, 2024

Will this work in reverse, rewriting the From field in sent emails?

from maddy.

foxcpp avatar foxcpp commented on May 15, 2024

No.

from maddy.

chaoticryptidz avatar chaoticryptidz commented on May 15, 2024

Will accounts that match the new address in rewrite argument be allowed to send as the new address email?

from maddy.

foxcpp avatar foxcpp commented on May 15, 2024

At least, for now, we don't plan to add any checks regarding whether either From header or MAIL FROM matches actual sender account. So, technically, yes.

from maddy.

foxcpp avatar foxcpp commented on May 15, 2024

I guess something like that could work for database-based rewrites.

filter alias_sql {
  driver ...
  dsn ...

  query "SELECT target FROM aliases WHERE username = %u"
}

A user-specified query should return a single string column containing new addresses, multiple rows are allowed, obviously. If the query fails for whatever reason (including zero rows result) - no rewrite it done.

from maddy.

foxcpp avatar foxcpp commented on May 15, 2024

Apparently, 7efcd81 says this:

Does not close #18, that issue is for file-based mapping.

But GitHub decided to interpret this as "closes #18" and closed this issue, reopening.

from maddy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.