meta data for this page
  •  

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
linux:mail:postfix [2018/08/01 13:43]
niziak
linux:mail:postfix [2023/02/13 12:49] (current)
niziak ↷ Page moved from linux:postfix to linux:mail:postfix
Line 1: Line 1:
-====== ​relay only for one user ======+====== ​Postfix ​======
  
-<file |/​etc/​postfix/​relay_by_sender>​ 
-# Specify zero or more "​type:​name"​ lookup tables. Type is a service defined in master.cf 
-cloudservice@example.org ​   [smtp.gmail.com]:​587 
-</​file>​ 
-cd /​etc/​postfix && postmap relay_by_sender 
  
-<file | /​etc/​postfix/​sasl_passwd>​ 
-[smtp.gmail.com]:​587 ​ myrealsender@gmail.com:​secret_password 
-</​file>​ 
- 
-<code bash> 
-cd /​etc/​postfix && postmap sasl_passwd 
-sudo chown root:root /​etc/​postfix/​sasl_passwd /​etc/​postfix/​sasl_passwd.db 
-sudo chmod 0600 /​etc/​postfix/​sasl_passwd /​etc/​postfix/​sasl_passwd.db 
-</​code>​ 
- 
-<file | main.cf> 
-# By default this is standalone mail server, so relayhost= is empty 
-relayhost = 
- 
-# A sender-dependent override for the global relayhost parameter setting 
-sender_dependent_relayhost_maps = hash:/​etc/​postfix/​relay_by_sender 
-</​file>​ 
- 
- 
- 
- 
-<code bash>​service postfix restart</​code>​ 
- 
-Test email: 
-cat /etc/issue | mailx -r "​cloudservice@example.org"​ -s "test relaya"​ "​destination@email.org"​ 
- 
-====== Issues ====== 
- 
-(SASL authentication failed; cannot authenticate to server smtp.server.org[11.22.33.44]:​ no mechanism available)