---
title: "exim4 550 relay not permitted的处理"
author: "andyao"
date: "2009-02-15T17:40:03Z"
tags: []
categories: ["操作系统"]
slug: "exim4-550-relay-not-permitted"
draft: false
lastmod: "2009-02-15T17:40:03Z"
id: 333156
url: "https://andyao.iteye.com/blog/333156"
---

出现这个问题的主要原因是exim4邮件服务器的relay设置不对.  
exim4有两种方式的relay设置：

1. 基于domian的relay: 修改配置文件中的 domainlist relay\_to\_domains
2. 基于host的relay:  修改配置文件中的hostlist relay\_from\_hosts

直接修改配置文件或者dpkg-reconfigure exim4-config设置正确的relay即可.

举例来说， 先看网络配置：

1. 10.0.0.10作为server，配置有exim4
2. 10.0.0.12作为client，连接至10.0.0.10的exim4 server发送邮件

如果exim4的relay设置中没有加入10.0.0.12这个ip，那么在10.0.0.12这台电脑上连接到10.0.0.10发邮件（javamail， activemail，etc）就会出现标题所提到的异常。解决方法就是在exim4的relay\_from\_hosts加入10.0.0.12这个ip