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 smtp_bind_address #665

Merged
merged 9 commits into from
May 25, 2018
Merged

mail/postfix: Add smtp_bind_address #665

merged 9 commits into from
May 25, 2018

Conversation

mimugmail
Copy link
Member

Copy link
Member

@fichtner fichtner left a comment

Choose a reason for hiding this comment

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

I know postfix does it like this, but shouldn’t we add a bind interface selection and figure out all IPs? Proxy does it like this.

@mimugmail
Copy link
Member Author

The problem with postfix is there are two ways ... receiving mails (also bound IP like in sockstat) and sending mails, tcp connection always opens on demand.

Receiving mails would be handled via listen address field.

We can do it like in this PR, or add another 2 fields for binding to the receiving daemon, which would be more confusing IMO.

@mimugmail
Copy link
Member Author

Oh .. binding to sender can only be one .. so select field is not a good option if you meant this

@fichtner
Copy link
Member

fichtner commented May 9, 2018

I’m that case it’s ok as is (minus multi-select) but hidden under advanced toggle... this is prone to breakage.

@mimugmail
Copy link
Member Author

Like this?

@fichtner fichtner self-assigned this May 14, 2018
@@ -23,6 +23,12 @@
<default>all</default>
<Required>Y</Required>
</inet_interfaces>
<bind_address type="NetworkField">
Copy link
Member

Choose a reason for hiding this comment

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

can we not pin this to an address family? if not the validation is leaky and may break postfix config

Copy link
Member Author

Choose a reason for hiding this comment

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

You mean in temlating? if contains ':' bind6 else bind4 and only one bind field?

Copy link
Member

Choose a reason for hiding this comment

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

maybe this is more of a question for @AdSchellevis for the NetworkField type validation :)

Copy link
Member Author

Choose a reason for hiding this comment

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

The problem is .. postfix has 2 directives, one for v4, one for v6, but, every directive is only allowed to have one value. I have no idea how to correctly build this .. not sure if this makes more work than solving a problem for one or two guys :)

Copy link
Member

Choose a reason for hiding this comment

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

that's exactly why I mention it... the validation is not correct and it will create support efforts for other people who possibly cannot read but use advanced settings ... ;)

Copy link
Member Author

Choose a reason for hiding this comment

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

@fichtner How to go on with this? @AdSchellevis Is validation with mask only for TextField? I tried this for NetworkField:

v4
/^\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}$/
v6
/^([0-9a-fA-F:]){1,40}$/u

But doesn't seem to work ...

@fichtner fichtner merged commit d932292 into opnsense:master May 25, 2018
@fichtner
Copy link
Member

Merged, thanks!

@mimugmail mimugmail deleted the smtpbind branch July 10, 2018 18:36
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.

2 participants