My Aim is to achieved configuration as CPanel provide as a MX backup server option. the background: Domain -> domain.com Main MX (priority 5) -> On-Promise Exchange server Secoundary/ Backup MX (priority 50) -> VPS (ISPConfig, postfix, etc) - server is hosting www for the domain.com the goal: All emails fro domain.com will be relayed to On-Promise Exchange server, even sent from the ISPConfig Config. The ISP server hosted the website with the form -> form sends the message to the [email protected] using local (ISPConfig server) smtp account [email protected] the problem: when i try to send email from [email protected] (IPSConfig server) to [email protected] (on-promise server) i have an message: --- Message not sent. Server replied: Requested action not taken: mailbox unavailable 550 5.1.1 <--->: Recipient address rejected: User unknown in virtual mailbox table --- setup: Relay Email Routing -> domain.com -> smtp, active, No MX lookup, exchange@ Relay recipients -> domain.com (whole domain) to send from the server web form via smtp: Email Domain -> domain.com (to create [email protected] account) email Mailbox -> [email protected] (mailbox witch I use to send emails) --- if I set up catch all the system works but forward all emails as a catch all email address. if i create local mailbox [email protected] its work as well. I need be able do forwarding emails independently - not based on the local mailboxes . How to do it ?
Seems as if you added domain.com as email domain in ispconfig. remove the email domain, when a domain is forwarded with a transport then this domain may not be added as email domain too.
Yes, when I remove domain form Emails Accounts -> Domains the forwarding looks, but.. i cannot use this server as SMTP connector (I cannot create account for domain.com i.e. [email protected]) all works perfect if i create reflection one to one -> each mailbox on internal exchange has malbox in Backup MX (ISPConfig) so it ticks all my boxes: 1) I can send directly from ISPConfig ( mailbox exists in local_recipient_maps) to Internal server (relayhost) 2) When internal host is down / not accessible -> ISPConfig buffers the emails the problem -> I have to create all mailboxes manually in ISPConfig. it works for 5 mailboxes but not for 50 etc. So my question is possible to set up postfix: if local_recipient_maps send else NOT local_recipient_maps if domain has relayhost send else reject
You can reacte a fake domain for relaying as it is used for authentication only. Create e.g. a domain with the name "domain.out" and then a single mailbox "[email protected]" and use this email address and password to relay from your exchange server.