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

fix postfix plugin age to use ctime, not mtime #3525

Merged
merged 1 commit into from
Nov 29, 2017
Merged

fix postfix plugin age to use ctime, not mtime #3525

merged 1 commit into from
Nov 29, 2017

Conversation

phemmer
Copy link
Contributor

@phemmer phemmer commented Nov 29, 2017

Fixes #3521

Unfortunately ctime is not supported on all platforms, but I think the only such platform is windows, which doesn't support postfix anyway. However there are 2 different methods of getting ctime among the unix platforms, so I had to add conditional build tags to the different methods. You also cannot manually set a file's ctime, so we can't test it very well :-/

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

postfix modifies file mtime to track when the message should be retried (http://www.postfix.org/TUNING_README.html#hammer):

> the queue manager gives the queue file a time stamp into the future, so it won't be looked at for a while

So this change uses the file's ctime instead of mtime.
@danielnelson danielnelson merged commit bf65e19 into influxdata:master Nov 29, 2017
@danielnelson danielnelson added this to the 1.5.0 milestone Nov 29, 2017
@phemmer phemmer deleted the postfix-fix-age branch November 29, 2017 19:30
aromeyer pushed a commit to aromeyer/telegraf that referenced this pull request May 19, 2018
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.

postfix plugin does not properly track message age
2 participants