プロジェクト

全般

プロフィール

Vote #64424

未完了

a less cpu-intensive setup for receiving emails through fetchmail/imap (please add to wiki ?)

Admin Redmine さんが約2年前に追加. 1年以上前に更新.

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

0%

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

説明

Hi,
i did not want to open my smtp port as i'm not good at configuring mail server...
So here's a method that uses fetchmail to get redmine to receive emails using WS :

  • Fetching emails from an IMAP server using fetchmail to pipe to WS: ** Pros: quite easy to setup, .fetchmailrc and crontab needed to be configured, works with a remote mail server, no open smtp port, is not CPU-intensive ** Cons: emails are not processed instantly, fetchmail is in daemon mode

h3. Fetching emails from an IMAP server using fetchmail to pipe to WS

fetchmail need to be installed.

Add a redmine user (sudo adduser --disabled-password redmine)

Add a .fetchmailrc file in /home/redmine (change this file according to your configuration):

set daemon 60
poll imap.gmail.com with
   proto imap
   service 993
   timeout 10
   user redmine@xxx.xx
   password xxxxx
   ssl
   mda "ruby /usr/share/redmine/extra/mail_handler/rdm-mailhandler.rb --url http://host.redmine.com --key "

This will poll emails received in the imap inbox every 60 seconds.

Add a crontab for user redmine to make sure fetchmail starts at boot:

# m h  dom mon dow   command
@reboot nice -19 /usr/bin/fetchmail &> /dev/null

For testing purposes, comment (#) the first line of /home/redmine/.fetchmailrc,
and start fetchmail (as redmine user)
If it works ok, uncomment and start fetchmail again, it will poll every 60 seconds for incoming mails :
nice -19 /usr/bin/fetchmail &> /dev/null


journals

also note that this method is "safer" : the fetchmail daemon is run as redmine user, not suid root,
whereas it configuring the MTA in method 1 could lead to some security issue.

--------------------------------------------------------------------------------
NB : chmod 710 .fetchmailrc
--------------------------------------------------------------------------------

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

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

--------------------------------------------------------------------------------
why this method is better than simple imap/pop fetching?

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

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

--------------------------------------------------------------------------------
Can I use with an office365 mailbox?
--------------------------------------------------------------------------------

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

  • カテゴリEmail receiving_29 にセット

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

いいね!0
いいね!0