# Relaying from everywhere (Postfix)

## Cerebro

This question might sound a little bit stupid but there is a point with it. I want to setup my Postfix server to allow relaying from the entire world (where ever i may relay from). It is configured with SMTP AUTH.

Can i set $relay_domains to * or something similar in /etc/postfix/main.cf ?

/J

----------

## elgato319

ugh... never allow to relay everything.

you will get you mailserver blacklisted very fast  :Smile: 

just add to the restrictions:

```

smtpd_recipient_restrictions =

        permit_sasl_authenticated,...

smtpd_helo_restrictions =

        permit_sasl_authenticated,...

smtpd_sender_restrictions =

        permit_sasl_authenticated,...

```

to your config and you should be fine.

----------

## Cerebro

Hello again. I tried that but it still say Relaying Access Denied. The authentication works fine but it's the relaying part that does'nt work.

/J

----------

## Diezel

I've setup a mail server according to the Virtual Mail server howto and it uses auth to relay for users outside the office. You don't have to set up everything according to the guide. Just the parts you need.

----------

