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

Adding new Smtp Reply codes to Enum. #98

Merged
merged 1 commit into from
Feb 28, 2019
Merged

Adding new Smtp Reply codes to Enum. #98

merged 1 commit into from
Feb 28, 2019

Conversation

reinaldocoelho
Copy link
Contributor

Hi @cosullivan.

We need to use some other of Reply Codes on server. Including some Temporary errors.
I was include on file other reply codes based on article:

Can we merge it to principal repository?

@cosullivan cosullivan merged commit 005c349 into cosullivan:master Feb 28, 2019
@cosullivan
Copy link
Owner

Hi @reinaldocoelho,

I've just done this now and will publish an updated package to Nuget later today.

Thanks,
Cain.

@reinaldocoelho
Copy link
Contributor Author

Hi @cosullivan!
Thank you :-)

@reinaldocoelho
Copy link
Contributor Author

Hi @cosullivan , created you a new Nuget Package with this new SMTP response list?
It is available?

@cosullivan
Copy link
Owner

Hi,

Sorry, I've just done it then v6.1.0.

Thanks,
Cain.

@bluewalk
Copy link

Hiya,

These codes are now available but there is no way yet returning these to the client connection.
Can you add the logic to MailCommand.cs ExecuteAsync-method to be able to return these or am I looking at it the wrong way?

My usecase is that I want to implement greylisting (https://tools.ietf.org/html/rfc6647) by returning code 421 so the client tries again later. Now the MailboxFilterResult.NoTemporarily returns 550 - mailbox unavailable which causes the client not to try again.

Cheers

@cosullivan
Copy link
Owner

Hi @bluewalk ,

If you want to return a different code from your IMailboxFilter then you can throw an SmtpResponseException

throw new SmtpResponseException(SmtpResponse.ServiceUnavailable);

The StmpResponseException can be thrown from within any of the hooks to control the response to a command.

Thanks, Cain.

@bluewalk
Copy link

Hi @cosullivan

Thanks! Will give that a try.

Have a great day!

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.

3 participants