• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

SMTPROUTES - Domain Mail Forwarding

Z

zockerjosy

Guest
Hello community

I want to forward all Mails of one domain to an external Mailserver (Exchange). Plesk 8.3 (debian)

--> Input Kaspersky AntiSPAM -> QMAIL (Plesk) -> forwarding to a different mail server

There is a configuration file /var/qmail/smtproutes where you could be. How can I do that for a complete domain (* @ mydomain.com)? what is todo?

Thank You & Greetings,

Andy
 
You need to first make sure mail is disabled in Plesk for the domain on the server, if it isn't plesk will still try to deliver mail locally. Next make sure the domain is listed in /var/qmail/control/rcpthosts, this configures qmail to accept mail for the domain, and last you create the routes for the domain to the new server in /var/qmail/control/smtproutes. Like this:

domain.com:10.11.12.13

Once youve done this, just restart xinetd (/etc/init.d/xinetd restart) and youre done
 
Thank you for your quick response!

Now I have the problem if an e-mail from outside is received, the server is a relayserver, so the mail is blocked.

Example:

~ $ telnet pleskserver.com 25
Trying 194.xxx.xx.xx ...
Connected to pleskserver.com
Escape character is'^]'.
220 xyz.pleskserver.com ESMTP
Helo
250 pleskserver.com
mail from: [email protected]
250 OK
rcpt to: [email protected]
553 sorry, that domain is not in my list of allowed rcpthosts (# 5.7.1)

Greetings,

Andy
 
I have the same goal. Thanks for your advice.
But how do I disable the mail for a given domain?
Many thanks.
 
Back
Top