Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Postfix 2.7 / Ubuntu 10.04 LTS

when i try to send a mail from Outlook (with smtp auth) to a gmail account (or others), i get relay access denied.

The log (i've faked the emails):

Feb 24 16:49:16 vm1613 imapd: Connection, ip=[::ffff:95.239.57.160]
Feb 24 16:49:16 vm1613 imapd: LOGIN, user=real.user@real.domain, ip=[::ffff:95.239.57.160], port=[52330], protocol=IMAP
Feb 24 16:49:16 vm1613 imapd: Connection, ip=[::ffff:95.239.57.160]
Feb 24 16:49:16 vm1613 imapd: LOGIN, user=real.user@real.domain, ip=[::ffff:95.239.57.160], port=[52331], protocol=IMAP
Feb 24 16:49:17 vm1613 imapd: Connection, ip=[::ffff:95.239.57.160]
Feb 24 16:49:17 vm1613 imapd: LOGIN, user=real.user@real.domain, ip=[::ffff:95.239.57.160], port=[52332], protocol=IMAP
Feb 24 16:49:18 vm1613 imapd: Connection, ip=[::ffff:95.239.57.160]
Feb 24 16:49:18 vm1613 imapd: Connection, ip=[::ffff:95.239.57.160]
Feb 24 16:49:18 vm1613 imapd: LOGIN, user=real.user@real.domain, ip=[::ffff:95.239.57.160], port=[52334], protocol=IMAP
Feb 24 16:49:18 vm1613 imapd: LOGIN, user=real.user@real.domain, ip=[::ffff:95.239.57.160], port=[52335], protocol=IMAP
Feb 24 16:49:22 vm1613 postfix/smtpd[7157]: warning: 95.239.57.160: hostname host160-57-dynamic.239-95-r.retail.telecomitalia.it verification failed: Name or service not known
Feb 24 16:49:22 vm1613 postfix/smtpd[7157]: connect from unknown[95.239.57.160]
Feb 24 16:49:22 vm1613 postfix/smtpd[7157]: NOQUEUE: reject: RCPT from unknown[95.239.57.160]: 554 5.7.1 <real.user@gmail.com>: Relay access denied; from=<real.user@real.domain> to=<real.user@gmail.com> proto=ESMTP helo=<AllePC>

why this if i have permit_sasl_authenticated in smtpd_recipient_restrictions?

root@vm1613:/etc/postfix# postconf smtpd_recipient_restrictions
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination

i'm going crazy for this!

UPDATE:

postconf -n log https://gist.github.com/apelliciari/5025997

saslfinger -s log https://gist.github.com/apelliciari/5026010

saslfinger -c log https://gist.github.com/apelliciari/5026058

i've followed this guide http://www.pixelinx.com/2010/10/creating-a-mail-server-on-ubuntu-using-postfix-courier-ssltls-spamassassin-clamav-and-amavis/

share|improve this question
1  
The login lines you see in the log are from imapd (for retrieving mail), not from smtpd (for sending mail). Please update your question with at least the output of postconf -n, better yet with the output of the saslfinger command. –  Ansgar Wiechers Feb 24 '13 at 19:28
    
thanks for help, i've attached the logs. so you suppose that i can't send from outlook because i'm not authenticated via smtp right? –  apelliciari Feb 24 '13 at 22:31
add comment

1 Answer

up vote 1 down vote accepted

Your email client didn't actually authenticate.

Are you sure you have correctly configured Outlook to connect to port 587 and given it a username and password?

share|improve this answer
    
i've setup all to mysql, with users like this: INSERT INTO user (email, password, name, quota, enabled) VALUES ('admin@example.com', ENCRYPT('changeme'), 'Administrator', NULL, 1); how i can test smtp auth with telnet? i've tried with AUTH LOGIN encoding username and password in base64 but it doesn't seems to work –  apelliciari Feb 24 '13 at 23:05
    
That doesn't say anything about whether your Outlook configuration is correct. –  Michael Hampton Feb 24 '13 at 23:08
    
now it's ok, and i have in log this values unknown[95.239.57.160]: SASL LOGIN authentication failed: authentication failure –  apelliciari Feb 24 '13 at 23:21
    
Now you just need to set the correct username and password :) –  Michael Hampton Feb 24 '13 at 23:21
    
that is a serious problem for me :D i'm trying the "changeme" that i've updated with the sql, but it doesn't work –  apelliciari Feb 24 '13 at 23:23
show 2 more comments

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.