^

Postfix Backup Mailserver

Article 123 in Networking

2021-02-16 19:22:39 from bugfish
Postfix Backup Mailserver
Networking / Mail
Last Review on: 2021-07-31 02:00:02 | Hits: 121

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 = 127.0.0.0/8
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.
Comment Section
Currently 0 Upvotes!
captcha image

System - 2021-02-17 08:22:22
We appreciate comments on our site!

Theme
1
This Website is using Session Cookies for Site Functionality and AWStats.