Eventum:Setting up email routing with postfix

Eventum Menu: Home - Documentation - FAQ - Help

Contents

[edit] Quick Notes

When you're setting up Eventum's Email Routing Interface for postfix, use these options in the Administration -> General Setup area:

Email Routing Interface: Enabled
Recipient Type Flag: [doesn't matter, choose any]
Email Address Prefix: issue-
Address Hostname: [the domain name of the email address issues should be sent to]
Warn Users Whether They Can Send Emails to Issue: [doesn't matter, choose any]
Internal Note Routing Interface: Enabled
Note Address Prefix: note-
Address Hostname: [the domain name of the email address issues should be sent to]
Email Draft Interface: Enabled
Note Address Prefix: draft-
Address Hostname: [the domain name of the email address issues should be sent to]

[edit] Postfix configuration

There are different ways to implement the goal.

[edit] using local PHP script

In /etc/mail/main.cf define

transport_maps = regexp:/etc/mail/transportregex
local_recipient_maps = unix:passwd.byname $alias_maps $transport_maps


Be sure to include your domain in mydestination

mydestination = $transport_maps, $myhostname, eventum.example.com

In /etc/mail/master.cf define eventum transport:

eventum   unix  -       n       n       -       10       pipe
 flags=DRhu user=apache argv=/usr/bin/php /var/www/html/eventum/misc/route_${nexthop}.php

Create /etc/mail/transportregex file:

/note-.*@eventum.example.com/         eventum:notes
/issue-.*@eventum.example.com/        eventum:emails
/drafts-.*@eventum.example.com/       eventum:drafts

Run postmap on that file

postmap /etc/mail/transportregex

Restart your postfix to take into account main.cf and master.cf changes

[edit] forwarding all domain mails to IMAP account

in /etc/mail/virtual write

@eventum.example.com      eventum_issues@imap.example.com

and make define virtual_maps to use it:

virtual_maps = hash:/etc/mail/virtual

Retrieved from "http://forge.mysql.com/wiki/Eventum:Setting_up_email_routing_with_postfix"

This page has been accessed 2,376 times. This page was last modified 12:30, 23 June 2009.

Find

Browse
MySQLForge
Main Page
Current events
Recent changes
Random page
Help
Edit
Edit this page
Editing help
This page
Discuss this page
Post a comment
Printable version
Context
Page history
What links here
Related changes
My pages
Special pages
New pages
File list
Statistics
Bug reports
More...