I've tested your last patch. Adding and removing the relay host works flawlessly (both in admin/edit_domain and reseller/edit_domain), so great work ispcomm.
The patch is clean and I really like this functionality, so I'll do what I can to push it mainstream (that's why I'm so annyoing hehe), but as it is relatively big I'd like that {malte,rats,raphael,zothos} also approve it before commiting. Let us polish the remaining rough edges and then we'll annoy them until they approve it
More comments:
-) (Debian Lenny) Relayed mails are not counted on this system as SMTP Traffic as I would expect. Can you check if this is the case for you too?
-) Adding mail accounts to a relayed domain has no effect: mails are always relayed. This is ok for me, but then we need to implement the "don't allow to set relaying...." thing for usability reasons (or my idea down here).
-) Mail for subdomains of a relayed domain are still delivered locally. This effectively means that we can't relay subdomains as of now (I think this is not required to go mainstream, but should be properly documented). Proof:
Code:
Jun 12 08:45:56 v2 postfix/trivial-rewrite[10914]: warning: do not list domain sub.dmn.tld in BOTH virtual_mailbox_domains and relay_domains
Jun 12 08:45:56 v2 postfix/virtual[10916]: 9BEE86501AF: to=<user@sub.dmn.tld>, relay=virtual, delay=14, delays=14/0/0/0.06, dsn=2.0.0, status=sent (delivered to maildir)
-) What about adding MX relays (no brackets)?
Further ideas:
-) Maybe the engine could be further modified to write the mail accounts to (a new) "relay_recipients" table when the domain is relayed, instead of the "mailboxes" table. This way we could add "relay_recipients_map hash:/etc/postfix/ispcp/relay_recipients" so every recipient address is locally verified (the customer will have to create the mailboxes as if it wasn't relayed, but I think it's not a major drawback). What do you think?