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

Do not send a rejection reply in case of auto mails #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

larhip
Copy link
Collaborator

@larhip larhip commented Aug 11, 2021

Prevent endless email loops by not sending a rejection reply for auto replies.
Is PR is based on PR#12 in combodo-email-synchro

@Hipska
Copy link
Collaborator

Hipska commented Aug 11, 2021

Why not combine both in 1 PR?

@larhip
Copy link
Collaborator Author

larhip commented Aug 11, 2021

Since we are talking about two extensions with two repositories (combodo/combodo-email-synchro.git and combodo/itop-standard-email-synchro.git) I thought this is not possible, is it?

@Hipska
Copy link
Collaborator

Hipska commented Aug 11, 2021

Oh whoops, missed that 😄

@@ -1201,6 +1202,7 @@ EOF
$oRawEmail->SendAsAttachment($sReplyTo, $sReplyFrom, $sReplySubject, $sReplyBody);

$this->sLastError .= " - Replied to sender on ".date('r');
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation is different compared to the surrounding code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn.. it was looking pretty right in my local editor, I their was a tab size of 2, but some of those tabs are spaces and some not...
image
But you are right, combodo coding standards suggest to configure it with 4 spaces..
I will correct this

@larhip larhip force-pushed the recjetion_reply_not_to_automails branch from ec6e5a7 to 0e72f77 Compare August 11, 2021 10:47
@Molkobain
Copy link
Contributor

Hello Lars, I'll check this PR on friday, would you update/rebase you branch on master in the meantime? Thanks

@Molkobain Molkobain self-assigned this May 3, 2022
@larhip larhip force-pushed the recjetion_reply_not_to_automails branch from 0e72f77 to f1b782f Compare May 4, 2022 12:42
@Molkobain
Copy link
Contributor

Molkobain commented Mar 7, 2023

Hello Lars,

We reviewed the PR today it seems that the new method is only used for unknown callers, what about auto-reply of known callers?

Edit: What I meant if that from our point of view it seems that this auto reply management could be applied in other use cases. We won't ask you to implement them, we were just wondering if you encountered them.

datamodel.itop-standard-email-synchro.xml Show resolved Hide resolved
$sReplyTo = $oEmail->sCallerEmail;
$aTo = $oRawEmail->GetTo();
$sReplyFrom = $aTo[0]['email'];
$this->Trace("From: ".$sReplyFrom."\nTo: ".$sReplyTo."\n".$sReplySubject."\n\n".$sReplyBody);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$this->Trace("From: ".$sReplyFrom."\nTo: ".$sReplyTo."\n".$sReplySubject."\n\n".$sReplyBody);

@larhip larhip force-pushed the recjetion_reply_not_to_automails branch from f1b782f to 27feacb Compare March 8, 2023 08:08
@larhip
Copy link
Collaborator Author

larhip commented Mar 8, 2023

Hi @Molkobain ,

you are right the method EmailMessage::IsAutoReplyEmail could be used in other use cases as well (i.e. to mark them as "undesired at all" / auto-replies for known callers).
But I feared to implement such logic since from my point of view this might be a design decision by Combodo and it might change the current behavior of iTop in a way some users would not like (in some cases it might be interested to get an out of office message in the ticket).

For this small use case "unknown caller" I have implemented it because it was the most urgent use case for us: With out this implementation we got sometime endless loop between iTop (rejection reply) an the mail server (auto-reply):

  • iTop: "Hey you are an unknown caller (noreply@localhost)"
  • Mailserver: "Hey please do not this mail address"
  • iTop: "Hey you are an unknown caller (noreply@localhost)"
  • Mailserver: "Hey please do not this mail address"
  • ....

Hope I could make my point clear :-)

@Molkobain
Copy link
Contributor

Yes perfect thanks!

@Molkobain
Copy link
Contributor

Accepted during functional review.
Will be merged once the other has been corrected / merged.

Feature will always be used for unknown callers.
Long term we should add an option on the mailbox itself to choose how to handle auto replies for the sender, additional contacts, ...

@Molkobain Molkobain removed their assignment Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Pending contributor update
Development

Successfully merging this pull request may close these issues.

4 participants