Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documentation on how to setup postfix to send incoming emails to mail…
… 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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|