CDLUC3 / ezid

CDLUC3 ezid
MIT License
10 stars 4 forks source link

[BUG] Contact form submissions not being passed through to inbox #774

Open adambuttrick opened 3 weeks ago

adambuttrick commented 3 weeks ago

Describe the bug Contact form submissions on ezid.cdlib.org/contact do not appear to be being passed through successfully. Messages sent through the form (most recently at 3:20PM PST on 10/29/2024) do not generate automatic responses or create tickets in Freshdesk.

To Reproduce

  1. Go to 'https://ezid.cdlib.org/contact'
  2. Fill out contact form
  3. Submit form
  4. No confirmation message is sent to the supplied email or ticket created in Freshdesk

Expected behavior

Device information:

Additional context Direct emails to ezid@ucop.edu are being received normally, suggesting the issue is specific to the web form submission process.

jsjiang commented 3 weeks ago

Email error message in ezid@uc3-ezidui-prd02:18:31:33:/var/log/maillog

Oct 29 15:19:45 uc3-ezidui-prd02 postfix/smtp[2127393]: CE982822847: to=<ezid@ucop.edu>, relay=email-smtp.us-west-2.amazonaws.com[54.185.234.152]:25, delay=0.15, delays=0.01/0.03/0.07/0.03, dsn=5.0.0, status=bounced (host email-smtp.us-west-2.amazonaws.com[54.185.234.152] said: 554 Message rejected: Email address is not verified. The following identities failed the check in region US-WEST-2: adam.buttrick@ucop.edu (in reply to end of DATA command))

Oct 29 15:19:46 uc3-ezidui-prd02 postfix/smtp[2127393]: F30A6822854: to=<adam.buttrick@ucop.edu>, relay=email-smtp.us-west-2.amazonaws.com[54.185.234.152]:25, delay=0.08, delays=0/0/0.07/0, dsn=5.0.0, status=bounced (host email-smtp.us-west-2.amazonaws.com[54.185.234.152] said: 501 Invalid MAIL FROM address provided (in reply to MAIL FROM command))
jsjiang commented 3 weeks ago

Successful email from batch download:

Oct 29 18:59:18 uc3-ezidui-stg01 postfix/smtpd[2228659]: connect from localhost[127.0.0.1]
Oct 29 18:59:18 uc3-ezidui-stg01 postfix/trivial-rewrite[2228661]: using backwards-compatible default setting append_dot_mydomain=yes to rewrite "uc3-ezidui-stg01" to "uc3-ezidui-stg01.cdlib.org"
Oct 29 18:59:18 uc3-ezidui-stg01 postfix/trivial-rewrite[2228661]: using backwards-compatible default setting append_dot_mydomain=yes to rewrite "uc3-ezidui-stg01" to "uc3-ezidui-stg01.cdlib.org"
Oct 29 18:59:18 uc3-ezidui-stg01 postfix/smtpd[2228659]: 28203103916C: client=localhost[127.0.0.1]
Oct 29 18:59:18 uc3-ezidui-stg01 postfix/trivial-rewrite[2228661]: using backwards-compatible default setting append_dot_mydomain=yes to rewrite "uc3-ezidui-stg01" to "uc3-ezidui-stg01.cdlib.org"
Oct 29 18:59:18 uc3-ezidui-stg01 postfix/trivial-rewrite[2228661]: using backwards-compatible default setting append_dot_mydomain=yes to rewrite "uc3-ezidui-stg01" to "uc3-ezidui-stg01.cdlib.org"
Oct 29 18:59:18 uc3-ezidui-stg01 postfix/cleanup[2228662]: 28203103916C: message-id=<173025355813.198570.18257157053267942596@uc3-ezidui-stg01.cdlib.org>
Oct 29 18:59:18 uc3-ezidui-stg01 postfix/qmgr[2528]: 28203103916C: from=<ezid@uc3-ezidui-stg01.cdlib.org>, size=832, nrcpt=1 (queue active)
Oct 29 18:59:18 uc3-ezidui-stg01 postfix/smtpd[2228659]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Oct 29 18:59:18 uc3-ezidui-stg01 postfix/smtp[2228663]: 28203103916C: to=<jing.jiang@ucop.edu>, relay=email-smtp.us-west-2.amazonaws.com[44.225.148.59]:25, delay=0.28, delays=0.02/0.08/0.04/0.15, dsn=2.0.0, status=sent (250 Ok 01010192db261213-1f935daa-741f-47e2-ae47-091872a73a64-000000)
Oct 29 18:59:18 uc3-ezidui-stg01 postfix/qmgr[2528]: 28203103916C: removed

Failed email from contact form:

Oct 29 19:07:37 uc3-ezidui-stg02 postfix/smtpd[2136578]: connect from localhost[127.0.0.1]
Oct 29 19:07:37 uc3-ezidui-stg02 postfix/smtpd[2136578]: CD663176C52: client=localhost[127.0.0.1]
Oct 29 19:07:37 uc3-ezidui-stg02 postfix/cleanup[2136581]: CD663176C52: message-id=<173025405782.1525367.7903443516551887764@uc3-ezidui-stg02.cdlib.org>
Oct 29 19:07:37 uc3-ezidui-stg02 postfix/qmgr[2043]: CD663176C52: from=<jing.jiang@ucop.edu>, size=746, nrcpt=1 (queue active)
Oct 29 19:07:37 uc3-ezidui-stg02 postfix/smtpd[2136578]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Oct 29 19:07:38 uc3-ezidui-stg02 postfix/smtp[2136582]: CD663176C52: to=<ezid@ucop.edu>, relay=email-smtp.us-west-2.amazonaws.com[52.13.3.84]:25, delay=0.21, delays=0.01/0.08/0.07/0.05, dsn=5.0.0, status=bounced (host email-smtp.us-west-2.amazonaws.com[52.13.3.84] said: 554 Message rejected: Email address is not verified. The following identities failed the check in region US-WEST-2: jing.jiang@ucop.edu (in reply to end of DATA command))
Oct 29 19:07:38 uc3-ezidui-stg02 postfix/cleanup[2136581]: 0E825176C53: message-id=<20241030020738.0E825176C53@uc3-ezidui-stg02.cdlib.org>
Oct 29 19:07:38 uc3-ezidui-stg02 postfix/qmgr[2043]: 0E825176C53: from=<>, size=2999, nrcpt=1 (queue active)
Oct 29 19:07:38 uc3-ezidui-stg02 postfix/bounce[2136583]: CD663176C52: sender non-delivery notification: 0E825176C53
Oct 29 19:07:38 uc3-ezidui-stg02 postfix/qmgr[2043]: CD663176C52: removed
Oct 29 19:07:38 uc3-ezidui-stg02 postfix/smtp[2136582]: 0E825176C53: to=<jing.jiang@ucop.edu>, relay=email-smtp.us-west-2.amazonaws.com[44.225.148.59]:25, delay=0.1, delays=0/0/0.09/0, dsn=5.0.0, status=bounced (host email-smtp.us-west-2.amazonaws.com[44.225.148.59] said: 501 Invalid MAIL FROM address provided (in reply to MAIL FROM command))
Oct 29 19:07:38 uc3-ezidui-stg02 postfix/qmgr[2043]: 0E825176C53: removed

Note: Check email_from field setting

jsjiang commented 3 weeks ago

We started to use SES for postfix email on the EZID instances since July. This requires the "From" address be a verified sender/domain. We have a few sending email functions in EZID. Only the contact us form uses the user's email address as the "from" email. All others use the ezid@servername.cdlib.org email such as ezid@uc3-ezidui-stg01.cdlib.org.

Solution options:

  1. ask IAS if it is possible to allow user provided email address as the "from" email
  2. investigate if we can config Freshdesk to use the email address provided in the message body as the new sender
jsjiang commented 3 weeks ago

Solution suggestion from DMPTool: