# issues with postfix



## Systat (Dec 22, 2013)

after a few days of trying to get qmail to work following several different tutorials I decided to just switch to postfix.....  now I got an email server that runs and I can connect to but I can not send emails through it with my client like outlook....  I get the relay access denied error.  Also I can not email myself from say a live.com account to any email address on my server.  Have been awake all night searching forums reading manuals doing what they all said with no results.  I am using the current postfix...  2.10 I believe it is.  I have tried everything I can find on this.  It seems no matter what I go with I am doomed to not get an email server working on here.  Anyone have an answer for what I need to add to the config files to allow senders to be able to actually send emails out from the server to any email address?  Also if I go into my config file and say temporarily add mynetworks = and the ip to my home computer then it will allow me to relay but it has a temporary lookup failure and will still not send emails out.


----------



## nanotek (Dec 22, 2013)

Please post the output of `postconf -n` and `dovecot -n`. Also, `telnet localhost smtp` and issue `ehlo` command; share output of that and the log entries from your telnet session.


----------



## ShelLuser (Dec 22, 2013)

First it helps indeed to add your own IP address to the mynetworks option; this will make Postfix recognize your location. But then you'll also need to keep the several restrictions in mind. For example the smtpd_sender_restrictions, smtpd_recipient_restrictions and the smtpd_helo_restrictions. These options should also be told that you'll allow access from your own network which is usually done using the permit_mynetworks directive (in combination with mynetworks of course).

Be very careful there though. You need to make sure that you both allow and restrict access, otherwise you may end up building an open relay server and that's a very bad thing to do.

Considering the lookup errors I'm tempted to blame either the HELO or sender restrictions. This example might help:


```
smtpd_sender_restrictions = permit_mynetworks reject_spf_invalid_sender reject_u
nknown_sender_domain
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated rejec
t_unauth_destination check_policy_service inet:127.0.0.1:10023
smtpd_helo_restrictions = permit_mynetworks reject_invalid_hostname reject_non_f
qdn_hostname
smtpd_helo_required = yes
```


----------



## Cthulhux (Sep 7, 2014)

(done)


----------

