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

Sending e-mail via SMTP gets stuck if TO/CC e-mail is invalid #2550

Closed
SEGGER-NV opened this issue Apr 23, 2019 · 5 comments
Closed

Sending e-mail via SMTP gets stuck if TO/CC e-mail is invalid #2550

SEGGER-NV opened this issue Apr 23, 2019 · 5 comments

Comments

@SEGGER-NV
Copy link

Infos:

  • Used Zammad version: 2.9
  • Installation method (source, package, ..): package
  • Operating system: Debian 9
  • Database + version: -
  • Elasticsearch version: -
  • Browser + version: Firefox latest

Expected behavior:

  • When answering via reply button and adding an invalid e-mail address to "TO" or "CC" Zammad throws an error and notifies the user that the e-mail address is invalid and where without trying to actually send to the invalid e-mail.

Actual behavior:

  • Initially no error message, email sending for that particular group is completely stuck and has to be killed manually. After killing the mail sending process error message is shown identifying the issue with the typed email address:

Delivery failed: "Unable to send email to 'testmail@example.com”': Can't use Channel::Driver::Smtp: #<Net::SMTPSyntaxError: 501 <testmail@example.com”>: malformed address: ”> may not follow <testmail@example.com >"

It would be great if the mail sending process would not be initiated before the validity of the e-mail address is checked.

Steps to reproduce the behavior:

  • Create new ticket
  • Answer via mail
  • Add receiver e-mail address to "TO" that has a trailing " symbol after the domain name.
  • Try sending mail via smtp

Yes I'm sure this is a bug and no feature request or a general question.

@MrGeneration
Copy link
Member

MrGeneration commented Apr 23, 2019

Sorry, but I can't reproduce this.
My Zammad-Instance does send a E-Mail to the Mail-System, which tells Zammad to provide a valid address. Zammad does try this up to 4 times - the error you receive comes from your Mail-System.

Closing now.

image

Edit:
This is the output after 4 times failing:
image

@SEGGER-NV
Copy link
Author

Hello,

Thank you for investigating.
Does Zammad have no verification if the set e-mail is valid?
I just noticed that there is also a lack of checking when creating a new user. This looks like a design flaw to me that the only check that is being done that there is some top level domain in the email address string. It seems not to be checked anywhere if the email address is valid.
So something@something.de13123"""" would be a valid user email address...

@MrGeneration
Copy link
Member

As far as I'm aware, Zammad does not check if the address is valid.
When creating users, Zammad does check E-Adresses, but not completely. so test@example does not work, but test@example.com" does.

@multiOTP
Copy link

As far as I'm aware, Zammad does not check if the address is valid.
When creating users, Zammad does check E-Adresses, but not completely. so test@example does not work, but test@example.com" does.

Please note that same thing happens if we choose in a ticket to send an Email to a user for which the email field is simply empty.

@MrGeneration
Copy link
Member

@multiOTP you're recycling a 2 year old issue.
Please don't. Above mentioned behavior is not a bug but will fail in any mail client if you fail to supply a correct mail address.

If there's a bug in Zammad, please create a new issue on this repo.
If this is a technical question, please create a community post over at https://community.zammad.org

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

3 participants