プロジェクト

全般

プロフィール

Vote #76119

未完了

Patch to the Redmine Mail Handler for overriding the sender, and adding custom header/footers to imported e-mails

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Email receiving_29
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
29
version_id:
0
issue_org_id:
19242
author_id:
87711
assigned_to_id:
0
comments:
2
status_id:
1
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

Following #19182 and experimenting with the Redmine Mail Handler, for use within my company, we ended up with the following need :

  • In some cases, accept both known senders and unknown senders, but we did not want to allow AnonymousUser to be used, so we needed to override the sender with a specific user :
    --post-user SENDER
    
  • In some cases, override all senders (known and unknown) with a specific user as specified above :
    --override-sender YES/NO
    
  • Since we are overriding the sender, and we did not want to lose this information, we opted to allow the command-line rdm-mailhandler.rb script to take custom headers and footers for the imported mail body (to be added right after the cleanup process so as to minimize interference) :
    --email-header TEXT
    --email-footer TEXT
    

The patch included adds :

  • the above options to extra/mail_handler/rdm-mailhandler.rb
  • the code to process them within app/models/mail_handler.rb

Right now we are using these options in this fashion (this is used on top of the patch from #19182), in a script called as destination for e-mail coming from the outside :

/usr/local/share/redmine-2.5/extra/mail_handler/rdm-mailhandler.rb -v \
    --override-sender yes \
    --post-user yuubinkyoku@internal.domain.com \
    --email-header "Mail sent by : $SENDER" \
    --certificate-bundle /etc/ssl/certs/ca-certificates.crt \
    --url https://$URL/ \
    --key $API_KEY \
    --project $LOCAL

SENDER, LOCAL are variables set by Postfix upon calling the aforementioned script.
URL and API_KEY are derived from the DOMAIN variable and are not relevant to this example.


journals

Sounds like a good idea!
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,19182,Patch to the Redmine Mail Handler for specifying a custom CA bundle

Admin Redmine さんが約4年前に更新

  • カテゴリEmail receiving_29 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0