tutorial:mail:postfixrelay

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
tutorial:mail:postfixrelay [2013-08-18 00:24] roottutorial:mail:postfixrelay [2018-06-03 14:10] – external edit 127.0.0.1
Line 3: Line 3:
 ====== Let postfix only accept mails for addresses in Exchange ====== ====== Let postfix only accept mails for addresses in Exchange ======
  
-**Problem:**+===== Problem =====
   * I use postfix as a backup for my Exchange. I want postfix to only accept mail for recipients which exist in Exchange.   * I use postfix as a backup for my Exchange. I want postfix to only accept mail for recipients which exist in Exchange.
  
-**Requirements:**+===== Requirements =====
   * I assume you followed my first tutorial [[tutorial:mail:postfixredir|here]]   * I assume you followed my first tutorial [[tutorial:mail:postfixredir|here]]
   * Existing postfix installation (mine is on debian)   * Existing postfix installation (mine is on debian)
Line 13: Line 13:
 ---- ----
  
-**Step ~~#~~**+===== Step 1 ===== 
 + 
 + 
   * Create the following PowerShell script on your Exchange server:   * Create the following PowerShell script on your Exchange server:
   * <code>   * <code>
Line 25: Line 28:
 {[string]::Format("{0}`tOK", $Address.AddressString)} {[string]::Format("{0}`tOK", $Address.AddressString)}
 </code> </code>
-  * Run the script and save the output to a file like this: <code>./script.ps > output.txt</code>+  * Run the script and save the output to a file like this: ''%%./script.ps > output.txt%%''
  
 ---- ----
  
-**Step ~~#~~**+===== Step 2 =====
   * Connect to yout server running postfix   * Connect to yout server running postfix
   * Upload the scriptoutput to /etc/postfix/relay_recipients   * Upload the scriptoutput to /etc/postfix/relay_recipients
Line 38: Line 41:
 </code> </code>
   * Reload or restart postfix   * Reload or restart postfix
 +
 +----
 +
 +===== Step 3+ =====
 +  * If your addresses change (added new or removed some) you have to repeat step 1 and 2