I'm sorry ispcomm but I'm not an admin so I can't give svn accounts to anyone. By the way, there's people using the trunk version on their
servers and we're at RC phase so changes should be as "atomic" as possible. Commiting partial features is not a good idea, but svn merge should help here.
Cube Wrote:Sounds complicated. I put the relevant domains into the existing transport-table and things work.
You should also set the "relay_domains" and "relay_recipients_maps" to tell postfix wich accounts are valid an wich aren't (otherwise you'll be relaying a lot of mails to unexistant accounts, generating bounces, etc.).
I don't know wich is your approach ispcomm, but I see this needed changes:
1. CONFIGS: Modify the postfix config adding two hash tables: "relay_domains" (relay_domains key) and "relay_recipients" (relay_recipients_map) key.
2. CONFIGS: Modify the dns templates to allow relaying. I would point the MX record to mx.domain.tld., set the mx.domain.tld record to BASE_
SERVER_IP and the mail.domain.tld to point to a new RELAY_IP (the customer one).
3. GUI: Allow the admins & resellers (I wouldn't allow this at client level) to set a domain as "relayed to XXXXXX". Sections modified: domain creation, domain edition (this one on the admin level too, but the "edit domain" link is only visible if you set the HOSTING_PLANS_LEVEL to "admin" in "gui/includes/ispcp-lib.php"). "Domain" table should be modified at this point, adding a "mail_relay" field to the "domain" table. '_no_' would mean "domain not relayed" and 'xxx.xxx.xxx.xxx' would mean "relayed to this ip"
4. ENGINE: Modify the dmn_mgr to add the new "RELAY_IP" tag in bind parts (it should point to BASE_
SERVER_IP if the domain isn't relayed, customers IP if it is).
5. ENGINE: Modify the dmn_mgr to check the "mail_relay" config and if it's on create the domain entry in the "relay_domains" hash db (warning: you must ensure that it's not added as a virtual domain too!) and create the appropiate entry in the transport table.
6. GUI: Allow the client to provide a list of valid recipients (you could re-use the mail_users db table, just add a new 'mail_type')
7. ENGINE: Modify the mbox-mgr to manage the "relay_recipients" hash db using mail_users ispcp table.
Maybe I forgot something. Wich is your aproach ispcomm?
As I'm only offering this service to customers who have their own Exchange
server, right now I'm using a quite different approach. I install them a script that exports the valid mail addresses from AD, uploads them to the
server (scp) and runs a sudoed script that fills the relay_recipients table and reloads postfix. If anyone is interested in the actual scripts, etc. I could write a how-to....