# little problem with postfix/spamassassin/amavis

## PoYpOy

Hello,

I've installed a gentoo mail server using this guide http://www.gentoo.org/doc/en/virt-mail-howto.xml and then I followed this guide http://www.gentoo.org/doc/en/mailfilter-guide.xml to convert it on a gentoo mailfiltering server.

Until that, everything works fine. I've several emails accounts on different domain names, so I use fetchmail to get them, to filter them over my mailfitering server and then I redirect them to an Exchange Mail Server.

The fact is, when someone sends me an email, he get this return error 

```
A message that you sent could not be delivered to one or more of its

recipients. This is a permanent error. The following address(es) failed:

root@192.168.1.1

   SMTP error: 501 5.1.3 Bad recipient address syntax

```

But I get the email in my Exchange Server Box.

Does anyone have an idea of what could be the trouble there? I thord it could be the spamassassin but I don't know it enough...

Thanks in advance for your help  :Wink: 

PoY

----------

## Princess Nell

Without knowing your setup in detail: it looks like one of your filters rewrites recipient addresses or creates its own, and postfix rejects

the message upon re-injection. You need to identify the rewrite step and fix it; if the domain-part of an email address is just an IP

address, it must be enclosed in square brackets.

```

$ telnet mailhost 25

Trying 127.0.0.1 ...

Connected to mailhost.

Escape character is '^]'.

220 mailhost ESMTP Postfix

HELO senderhost

250 mailhost

MAIL FROM:<root@127.0.0.1>

501 5.1.7 Bad sender address syntax

MAIL FROM:<root@[127.0.0.1]>

250 2.1.0 Ok

QUIT

```

This is default postfix behaviour even with strict_rfc821_envelopes = no.

----------

