Skip to content

Commit

Permalink
Documentation on how to setup postfix to send incoming emails to mail…
Browse files Browse the repository at this point in the history
… template mailer receiver.
  • Loading branch information
Doug Youch committed Mar 4, 2010
1 parent 92dedbd commit 6116b25
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions doc/setting_up_bounce_support.txt
@@ -0,0 +1,41 @@
Setting up Webiva bounce support.

Instructions for POSTFIX on Ubuntu

sudo apt-get install postfix mailutils

# reconfigure postfix with the correct domain
sudo dpkg-reconfigure postfix

Create a shell script /etc/postfix/webiva_transport.sh. This will process all incoming emails for a specified domain.
#!/bin/bash

HOME=/home/webiva/Webiva \
/home/webiva/Webiva/script/runner \
'data = STDIN.read; MailTemplateMailer.receive(data)' 2>&1 > \
/home/webiva/Webiva/log/receive_mail.log

Add the following to the end of /etc/postfix/master.cf.
Change user=webiva:webiva to the correct user that webiva runs as. See: man 8 pipe for further details.

webiva unix - n n - - pipe
flags= user=webiva:webiva argv=/etc/postfix/webiva_transport.sh

Edit or create /etc/postfix/transport and add:

<domain> webiva:

(Important Note: All emails received to <domain> on this server will go to /etc/postfix/webiva_transport.sh.)


Now run,
sudo /usr/sbin/postmap /etc/postfix/transport
creates the /etc/postfix/transport.db file

Now restart postfix
sudo /etc/init.d/postfix restart


For more information goto:
http://oldwiki.rubyonrails.org/rails/pages/HowToReceiveEmailsWithActionMailer

0 comments on commit 6116b25

Please sign in to comment.