Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've set up postfix (Debian) and it works fine. I can recieve mail and I can send them, but I can only send them to local (and local virtual) adresses.

But when I try to send the mail for example to my Gmail account, I get this in syslog:

Jun 30 18:34:44 vps postfix/smtpd[9087]: NOQUEUE: reject: RCPT from vps[77.93.223.122]: 554 5.7.1 <hrdina.pavel@gmail.com>: Relay access denied; from=<info@w-cms.cz> to=<hrdina.pavel@gmail.com> proto=ESMTP helo=<localhost.localdomain>

I've googled a lot but I did figure it out thought. I think that something is wrong with my* directives. Here are mine:

myhostname = mail.xxx.cz
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = xxx.cz, vps, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
share|improve this question
    
Isn't your hostname w-cms.cz? –  ott-- Jun 30 '13 at 19:18
add comment

1 Answer

up vote 1 down vote accepted

You need to allow relaying for hosts you trust.

If vps has a static IP address, you might simply add it to mynetworks. Another popular option is to set up authentication between trusted hosts

See furthermore http://www.postfix.org/SMTPD_ACCESS_README.html

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.