Postfix Backup Mailserver

Article 123 in Networking

<< Back
2021-02-16 19:22:39 from bugfish
Postfix Backup Mailserver
Networking / Mail
Last Review on: 2022-08-07 14:49:32 | Hits: 520

This is an easy postfix configuration to backup all emails going to specified domains until the master server is online again.


Postfix Configuration [replace yourhostname with your hostname]:

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
myhostname = yourhostname
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, localhost.yourhostname , localhost
relayhost =
mynetworks =
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
maximal_queue_lifetime = 30d

relay_recipient_maps =
relay_domains = hash:/etc/postfix/relaydomains
transport_maps = hash:/etc/postfix/transportmaps

/etc/postfix/transportmaps [how it could look like]

exampledomain.example       smtp:masterserver.exampledomain.example:587

 /etc/postfix/relaydomains [how it could look like]

exampledomain.example OK

 After you have changed the transportmaps or relaydomains file you have to run in console

postmap /etc/postfix/relaydomains
postmap /etc/postfix/transportmaps

I do not guarantee the reliability of the information given here, the code described on this page is executed at your own risk and in the event of damage or other unforeseeable consequences I am in no way responsible or liable.


Currently 1 Upvotes!

captcha image
System - 2022-08-17 03:19:16
Thanks for visiting my page and have a nice day!
Staff may be in trouble!
Switch: NONE | Arrive: NONE
This Website is using Session Cookies for Site Functionality and AWStats.