-
Notifications
You must be signed in to change notification settings - Fork 145
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
cass smtpd refactor #5005
cass smtpd refactor #5005
Conversation
dd79a68
to
6542034
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! But can we make the magic string be a little more verbose, e.g.: needs_smtp or needs_component_smtp?
@ksmurchison The The |
@ksmurchison I started adding some comments explaining how to use |
so we don't need to conditionally skip them anymore
spawns fewer fakesmtpd processes when they're not being used
* Reset it to zero on MAIL FROM and RSET, because these server processes can be reused for multiple emails or connections. This effectively makes it a per-message recipient limit, where previously it was a per-process limit * Explicitly initialise it to zero in new, so that it's obvious it exists
Cyrus will default to sending outgoing mail via sendmail if not otherwise configured, which is potentially a problem when running Cassandane on a machine configured to send mail to the world. Make Cassandane set Cyrus up with an invalid smtp configuration by default, so that if some test case hits smtpclient_open without having been set up for it, the test just breaks instead of sending mail.
b0fea07
to
3b601fd
Compare
Also remembered that we already have a general purpose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks real great to me. Looking forward to these fixes.
Refactors Cassandane's smtpd setup to address a few different issue. This probably makes most sense when reviewed commit by commit.
utils/fakesmtpd
) that's fork-exec'd rather than just forked. This means:smtpclient_open()
will fail due to the bad config and no mail will go out.want
parameter for tests to request it if they need it, and we don't configure or start it unless they request it. This shaves a decent amount of time vs starting it for every test like we used to.