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

Add SRS alwaysrewrite config option #97

Closed
wants to merge 2 commits into from

Conversation

gregcouch
Copy link

so BATV (Bounce Adderss Tag Validation) is possible.

Comment on lines +177 to +191
/* Comment from Mark Kramer's envfrom2srs.pl:
* "Ok, first check whether we already have a signed SRS address;
* if so, just return the old address: we do not want to double-sign
* by accident! (Non-locally generated SRS0 addresses, by nature
* of the protocol, will not 'eval'; so, they will simply become
* SRS1 addresses. Thus, only locally generated SRS0 addresses are
* exempted from double-signing.)" */
result = srs_reverse(srs, value, sizeof(value), address);
if (result == SRS_SUCCESS) {
output = url_encode(outputbuf, sizeof(outputbuf), address);
fprintf (fp, "200 %s\n", output);
syslog (LOG_MAIL | LOG_INFO, "srs_forward: <%s> already signed", address);
fflush (fp);
return;
}
Copy link
Owner

Choose a reason for hiding this comment

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

  1. You should return a "500 Already resigned" result here, to remain consistent with the rest of PostSRSd, which will only return a 200 result if a rewrite actually took place (this is important because a 200 result will end processing the Postfix canonical_maps, which should only happen on a successful rewrite).

  2. I'm not exactly sure why this code block is neccessary to begin with. Is this assuming there is another program doing SRS rewrites?

@gregcouch
Copy link
Author

gregcouch commented Oct 23, 2019 via email

roehling added a commit that referenced this pull request Dec 3, 2020
This is a modified version of PR #97
Thanks to @gregcouch for the original idea.
@roehling
Copy link
Owner

roehling commented Dec 3, 2020

Superseded by 219b7de.

@roehling roehling closed this Dec 3, 2020
jeredfloyd pushed a commit to jeredfloyd/postsrsd that referenced this pull request May 4, 2022
This is a modified version of PR roehling#97
Thanks to @gregcouch for the original idea.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants