Setting up a localhost Postfix Jira virtual mail domain
TOC
The docs
Assumptions
You are using an Ubuntu distro.
Installation
apt-get install postfix
Configuration
Figure out your postfix user id
cat /etc/passwd | grep postfix
Yielding: postfix:x:114:129::/var/spool/postfix:/bin/false
In this example, the userid of the postfix user is 114, see next.
Modify /etc/postfix/main.cf
Add the following to the end of the file:virtual_mailbox_base = /var/mail/vhosts virtual_mailbox_domains = jira.myco.net virtual_mailbox_maps = hash:/etc/postfix/vmailbox virtual_minimum_uid=100 virtual_uid_maps = static:114 virtual_gid_maps = static:114 virtual_alias_maps = hash:/etc/postfix/virtual
Create /etc/postfix/virtual
If you are setup as a sub-domain (eg subdom.myco.com), its possibly useful to route any mail to the actual domain to a real user, do this with the following@myco.net root
Create /etc/postfix/vmailbox
In order to support a common mailbox for all inbound Jira mail, create the file:Create postfix database files from the configuration files
For each of the config files, and for every change to them the following has to be run from /etc/postfix:eg
Restart postfix to take account of changes
Create the virtual mailbox folders
Testing
Ensure mail is installed:
If you come up empty:
Start a new console monitoring the mail.info log for useful feedback
Send a test mail
You should see the following in the mail.info log:
Check the virtual mailbox file:
to see:
If you see this, so far so good. You have a virtual mailbox all configured. Great, but now what? Now you need to set-up a POP3 server like Dovecot, see Setting up a Dovecot POP3 server for retrieving Jira mail from a virtual mailbox.