Project

General

Profile

Actions

Feature #2490

open

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

Added by Jérémy Lal about 15 years ago. Updated over 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Email receiving
Target version:
-
Start date:
2009-01-11
Due date:
% Done:

0%

Estimated time:
Resolution:

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

Actions #1

Updated by Jérémy Lal about 15 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.

Actions #2

Updated by Jérémy Lal about 15 years ago

NB : chmod 710 .fetchmailrc

Actions #3

Updated by Jérémy Lal about 15 years ago

  • Assignee set to Jean-Philippe Lang
Actions #4

Updated by Toshi MARUYAMA about 10 years ago

  • Category changed from Wiki to Email receiving
Actions #5

Updated by Toshi MARUYAMA about 10 years ago

  • Tracker changed from Patch to Feature
Actions #6

Updated by Yar n almost 10 years ago

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

Actions #7

Updated by Toshi MARUYAMA almost 10 years ago

  • Category changed from Email receiving to Documentation
Actions #8

Updated by Toshi MARUYAMA almost 10 years ago

  • Category changed from Documentation to Email receiving
  • Assignee deleted (Jean-Philippe Lang)
Actions #9

Updated by Fernando Fernandez over 5 years ago

Can I use with an office365 mailbox?

Actions

Also available in: Atom PDF