Code Monkey home page Code Monkey logo

Comments (19)

nguyenkims avatar nguyenkims commented on May 22, 2024

Replying from an alias can only work from your personal email. This is to make sure only you can send emails from your alias. The error you got means the reply is sent from an empty email (the actual mail_from variable).

from app.

havedill avatar havedill commented on May 22, 2024

Odd. It was supposed to be a trello "activation" or welcome email. I did not reply to this (nor did i get it due to the exception)

I dug deeper into the sentry errors. I think what happened here was Trello attempted to send me an email, the server for some reason didn't like the alias, and attempted to send an email back saying it was rejected. Then i saw these errors...

Also, is there a way to change my "from" name. I noticed in these debug logs that the from user is "Son at SimpleLogin"

(Deleting my images because they contained my domain by accident)

from app.

nguyenkims avatar nguyenkims commented on May 22, 2024

Also, is there a way to change my "from" name. I noticed in these debug logs that the from user is "Son at SimpleLogin"

This is hardcoded in the code (this dated from the time when I was alone on the project :) ), I will add a setting so you could change it.

For the trello issue, I just created an account with my custom domain via SimpleLogin (SaaS version) and received the activation email. I will create a server from scratch tomorrow to test again. Will keep you posted.

from app.

nguyenkims avatar nguyenkims commented on May 22, 2024

@havedill this is the PR to set another support name #56

from app.

nguyenkims avatar nguyenkims commented on May 22, 2024

@havedill this param is now included in version 1.0.2

from app.

nguyenkims avatar nguyenkims commented on May 22, 2024

Just tested with a clean server and everything seems to work fine, I got the activation email from Trello. Could you try again with a clean install please?

from app.

havedill avatar havedill commented on May 22, 2024

Just got the same thing on 1.0.3 when signing up on investing.com

image

from app.

havedill avatar havedill commented on May 22, 2024

@nguyenkims do you have a discord or somewhere i can DM you a share link to my Sentry exception?

from app.

havedill avatar havedill commented on May 22, 2024

Postfix logs

Feb  5 15:21:10 ip-172-31-16-197 postfix/smtpd[25396]: connect from mta3-20.mail.investing.com[185.168.113.20]
Feb  5 15:21:10 ip-172-31-16-197 postfix/smtpd[25396]: B9F304EE8E: client=mta3-20.mail.investing.com[185.168.113.20]
Feb  5 15:21:10 ip-172-31-16-197 postfix/cleanup[25403]: B9F304EE8E: message-id=<[email protected]>
Feb  5 15:21:11 ip-172-31-16-197 postfix/qmgr[1328]: B9F304EE8E: from=<[email protected]>, size=21207, nrcpt=1 (queue active)
Feb  5 15:21:11 ip-172-31-16-197 postfix/smtpd[25396]: disconnect from mta3-20.mail.investing.com[185.168.113.20] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
Feb  5 15:21:11 ip-172-31-16-197 postfix/smtpd[25405]: connect from unknown[240.0.0.5]
Feb  5 15:21:12 ip-172-31-16-197 postfix/smtpd[25405]: 013D04EE94: client=unknown[240.0.0.5]
Feb  5 15:21:12 ip-172-31-16-197 postfix/cleanup[25403]: 013D04EE94: message-id=<[email protected]>
Feb  5 15:21:12 ip-172-31-16-197 postfix/qmgr[1328]: 013D04EE94: from=<[email protected]>, size=21495, nrcpt=1 (queue active)
Feb  5 15:21:12 ip-172-31-16-197 postfix/smtpd[25405]: disconnect from unknown[240.0.0.5] ehlo=1 mail=1 rcpt=1 data=1 commands=4
Feb  5 15:21:12 ip-172-31-16-197 postfix/smtp[25404]: B9F304EE8E: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:20381, delay=1.5, delays=0.49/0.03/0/0.97, dsn=2.0.0, status=sent (250 Message accepted for delivery)
Feb  5 15:21:12 ip-172-31-16-197 postfix/qmgr[1328]: B9F304EE8E: removed
Feb  5 15:21:12 ip-172-31-16-197 postfix/smtp[25404]: 013D04EE94: to=<[email protected]>, relay=email-smtp.us-east-1.amazonaws.com[34.193.234.8]:587, delay=0.35, delays=0.01/0.01/0.12/0.21, dsn=5.0.0, status=bounced (host email-smtp.us-east-1.amazonaws.com[34.193.234.8] said: 554 Transaction failed: Duplicate header 'List-Unsubscribe'. (in reply to end of DATA command))
Feb  5 15:21:12 ip-172-31-16-197 postfix/cleanup[25403]: 593574EE96: message-id=<[email protected]>
Feb  5 15:21:12 ip-172-31-16-197 postfix/qmgr[1328]: 593574EE96: from=<>, size=23701, nrcpt=1 (queue active)
Feb  5 15:21:12 ip-172-31-16-197 postfix/bounce[25408]: 013D04EE94: sender non-delivery notification: 593574EE96
Feb  5 15:21:12 ip-172-31-16-197 postfix/smtpd[25396]: connect from unknown[240.0.0.5]
Feb  5 15:21:12 ip-172-31-16-197 postfix/qmgr[1328]: 013D04EE94: removed
Feb  5 15:21:12 ip-172-31-16-197 postfix/smtpd[25405]: connect from unknown[240.0.0.5]
Feb  5 15:21:12 ip-172-31-16-197 postfix/smtpd[25405]: 772E94EE8E: client=unknown[240.0.0.5]
Feb  5 15:21:12 ip-172-31-16-197 postfix/cleanup[25403]: 772E94EE8E: message-id=<158091607247.1.12017587329527402881@8a433dbb1058>
Feb  5 15:21:12 ip-172-31-16-197 postfix/qmgr[1328]: 772E94EE8E: from=<[email protected]>, size=1860, nrcpt=1 (queue active)
Feb  5 15:21:12 ip-172-31-16-197 postfix/smtpd[25405]: disconnect from unknown[240.0.0.5] ehlo=1 mail=1 rcpt=1 data=1 commands=4
Feb  5 15:21:12 ip-172-31-16-197 postfix/smtpd[25405]: connect from unknown[240.0.0.5]
Feb  5 15:21:12 ip-172-31-16-197 postfix/smtpd[25405]: warning: Illegal address syntax from unknown[240.0.0.5] in RCPT command: <>
Feb  5 15:21:12 ip-172-31-16-197 postfix/smtp[25407]: 593574EE96: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:20381, delay=0.18, delays=0.01/0/0/0.17, dsn=5.0.0, status=bounced (host 127.0.0.1[127.0.0.1] said: 500 Error: (SMTPRecipientsRefused) {'<>': (501, b'5.1.3 Bad recipient address syntax')} (in reply to end of DATA command))
Feb  5 15:21:12 ip-172-31-16-197 postfix/qmgr[1328]: 593574EE96: removed
Feb  5 15:21:12 ip-172-31-16-197 postfix/smtp[25404]: 772E94EE8E: to=<[email protected]>, relay=email-smtp.us-east-1.amazonaws.com[34.193.234.8]:587, delay=0.47, delays=0.02/0/0.13/0.32, dsn=2.0.0, status=sent (250 Ok 0100017015f0e0ca-8bbdbbbe-b2b8-49fb-92d7-44c21a991542-000000)
Feb  5 15:21:12 ip-172-31-16-197 postfix/qmgr[1328]: 772E94EE8E: removed

This is sticking out to me said: 554 Transaction failed: Duplicate header 'List-Unsubscribe'. (in reply to end of DATA command))

from app.

nguyenkims avatar nguyenkims commented on May 22, 2024

@nguyenkims do you have a discord or somewhere i can DM you a share link to my Sentry exception?

You can send the link to my email at [email protected]

from app.

nguyenkims avatar nguyenkims commented on May 22, 2024

This issue is not obvious 🤔, I think there are actually 2 problems:

  • the mysterious <> address: I think this one is due Postfix trying to send the bounce report. Do you know a way to reproduce this error? I have tried signing on investing.com but it requires a phone number that I don't want to give ...
  • duplicated List-Unsubscribe: this should not happen as SimpleLogin replaces this header. This is to avoid users revealing inadvertently their real email address when clicking on the email client "Unsubscribe" button. Same, if the problem happens again on another website than investing.com, please let me know.

from app.

havedill avatar havedill commented on May 22, 2024

Yeah when i sign up with email (it doens't require a phone # btw) i can reproduce it. I can also reproduce it when attempting to resend the activation email.
image

Maybe it has something to do with my routing through SES. I'll dig in on that side more

from app.

havedill avatar havedill commented on May 22, 2024

I feel like this part ofthe code from app/email_utils.py must not be throwing a value error exception, and adding a duplicate Unsubscribe header;

But i'm not sure how to test. Never worked with docker too much. Guess i'll have to see if i can make my own image

def add_or_replace_header(msg: Message, header: str, value: str):
    try:
        msg.add_header(header, value)
    except ValueError:
        # the header exists already
        msg.replace_header(header, value)

from app.

havedill avatar havedill commented on May 22, 2024

Ok i temporarly bypassed this issue by adding an if statement. Since it's for my own personal use i dont really care about the unsubscribe header for simplelogin anyways.

This allowed the email to go through, and maintained the investing.com unsubscribe header

def add_or_replace_header(msg: Message, header: str, value: str):
    try:
        if header != "List-Unsubscribe":
            msg.add_header(header, value)
    except ValueError:
        # the header exists already
        msg.replace_header(header, value)

from app.

nguyenkims avatar nguyenkims commented on May 22, 2024

@havedill I think I found the bug. The implementation of add_or_replace_header is indeed incorrect in case a header appears multiple times in the email header. This PR should fix it:

#77

We have tested this PR in staging and everything seems working correctly. Would be great if you could give it a try on your server.

from app.

havedill avatar havedill commented on May 22, 2024

Excellent! Is there a 1.0.4 image i can pull or what is the best method for me to pull it into my container?

from app.

nguyenkims avatar nguyenkims commented on May 22, 2024

@havedill you can use this image simplelogin/app-ci:email-header.

from app.

havedill avatar havedill commented on May 22, 2024

@nguyenkims looks like it is working fine! thanks for the fix :)

from app.

nguyenkims avatar nguyenkims commented on May 22, 2024

@havedill the version 1.0.4 is just released, feel free to use it instead of the simplelogin/app-ci:email-header. They are essentially the same but the simplelogin/app-ci:email-header is reserved for our CI and could change.

from app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.