# Grey-listing/fall back problem

**URL:** <https://community.ciphermail.com/t/grey-listing-fall-back-problem/114>\
**Category:** Gateway\
**Created:** [May 3, 2010, 8:30am UTC](https://community.ciphermail.com/t/grey-listing-fall-back-problem/114 "2010-05-03T08:30:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andreas\_Schubert](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@Andreas\_Schubert](https://community.ciphermail.com/u/Andreas_Schubert)\
**Post date:** [May 3, 2010, 8:30am UTC](https://community.ciphermail.com/t/grey-listing-fall-back-problem/114/1 "2010-05-03T08:30:54Z")

</div>

Hello,

i suppose that one of our partners has a misconfigured email infrastructure.

when trying to relay emails over djigzo, i get the following response: "5.7.1  
relaying not allowed"  
but if the mails are sent directly to the recipient the email went through.

i have figured out that they have two mx records  
10 server1  
100 server2

if i connect to server1 i get the message "please try again later"  
if i connect to server2 i get the message "5.7.1 relaying not allowed"

so my suggestion is, that djigzo refuses the email after connecting to the  
second server.

how can i change this behavior?

regards

Andreas Schubert  
Transline Deutschland Dr.-Ing. Sturz GmbH

---

<div class="post-metadata">

**Author:** ![martijn](https://dub1.discourse-cdn.com/flex017/user_avatar/community.ciphermail.com/martijn/32/127_2.png) [@martijn](https://community.ciphermail.com/u/martijn)\
**Post date:** [May 3, 2010, 8:55am UTC](https://community.ciphermail.com/t/grey-listing-fall-back-problem/114/2 "2010-05-03T08:55:10Z")

</div>

> i suppose that one of our partners has a misconfigured email

\> infrastructure.

Yes they do have a problem :). I guess they will loose a lot of email if  
they don't fix it.

\> but if the mails are sent directly to the recipient the email went  
\> through.

I think it worked the second time because the grey listing wasn't in  
effect the second time. All email will fail until the grey listing  
period has finished

\> how can i change this behavior?

From an SMTP view this is the correct behavior. The first SMTP server  
reported that it wasn't functional and the second fallback server said  
that it doesn't accept email for that domain.

The other party should fix this because they are going to loose a lot of  
email (well at least the emails sent until the grey listing period has  
finished).

A possible workaround could be by adding an explicit transport for that  
domain. The transport should only specify the IP address of the server  
that allows email (after the rgey list period).

so for example:

example.com :[server1]:25

I think you already use a recipient dependent transport (or at least did  
in the past if I remember it correctly). I have added the instructions  
below (which is a copy of the instructions you have used before).

Hope this helps

Kind regards,

Martijn Brinkers

==== Instructions about adding a recipient dependent transport ===

Djigzo uses Postfix for the actual delivery of email so yes this is  
possible. This however requires you to login with SSH because it cannot  
be done with the web interface.

It depends on you Linux skills whether you can do it yourself or whether  
you have to ask someone else.

1) Create a file /etc/postfix/tranports and add the domains for which  
you want to use an an alternative relay transport:

the file in /etc/postfix/transports should look like:

example.com :[10.0.0.1]:25

You can use vi or any other command line editor. You have to make sure  
you use sudo because writing a file in /etc/postfix requires root  
access. You can add additional domains on a new line.

2) the tranports map must be converted to a hashmap:

$sudo postmap /etc/postfix/transports

(the postmap command converts the transports file to transports.db)

3) the main postfix config must now be told to use this transport map.  
You have to add the following line to /etc/postfix/main.cf:

transport\_maps = hash:/etc/postfix/transports

(this step can be done using the web management page by clicking admin  
-\> MTA config -\> MTA raw config. You can add the above line to the raw  
main.cf config and apply.

4) restart postfix

sudo /etc/init.d/postfix restart

Andreas Schubert wrote:

> **···**
>
> > Hello,
> > 
> > i suppose that one of our partners has a misconfigured email infrastructure.
> > 
> > when trying to relay emails over djigzo, i get the following response: "5.7.1  
> > relaying not allowed"  
> > but if the mails are sent directly to the recipient the email went through.
> > 
> > i have figured out that they have two mx records  
> > 10 server1  
> > 100 server2
> > 
> > if i connect to server1 i get the message "please try again later"  
> > if i connect to server2 i get the message "5.7.1 relaying not allowed"
> > 
> > so my suggestion is, that djigzo refuses the email after connecting to the  
> > second server.
> > 
> > how can i change this behavior?
> > 
> > regards
> > 
> > Andreas Schubert  
> > Transline Deutschland Dr.-Ing. Sturz GmbH
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Users mailing list  
> > Users(a)lists.djigzo.com  
> > [http://lists.djigzo.com/lists/listinfo/users](http://lists.djigzo.com/lists/listinfo/users)
> 
> --  
> Djigzo open source email encryption
