This should walk you through the process.
Baruwa Setup Instructions:
Log into Baruwa as admin --> Settings --> Accounts --> Create Account
Once you've created the user, you'll get 2 new tabs on that page, Profile Settings and Associated Addresses
Fill out Profile Settings choosing Domain Admin and set a low score of 6 and a high score of 9 and check scan email.
Fill out the Associated Addresses or domains for which the user is the admin of eg. domain.com. domain.com will show up under the Associated Addresses header.
Click on domain.com and you'll be taken into Domain Information, where you'll be able to setup SMTP delivery information. Go ahead and add the smtp server, or the ip of the receiving smtp server. Select enable and if you use a non-standard port, set it, otherwise use 25. Once you've done that, you can click on the test button next to the pencil, to see if your receiving server will accept the connection.
Now, you can log out as admin, and log in as the user you just setup and mails should start flowing.
*Note: The user will be the Domain Admin for whatever domains you specify in Associated Addresses.
The relay_domains and transports settings in main.cf will use the entries you've provided in Baruwa. Therefore, no hash file is required. The queries will pull the result in the proper format and feed it to postfix for use.
However, if you'd like to use a hash for any of your config files, just set your /etc/postfix/main.cf to look like this example:
relay_recipient_maps = hash:/etc/postfix/relay_recipients
Of course, you would have to create the hash file, populate it and postmap it for postfix to use. You can also do this with relay_domains and transports if you'd like.
*Note: If you do end up using a hash for relay_recipients, you'll have to remove the look_ahead feature.
Also, since you need to do mx lookups, you'll have to edit /etc/postfix/mysql-transports.cf to look like:
concat('smtp:', mail_hosts.address, ':', port) 'transport'I removed the [ and ] to allow MX lookups.
Home of the SpamSnake