Feature #2490
opena less cpu-intensive setup for receiving emails through fetchmail/imap (please add to wiki ?)
0%
Description
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
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 <your secret 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
Updated by Jérémy Lal almost 16 years ago
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.
Updated by Toshi MARUYAMA almost 11 years ago
- Category changed from Wiki to Email receiving
Updated by Toshi MARUYAMA almost 11 years ago
- Tracker changed from Patch to Feature
Updated by Yar n over 10 years ago
why this method is better than simple imap/pop fetching?
Updated by Toshi MARUYAMA over 10 years ago
- Category changed from Email receiving to Documentation
Updated by Toshi MARUYAMA over 10 years ago
- Category changed from Documentation to Email receiving
- Assignee deleted (
Jean-Philippe Lang)
Updated by Fernando Fernandez over 6 years ago
Can I use with an office365 mailbox?