[GH-ISSUE #16] Change message subject #14

Open
opened 2026-02-27 15:44:57 +03:00 by kerem · 3 comments
Owner

Originally created by @base1983 on GitHub (Jul 11, 2016).
Original GitHub issue: https://github.com/Pro/exchange-catchall/issues/16

Is it possible to change the subject with a prepend? Like subject: [NON EXISTEND USER] SUBJECT.

Originally created by @base1983 on GitHub (Jul 11, 2016). Original GitHub issue: https://github.com/Pro/exchange-catchall/issues/16 Is it possible to change the subject with a prepend? Like subject: [NON EXISTEND USER] SUBJECT.
Author
Owner

@Pro commented on GitHub (Jul 11, 2016):

It's not yet implemented, but it would be possible.

For that functionality the config needs two additional optional fields. Something like:

<Domain name="^.*@(.*)\.catchall.com$" regex="true" address="$1@example.org">
<Fallback address="fallback@example.org" subjectPrepend="NON EXISTEND USER"/>
</Domain>

and then the signer needs to check if the user from $1 exists, somewhere here:
https://github.com/Pro/exchange-catchall/blob/master/CatchAllAgent/CatchAllAgent.cs#L217

This is the harder part: How can the transport agent check for existing users?

I'm open for suggestions or pull requests.

<!-- gh-comment-id:231713995 --> @Pro commented on GitHub (Jul 11, 2016): It's not yet implemented, but it would be possible. For that functionality the config needs two additional optional fields. Something like: ``` <Domain name="^.*@(.*)\.catchall.com$" regex="true" address="$1@example.org"> <Fallback address="fallback@example.org" subjectPrepend="NON EXISTEND USER"/> </Domain> ``` and then the signer needs to check if the user from `$1` exists, somewhere here: https://github.com/Pro/exchange-catchall/blob/master/CatchAllAgent/CatchAllAgent.cs#L217 This is the harder part: How can the transport agent check for existing users? I'm open for suggestions or pull requests.
Author
Owner

@base1983 commented on GitHub (Jul 11, 2016):

Somehow the transport agent already knows this. You send a email and it goes to the catchall only is the recepient doesn't exist.

<!-- gh-comment-id:231718849 --> @base1983 commented on GitHub (Jul 11, 2016): Somehow the transport agent already knows this. You send a email and it goes to the catchall only is the recepient doesn't exist.
Author
Owner

@Pro commented on GitHub (Jul 11, 2016):

Oh yeah, right, sorry. Forgot about this step.
So what needs to be done is to implement the code lines in here:
https://github.com/Pro/exchange-catchall/blob/master/CatchAllAgent/CatchAllAgent.cs#L190

I.e. set the replaceWith to the fallbackAddress if there is any. And if needed, update the subject.

Open for pull requests.

<!-- gh-comment-id:231729177 --> @Pro commented on GitHub (Jul 11, 2016): Oh yeah, right, sorry. Forgot about this step. So what needs to be done is to implement the code lines in here: https://github.com/Pro/exchange-catchall/blob/master/CatchAllAgent/CatchAllAgent.cs#L190 I.e. set the replaceWith to the fallbackAddress if there is any. And if needed, update the subject. Open for pull requests.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/exchange-catchall#14
No description provided.