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

Support 'senders' and 'received-auth' in 'listen on socket' #709

Open
Wolf480pl opened this issue Jul 3, 2016 · 5 comments
Open

Support 'senders' and 'received-auth' in 'listen on socket' #709

Wolf480pl opened this issue Jul 3, 2016 · 5 comments
Assignees

Comments

@Wolf480pl
Copy link
Contributor

Currently listen on socket accepts only filters option.
It would be useful if it also accepted senders and received-auth options, which would behave like in regular listen directives.

@Wolf480pl Wolf480pl changed the title Feature request: Support senders and received-auth in listen on socket Feature request: Support 'senders' and 'received-auth' in 'listen on socket' Jul 3, 2016
@poolpOrg
Copy link
Member

I'll look into this next week during the hackathon ;-)

@Wolf480pl
Copy link
Contributor Author

Wolf480pl commented Apr 29, 2017

I started looking through the source code to see if it's been already implemented, and if not, how hard it would be to implement.

Apparently, if the config grammar was slightly changed to allow these two options in listen on socket, they would almost work, except s->username on the smtp_session would be empty.

Looks like the control process already checks the user's effective uid with getpeereid, and sends it to the pony process, so it's just a matter of taking it from here, resolving it to a username and putting the username in the smtp_session somewhere around here?

Oh, and the uid->username lookup would have to go through the lookup process, cause it requires /etc/passwd access... looks like the hard part.

@poolpOrg poolpOrg self-assigned this Jul 27, 2017
@poolpOrg poolpOrg modified the milestones: March 2018, October 2017 Jul 27, 2017
@poolpOrg poolpOrg removed this from the October 2017 milestone Aug 31, 2018
@ngortheone ngortheone changed the title Feature request: Support 'senders' and 'received-auth' in 'listen on socket' Support 'senders' and 'received-auth' in 'listen on socket' Oct 31, 2019
@ngortheone
Copy link
Contributor

@poolpOrg this looks a bit old.
What is the current status and are there any future plans regarding this?

@poolpOrg
Copy link
Member

poolpOrg commented Nov 1, 2019

The PR was not adding the feature correctly and adding it correctly is tricky.

The status is "this might require a rework of how we consider the socket in the daemon to be done right", so not closing as wontfix but keeping open as don't hold your breath.

@crabctrl
Copy link

Any update on this? Being able to use senders in particular feels quite important, as otherwise there's seemingly no way of restricting what addresses local users can use.

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

No branches or pull requests

4 participants