• 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

offloading mail to a real mail server

michaellunsford

Regular Pleskian
I'm offloading mail from the plesk server to a real mail server. Question is can I configure the plesk server to "relay" mail coming in to the new mail server? If so, how to do this?

I realize that there's the whole "after 24 hours it will fix itself" thing, but I want to forward all mail to the new server immediately.

Thanks!
 
Check out the smtproutes file, pretty straight forward. You create that, add in the domain and the destination server. Example:

vim /var/qmail/control/smtproutes

add

domain.com:1.2.3.4

where 1.2.3.4 is the IP of the destination server.
 
Not that I know of.

You could also have an event handler for Domain Created, where it adds the domain to that file to explicitly set the domain in the file

Something like

PHP:
#!/bin/bash
#IP or HostName/FQDN
MAIL_SERVER="10.10.10.10"
echo "$NEW_DOMAIN_NAME:$MAIL_SERVER" >> /var/qmail/control/smtproutes

or if you have multiple mail servers that this could be on,
PHP:
#!/bin/bash
echo "$NEW_DOMAIN_NAME:" >> /var/qmail/control/smtproutes
would make it look up the MX record of the domain name to use as the SMTP server.

Or (more simply) from what I understand you can simply just add this to the smtproutes to have all domains automatically send their mail to the other place.
Code:
:mail.server.here

However I dont know if this handles SMTP authentication or what happens if the mail server requires it and this doesnt have it support it - I would assume that it would blackhole/bounce the email, but I dont know.

I've also head this needs a SMTP AUTH patch ( http://www.camscape.ro/opensource/qmail-smtpd-auth-secure.htm )

if you get this all working Im sure a nice How-To would be much appreciated by the community
 
Back
Top