I see two issues here. You haven’t told it what domains to accept and you’ve 
defined mynetworks to be only localhost.

On Mar 15, 2014, at 3:01 PM, Tim Dunphy <bluethu...@gmail.com> wrote:

> Hello,
> 
> 
> I've just built a postfix server in amazon EC2 with an elastic IP. And I 
> found that while I can connect to and send emails to my mail server when I 
> telnet to localhost when I telnet to the external FQDN I get relay denied.
> 
> I'll first demonstrate success, then failure.
> 
> And the logs confirm success:
> 
> Mar 15 19:27:35 mail postfix/smtpd[5294]: B97CA24B8B: 
> client=localhost[127.0.0.1]
> Mar 15 19:28:18 mail postfix/cleanup[5306]: B97CA24B8B: 
> message-id=<20140315192735.b97ca24...@mail.example.com>
> Mar 15 19:28:18 mail postfix/qmgr[5221]: B97CA24B8B: 
> from=<bluethu...@external.com>, size=356, nrcpt=1 (queue active)
> Mar 15 19:28:18 mail postfix/cleanup[5306]: AD51725096: 
> message-id=<20140315192735.b97ca24...@mail.example.com>
> Mar 15 19:28:18 mail amavis[3401]: (03401-09) Passed BAD-HEADER-1 
> {RelayedOutbound,Quarantined}, LOCAL [127.0.0.1]:58766 [127.0.0.1] 
> <bluethu...@external.com> -> <bluethu...@example.com>, quarantine: 
> W/badh-WyjD4kEQ4Mls, Queue-ID: B97CA24B8B, Message-ID: 
> <20140315192735.b97ca24...@mail.example.com>, mail_id: WyjD4kEQ4Mls, Hits: -, 
> size: 356, queued_as: AD51725096, 140 ms
> Mar 15 19:28:18 mail postfix/smtp[5317]: B97CA24B8B: 
> to=<bluethu...@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=51, 
> delays=51/0.03/0/0.16, dsn=2.0.0, status=sent (250 2.0.0 from 
> MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as AD51725096)
> Mar 15 19:28:18 mail postfix/qmgr[5221]: B97CA24B8B: removed
> 

Accepted and queued but no evidence of local delivery. Possibly still queued 
until it bounces.

> However, if I telnet to the externally available FQDN (from the mail server) 
> I get a relay denied error:
> 
> root@mail:~# telnet mail.example.com 25
> Trying xx.xx.xx.xx...
> Connected to mail.example.com.
> Escape character is '^]'.
> 220 mail.example.com ESMTP Postfix (Ubuntu)
> HELO mail.example.com
> 250 mail.example.com
> MAIL FROM: <bluethu...@external.com>
> 250 2.1.0 Ok
> RCPT TO: <bluethu...@example.com>
> 454 4.7.1 <bluethu...@example.com>: Relay access denied
> 

Because you’re now connecting from a non-localhost address and you haven’t told 
Postfix that’s local.


> Here is the output of postconf -n
> 
> mydestination =
> 

mydestination defines what domains are to be delivered locally. You set it 
blank so you’re saying no domains are delivered locally.

> mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

You’ve set this to make only localhost to be considered a local network address.

See http://www.postfix.org/BASIC_CONFIGURATION_README.html for more information.

-- 
Larry Stone
lston...@stonejongleux.com
http://www.stonejongleux.com/



Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to