Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mail/postfix: Add support for configuring sender_canonical_maps #1406

Merged
merged 1 commit into from
Aug 9, 2019
Merged

mail/postfix: Add support for configuring sender_canonical_maps #1406

merged 1 commit into from
Aug 9, 2019

Conversation

0xFelix
Copy link
Contributor

@0xFelix 0xFelix commented Jul 14, 2019

This PR adds support for configuring postfix sender_canonical_maps with regexp expressions. This is needed when relaying mail over an external SMTP server that only allows sending with specific sender addresses. (e.g. only the address that was also used for authenticating with the external relay). This PR is based on the Address/virtual configuration in the postfix plugin and works mostly the same.

@0xFelix 0xFelix changed the title postfix: Add support for configuring sender_canonical_maps mail/postfix: Add support for configuring sender_canonical_maps Jul 14, 2019
@mimugmail
Copy link
Member

I had a short look and it looks good, will try to test tomorrow :)

@fichtner fichtner self-assigned this Jul 15, 2019
@0xFelix
Copy link
Contributor Author

0xFelix commented Jul 31, 2019

@mimugmail Ping :)

@mimugmail
Copy link
Member

Sorry, I just cloned your repo. Can you make sorting in Menu to number 48, it's not perfect but it looks better.

And can you give me an example of from and to so I can play around?

Also, do we need postmap for regexp type?

@0xFelix
Copy link
Contributor Author

0xFelix commented Aug 6, 2019

I change the sorting number to 48.

An example would be /.+/ as From address to rewrite every mail to the To address.

I read the postfix manuals again and it seems like it is definitely needed, so yes.

Copy link
Member

@mimugmail mimugmail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, it works and looks good. Thank you for your contribution. Merging might take a week or two since @fichtner is on vacation.

@fichtner
Copy link
Member

fichtner commented Aug 9, 2019

We don‘t have a regex validator yet so be aware that free-text regex can break a config.

@fichtner fichtner merged commit 63d397f into opnsense:master Aug 9, 2019
@fichtner
Copy link
Member

fichtner commented Aug 9, 2019

Merged, thanks!

@mimugmail
Copy link
Member

I told you to stay offline during vacation! ;) Thx

@fichtner
Copy link
Member

I‘m trying. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants