vi /etc/postfix/main.cf 파일을 열어
relayhost 항목을 찾고 relayhost = 1.2.3.4 와 같이 아이피를 입력해 주고
/etc/init.d/postfix restart 로 마무리 해주면 된다.
※Trouble shooting
메일 로그에 Permission denied 가 뿌려지면 /var/spool/postfix 소유자를 변경해 주면 된다
postfix/master[3946]: warning: master_wakeup_timer_event: service qmgr(public/qmgr): Permission denied
postfix/master[3946]: warning: master_wakeup_timer_event: service pickup(public/pickup): Permission denied
postfix/master[3946]: warning: master_wakeup_timer_event: service pickup(public/pickup): Permission denied
postfix/master[3946]: warning: master_wakeup_timer_event: service pickup(public/pickup): Permission denied
postfix/master[3946]: warning: master_wakeup_timer_event: service pickup(public/pickup): Permission denied
소유자 변경 방법
# cd /var/spool# chonw -R postfix:root /var/spool/postfix