1

Recently had a user attach a .docx file that was 14 MB to a mailing. (Probably a single picture in the document was to blame.) As one would expect, the messages bounced rather than being delivered. However, the mailing reports just showed a bounce type of Syntax. As you can imagine, this is rather unhelpful. Digging around, I finally turned to the system's logging for maillog where I found the report of the attachment too large. Should I have found this information somewhere in CiviCRM itself? Perhaps in the mailing report that I overlooked?

3
  • Did you send a test e-mail to yourself first? Always a good idea. 14MB is pretty huge for an attachment - I believe Outlook/Exchange will often not allow receiving attachments larger than 10MB, for example. Also the fact that it's a .docx and could contain malware, like a Word macro, would probably cause many receiving systems to block it. Commented Dec 16, 2019 at 18:46
  • Yep. Again, you are correct. Those are all real problems that users are really good at not knowing, not remembering, and ignoring.
    – G H
    Commented Dec 19, 2019 at 13:58
  • OK then for now my suggested real world solution is to require a test e-mail be sent via permissions :) . And I agree that there should be a warning that an attachment is (probably) too large, added in core. Commented Dec 20, 2019 at 18:05

1 Answer 1

1

There's an administrative setting that controls that limit here:

Administer -> System Settings -> Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.)

The "syntax error" you are seeing is likely what the Civi mailer is getting back from the smtp server. I've seen that as a kind of catchall error message from mailers (e.g. it's what sparkpost will report when not configured). I don't think that Civi can do anything other than pass it on - i.e. the reporting error is from the system that's trying/failing to send out the mail.

Personally, I think there should be a message in the CiviMail system strongly discouraging attachments and encouraging attachments to be uploaded and linked to instead. That will increase deliverability.

The only really good use-case for attachments is if the document is private.

So the answer to your question is: "no".

4
  • While I agree with the sentiments, it's not real world, no matter how hard I fight it. Additionally, while helpful in the overall theme, this doesn't answer the question. Sorry.
    – G H
    Commented Dec 16, 2019 at 2:42
  • Perhaps you want to submit an extension or PR with a warning or message when using attachments in a CiviMail? To the effect that it's a bad idea and it might fail with a misleading error message from the mailer?
    – Alan Dixon
    Commented Dec 16, 2019 at 15:37
  • Great idea, if it doesn't already exist. However, this still is not on the topic of CiviCRM's bounce processing throwing an error/message when something like this happens.
    – G H
    Commented Dec 19, 2019 at 14:01
  • But you did see the update to my answer that is specific to your question, yes?
    – Alan Dixon
    Commented Dec 20, 2019 at 15:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.