TOC
apt-get install postfix
cat /etc/passwd | grep postfix |
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 |
@myco.net root |
@jira.myco.net jira.myco.net/shared/inbox |
postmap <configfile> |
postmap vmailbox postmap virtual |
/etc/init.d/postfix restart |
sudo mkdir -p /var/mail/vhosts/jira.myco.net/shared chown -R postfix /var/mail/vhosts |
dpkg -l | grep mailutils |
sudo apt-get install mailutils |
tail /var/log/mail.info |
sudo mail -s "hello" test@jira.myco.net Cc: bla bla . |
Sep 25 23:04:43 mypc postfix/cleanup[11799]: 18F956A0B: message-id=<20080925220443.18F956A0B@mypc> Sep 25 23:04:43 mypc postfix/qmgr[11784]: 18F956A0B: from=<root@mypc>, size=307, nrcpt=1 (queue active) Sep 25 23:04:43 mypc postfix/virtual[11801]: 18F956A0B: to=<test@jira.myco.net>, relay=virtual, delay=0.03, delays=0.02/0/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox) Sep 25 23:04:43 mypc postfix/qmgr[11784]: 18F956A0B: removed |
cat /var/mail/vhosts/jira.myco.net/shared/inbox |
cat /var/mail/vhosts/jira.myco.net/shared/inbox From root@mypc Thu Sep 25 23:04:43 2008 Return-Path: <root@mypc> X-Original-To: test@jira.myco.net Delivered-To: test@jira.myco.net Received: by trippy (Postfix, from userid 0) id 18F956A0B; Thu, 25 Sep 2008 23:04:43 +0100 (BST) Subject: hello To: <test@jira.myco.net> X-Mailer: mail (GNU Mailutils 1.1) Message-Id: <20080925220443.18F956A0B@mypc> Date: Thu, 25 Sep 2008 23:04:43 +0100 (BST) From: root@mypc (root) bla bla |
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.