Using Postfix to send out emails from development environment in Rails


You want to be able to send emails from your development enironment using Postfix in your (K)Ubuntu pc.


First you would need to install postfix:

and then you would need to change an option in postfix to not use tls, so change /etc/postfix/

and change the smtpd_use_tls from yes to no:

restart your postfix server:

and then setup your config/development.rb as follows:

Command line mail message with postfix in (K)ubuntu


You have installed postfix in your local development machine (sudo apt-get install postfix), and you want to test sending emails from the command line using mail



You would first need to install the mailutils package:

then you can send an email by:

and you can send it by pressing Ctrl+D

Redirecting postfix email to a different email account


You have setup your Rails app to send out emails using postfix, but you also want to redirect the incoming emais to a different account.


Edit the postfix configuration file vi /etc/postfix/ and add the following two lines at the bottom:

And then add the redirections to the virtual file with vi /etc/postfix/virtual:

Then run the following two commands to restart postfix:

* Based on the post here