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

Reply by Email Review and Refactoring #8356

Open
Tracked by #10665
namangupta01 opened this issue Aug 26, 2020 · 11 comments
Open
Tracked by #10665

Reply by Email Review and Refactoring #8356

namangupta01 opened this issue Aug 26, 2020 · 11 comments
Assignees
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed

Comments

@namangupta01
Copy link
Member

Hey! I was recently using reply by email feature. There was no hide and show button for quoted content in comment as we used to have at the starting.
As in the image, quoted content is visible and we don't have any show and hide button for quoted content.
Screenshot 2020-08-27 at 01 02 25

@jywarren Did we intentionally removed it? If not, then I would like to fix it.

And also @jywarren did we have any issue with the email parsing in the past?
Do you have any idea why we are using ?

def parse_quoted_text

Thank You!!

@namangupta01 namangupta01 added the bug the issue is regarding one of our programs which faces problems when a certain task is executed label Aug 26, 2020
@namangupta01 namangupta01 self-assigned this Aug 26, 2020
@ebarry
Copy link
Member

ebarry commented Aug 26, 2020

Thanks for reporting this @namangupta01 ! also, it's great to hear from you 💡
I have also noticed this over the past few months and was concerned. It is not our intention to show the quoted content, but you'd have to ask @jywarren or @cesswairimu perhaps for details

@ebarry
Copy link
Member

ebarry commented Sep 21, 2020

Thanks again for spotting this @namangupta01 , I think several active users have pointed out the same issue with email signatures showing up in comments posted by email (again).

@cesswairimu
Copy link
Collaborator

cesswairimu commented Sep 28, 2020

I don't think we removed it linking #7321 which is related. @namangupta01 we would love your help. Thanks

@namangupta01
Copy link
Member Author

Yeah sure! I will work on it.

@jywarren
Copy link
Member

jywarren commented Oct 6, 2020

omg that would be great! Thanks @namangupta01 and so glad to see you! Perhaps we can add a small system test assertion for that to protect it as well.

@TildaDares TildaDares mentioned this issue Jan 18, 2022
4 tasks
@aliciapaz aliciapaz self-assigned this Jan 28, 2022
@aliciapaz
Copy link
Contributor

Hey, @TildaDares I'd like to work on this.

I was trying to reproduce the error but I didn't know how really (since it's an email feature)

@TildaDares
Copy link
Member

TildaDares commented Jan 28, 2022

Hi @aliciapaz, Mailman is the gem used for the reply by email feature but it's hard to get any recent/helpful documentation on how to use it.

I tried running the command in our documentation for the feature but I'm getting this error

I, [2022-01-28T02:45:14.980283 #52855]  INFO -- : Mailman v0.7.0 started
I, [2022-01-28T02:45:14.980375 #52855]  INFO -- : Rails root found in ., requiring environment...
I, [2022-01-28T02:45:24.186264 #52855]  INFO -- : POP3 receiver enabled (@).
I, [2022-01-28T02:45:24.205482 #52855]  INFO -- : Polling enabled. Checking every 20 seconds.
E, [2022-01-28T02:45:24.206249 #52855] ERROR -- : Connection refused - connect(2) for nil port 995

This is the code for the reply by email

def self.new_comment_from_email(mail)
user = User.where(email: mail.from.first).first
if user
node_id = mail.subject[/#([\d]+)/, 1] # This tooks out the node ID from the subject line
comment_id = mail.subject[/#c([\d]+)/, 1] # This tooks out the comment ID from the subject line if it exists
unless Comment.where(message_id: mail.message_id).any?
if node_id.present? && !comment_id.present?
parse_comment_from_email(mail, node_id, user)
elsif comment_id.present?
comment = Comment.find comment_id
parse_comment_from_email(mail, comment.nid, user, [true, comment.id])
end
end
return node_id
else
email = mail.select { |s| s.match(/.*@.*/) }
ActionMailer::Base.mail(
from: "do-not-reply@publiclab.org",
to: email,
subject: "Could not post your reply",
body: "Your reply wasn't posted since we couldn't find your account on publiclab.org. Please sign up at https://publiclab.org or try sending email from the account matching your username. Thank you!"
).deliver
end
end

cc. @jywarren

@TildaDares
Copy link
Member

@jywarren Since Action Mailbox has more documentation and support, can we think of switching to it instead of using mailman?

@jywarren
Copy link
Member

jywarren commented Feb 1, 2022

Gosh this has been broken for some time. I have been wanting to try debugging with Sebastian but we have been doing a series of big migrations of other systems to Google Cloud. I want to say we should be able to get mailman working again but it's a good point about Action Mailbox being more supported. How big of a project do you think the transition would be?

@Forchapeatl
Copy link
Contributor

Forchapeatl commented Mar 16, 2022

@TildaDares Please may I work on this issue ?

@jywarren
Copy link
Member

Hi @Forchapeatl I worry this is a really gigantic project -- say, "switching to Action Mailbox" for example, or even the kind of deep digging it might take to debug mailman, since we use multiple Docker containers to run this. Does some part of it look like a smaller piece you could try taking on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug the issue is regarding one of our programs which faces problems when a certain task is executed
Projects
None yet
Development

No branches or pull requests

7 participants