LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-24-2007, 07:06 PM   #1
ssfrstlstnm
Member
 
Registered: Dec 2004
Location: IN, USA
Distribution: debian etch
Posts: 402

Rep: Reputation: 30
postfix can't receive mail; send OK


I am unable to receive mail from the outside. Any suggestions are greatly appreciated. I get this in the system log after trying to send mail from my gmail account (ip's and domain names changed to protect the guilty):
Code:
Apr 24 18:55:55 localhost postfix/smtpd[5604]: connect from nz-out-0506.google.com[64.233.162.229]
Apr 24 18:55:55 localhost postfix/smtpd[5604]: NOQUEUE: reject: RCPT from nz-out-0506.google.com[64.233.162.229]: 554 5.7.1 <myemail@gmail.com>: Sender address rejected: Access denied; from=<myemail@gmail.com> to=<stephen@mydomain.com> proto=ESMTP helo=<nz-out-0506.google.com>
Apr 24 18:55:55 localhost postfix/smtpd[5604]: disconnect from nz-out-0506.google.com[64.233.162.229]
main.cf
Code:
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

append_dot_mydomain = no

delay_warning_time = 4h

# SASL parameters
#smtpd_sasl_auth_enable = yes
smtpd_sender_restrictions = permit_sasl_authenticated,
                            permit_mynetworks,
                            reject
smtpd_recipient_restrictions =  permit_mynetworks,
                                check_client_access hash:/etc/postfix/client_access,
                                reject_unauth_destination
relay_recipient_maps = hash:/etc/postfix/relay_recipients
smtpd_sasl_security_options = noanonymous
smtpd_sasl_authenticated_header = yes
broken_sasl_auth_clients = yes

# SASL client parameters
#smtp_sender_dependent_authentication = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_type = cyrus
smtp_sasl_security_options = noanomymous

# TLS parameters
smtpd_use_tls = yes
smtp_use_tls = yes
smtpd_tls_cert_file=/etc/postfix/ssl/smtpd.pem
smtpd_tls_key_file=$smtpd_tls_cert_file
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtp_tls_loglevel = 3
tls_random_source = dev:/dev/random

myhostname = mydomain.com
mydomain = mydomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $mydomain
mydestination = $mydomain, localhost.localdomain, localhost, mydomain1.com, mydomain2.com
local_recipient_maps =
relay_domains = $mydomain, localhost.localdomain, localhost, mydomain1.com, mydomain2.com
relayhost = mail.insightbb.com
mynetworks = 127.0.0.0/8 128.210.184.0/24 192.168.1.0/24 my.external.ip.here
home_mailbox = Maildir/
MAILDIR=$HOME/Maildir
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

# smtp rewriting maps
smtp_generic_maps = hash:/etc/postfix/rewrite
relay_recipients is set up with postmap from something like this
Code:
@yahoo.com OK
@gmail.com OK
@hotmail.com OK
@purdue.edu OK
@mydomain.com OK
sasl_passwd is set up with postmap from this
Code:
mail1@gmail.com      MyPassword1
mail2@yahoo.com      MyPassword2
 
Old 04-24-2007, 07:27 PM   #2
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
It could be that your ISP is blocking port 25.
 
Old 04-24-2007, 07:29 PM   #3
ssfrstlstnm
Member
 
Registered: Dec 2004
Location: IN, USA
Distribution: debian etch
Posts: 402

Original Poster
Rep: Reputation: 30
Don't think that's it since google is connecting to smtpd and getting rejected (see the syslog output that I posted above).
 
Old 04-24-2007, 07:47 PM   #4
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
Quote:
Originally Posted by ssfrstlstnm
smtpd_sender_restrictions = permit_sasl_authenticated,
permit_mynetworks,
reject
Change it to:

Quote:

smtpd_sender_restrictions =
permit_sasl_authenticated,
permit_mynetworks,
permit
With what you have you are permitting only senders that are authenticated via sasl or user from your local network and every other sender is rejected including the sender from the google account.

Also make sure that you have:

Quote:
smtpd_recipient_restrictions =
permit_sasl_authenticated,
permit_mynetworks,
reject_unauth_destination
Or you'll have an open relay.
 
Old 04-24-2007, 08:01 PM   #5
ssfrstlstnm
Member
 
Registered: Dec 2004
Location: IN, USA
Distribution: debian etch
Posts: 402

Original Poster
Rep: Reputation: 30
That did it! Thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
with the linux proxi, backend pop3 mail client can not receive mail and send mail rubin823 Linux - Networking 0 12-21-2006 10:06 PM
Postfix send, but will not receive (or display in logs) jules_fraser Linux - Networking 0 01-01-2005 07:46 PM
Server does'nt send mail until shutdown and LAN can't send or receive. Wolfy Linux - Networking 0 08-02-2004 07:31 PM
Postfix able to send but not receive mail :( !! Ikik Linux - General 10 01-28-2004 07:40 PM
postfix standard manner, send/receive JM_Fraser Linux - Networking 3 11-26-2003 05:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration