Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 5th August 2009, 19:56
jluros jluros is offline
Junior Member
 
Join Date: Aug 2009
Posts: 14
Thanks: 1
Thanked 0 Times in 0 Posts
Default Postfix works on loopback address, but relay access denied on remote connections

I'm making good progress getting ISPConfig 3 and its associated services up and running, but having a persistent issue with a domain configured through ISPConfig. Luros.eu has a catchall address, jluros@luros.eu with a forward to my gmail account. When I test through telnet to port 25 locally (on the server), the message gets queued and sent to my gmail. However, when I try to telnet to port 25 from my home machine on a DSL connection or through a webmail interface on a different system (tried Me.com and Hotmail), I get relay access denied.

Any help would be greatly appreciated.

Main.cf:
Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = /usr/share/doc/postfix

# TLS parameters
# Original Entries 
#smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
#smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
#smtpd_use_tls=yes
#smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
#smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key


# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mail.jasonluros.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
#myorigin = /etc/mailname
#mydestination = Webserver, jasonluros.com, localhost
mydomain = $myhostname
myorigin = $mydomain
mydestination = mail.jasonluros.com, localhost, localhost.localdomain
relayhost = 
mynetworks = 127.0.0.0/8 [::1]/128 174.143.212.167/32
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_alias_domains = 
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /var/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000

proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
html_directory = /usr/share/doc/postfix/html
smtpd_tls_security_level = may
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
virtual_create_maildirsize = yes
virtual_maildir_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
virtual_transport = maildrop
header_checks = regexp:/etc/postfix/header_checks
mime_header_checks = regexp:/etc/postfix/mime_header_checks
nested_header_checks = regexp:/etc/postfix/nested_header_checks
body_checks = regexp:/etc/postfix/body_checks
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
message_size_limit = 0

debug_peer_list = 127.0.0.1 174.143.212.167
Attached Files
File Type: txt Postfix log.txt (88.1 KB, 140 views)
Reply With Quote
Sponsored Links
  #2  
Old 6th August 2009, 10:05
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

Please post the output of:

netstat -tap
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 6th August 2009, 17:49
jluros jluros is offline
Junior Member
 
Join Date: Aug 2009
Posts: 14
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Code:
mail /var/www/jasonluros.com/web: sudo netstat -tap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 localhost:10024         *:*                     LISTEN      18815/amavisd (mast
tcp        0      0 localhost:10025         *:*                     LISTEN      27995/master    
tcp        0      0 *:mysql                 *:*                     LISTEN      17139/mysqld    
tcp        0      0 localhost:spamd         *:*                     LISTEN      4041/spamd.pid  
tcp        0      0 *:http-alt              *:*                     LISTEN      4829/apache2    
tcp        0      0 *:www                   *:*                     LISTEN      4829/apache2    
tcp        0      0 *:30000                 *:*                     LISTEN      3793/sshd       
tcp        0      0 10.176.164.138:domain   *:*                     LISTEN      3182/mydns      
tcp        0      0 mail.jasonluros.:domain *:*                     LISTEN      3182/mydns      
tcp        0      0 localhost:domain        *:*                     LISTEN      3182/mydns      
tcp        0      0 *:ftp                   *:*                     LISTEN      4706/pure-ftpd (SER
tcp        0      0 *:smtp                  *:*                     LISTEN      27912/smtpd     
tcp        0      0 *:https                 *:*                     LISTEN      4829/apache2    
tcp        0     48 mail.jasonluros.c:30000 adsl-76-247-42-22:36182 ESTABLISHED 27509/sshd: jluros 
tcp        0      0 mail.jasonluros.c:30000 adsl-76-247-42-22:48218 ESTABLISHED 27833/sshd: jluros 
tcp       56      0 localhost:37781         localhost:10025         CLOSE_WAIT  18825/amavisd (ch1-
tcp       56      0 localhost:56743         localhost:10025         CLOSE_WAIT  18824/amavisd (ch1-
tcp        0      0 localhost:42450         localhost:www           TIME_WAIT   -               
tcp        0      0 mail.jasonluros.co:smtp adsl-76-247-42-22:36260 ESTABLISHED 27912/smtpd     
tcp6       0      0 [::]:imaps              [::]:*                  LISTEN      4571/couriertcpd
tcp6       0      0 [::]:pop3s              [::]:*                  LISTEN      4614/couriertcpd
tcp6       0      0 [::]:pop3               [::]:*                  LISTEN      4592/couriertcpd
tcp6       0      0 [::]:imap2              [::]:*                  LISTEN      4549/couriertcpd
tcp6       0      0 [::]:30000              [::]:*                  LISTEN      3793/sshd       
tcp6       0      0 localhost:domain        [::]:*                  LISTEN      3182/mydns      
tcp6       0      0 [::]:ftp                [::]:*                  LISTEN      4706/pure-ftpd (SER
tcp6       0      0 localhost:55680         localhost:domain        TIME_WAIT   -               
tcp6       0      0 localhost:35354         localhost:ftp           TIME_WAIT   -               
mail /var/www/jasonluros.com/web: ps -aef|grep 27912
postfix  27912 27995  0 14:50 ?        00:00:00 smtpd -n smtp -t inet -u -c -o stress

Last edited by jluros; 6th August 2009 at 17:52. Reason: Added ps -aef
Reply With Quote
  #4  
Old 7th August 2009, 11:42
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

This looks all fine so far. Please make sure that your router forwards port 25 from your external Ip to your server and contact your dsl or cable provider and make sure that they do not block port 25.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 7th August 2009, 16:18
jluros jluros is offline
Junior Member
 
Join Date: Aug 2009
Posts: 14
Thanks: 1
Thanked 0 Times in 0 Posts
Default

I don't believe that my host is blocking port 25.
Code:
telnet lJLMacbookPro:~ jluros$ telnet luros.eu 25
Trying 174.143.212.167...
Connected to luros.eu.
Escape character is '^]'.
220 mail.jasonluros.com ESMTP Postfix (Ubuntu)
HELO adsl-76-247-42-220.dsl.pltn13.sbcglobal.net
250 mail.jasonluros.com
MAIL FROM:<jluros@adsl-76-247-42-220.dsl.pltn13.sbcglobal.net>
250 2.1.0 Ok
RCPT TO:<jluros@luros.eu>
554 5.7.1 <jluros@luros.eu>: Relay access denied
Logs:
Code:
Aug  7 13:10:01 mail postfix/smtpd[25176]: match_hostname: localhost ~? 127.0.0.0/8
Aug  7 13:10:01 mail postfix/smtpd[25176]: match_hostaddr: 127.0.0.1 ~? 127.0.0.0/8
Aug  7 13:10:01 mail postfix/smtpd[25176]: > localhost[127.0.0.1]: 220 mail.jasonluros.com ESMTP Postfix (Ubuntu)
Aug  7 13:10:01 mail postfix/smtpd[25176]: watchdog_pat: 0x7f1233f97600
Aug  7 13:10:01 mail postfix/smtpd[25176]: smtp_get: EOF
Aug  7 13:10:01 mail postfix/smtpd[25176]: match_hostname: localhost ~? 127.0.0.0/8
Aug  7 13:10:01 mail postfix/smtpd[25176]: match_hostaddr: 127.0.0.1 ~? 127.0.0.0/8
Aug  7 13:10:01 mail postfix/smtpd[25176]: lost connection after CONNECT from localhost[127.0.0.1]
Aug  7 13:10:01 mail postfix/smtpd[25176]: disconnect from localhost[127.0.0.1]
Aug  7 13:13:04 mail postfix/smtpd[25250]: connect from adsl-76-247-42-220.dsl.pltn13.sbcglobal.net[76.247.42.220]
Aug  5 05:03:28 mail postfix/smtpd[16933]: warning: adsl-76-247-42-220.dsl.pltn13.sbcglobal.net[76.247.42.220]: SASL PLAIN authentication failed: authentication failure
Aug  5 05:03:48 mail postfix/smtpd[16933]: warning: SASL authentication failure: Password verification failed
Aug  5 05:03:48 mail postfix/smtpd[16933]: warning: adsl-76-247-42-220.dsl.pltn13.sbcglobal.net[76.247.42.220]: SASL PLAIN authentication failed: authentication failure
Aug  5 05:24:13 mail postfix[17801]: error: to submit mail, use the Postfix sendmail command
Aug  5 05:24:13 mail postfix[17801]: fatal: the postfix command is reserved for the superuser
Aug  5 05:27:08 mail postfix/smtpd[17929]: warning: 174.143.212.167: address not listed for hostname mail.jasonluros.com
Aug  5 05:33:30 mail postfix/smtpd[18124]: warning: 174.143.212.167: address not listed for hostname mail.jasonluros.com
Aug  5 05:34:15 mail postfix/smtpd[18124]: warning: 174.143.212.167: address not listed for hostname mail.jasonluros.com
Aug  5 05:36:06 mail postfix/smtpd[18335]: warning: 174.143.212.167: address not listed for hostname mail.jasonluros.com
Aug  5 16:02:43 mail postfix/smtpd[13147]: warning: 174.143.212.167: address not listed for hostname mail.jasonluros.com
Aug  7 13:15:02 mail postfix/smtpd[25329]: connect from localhost[127.0.0.1]
Aug  7 13:15:02 mail postfix/smtpd[25329]: match_hostname: localhost ~? 127.0.0.0/8
Aug  7 13:15:02 mail postfix/smtpd[25329]: match_hostaddr: 127.0.0.1 ~? 127.0.0.0/8
Aug  7 13:15:02 mail postfix/smtpd[25329]: > localhost[127.0.0.1]: 220 mail.jasonluros.com ESMTP Postfix (Ubuntu)
Aug  7 13:15:02 mail postfix/smtpd[25329]: watchdog_pat: 0x7f02e6213600
Aug  7 13:15:02 mail postfix/smtpd[25329]: smtp_get: EOF
Aug  7 13:15:02 mail postfix/smtpd[25329]: match_hostname: localhost ~? 127.0.0.0/8
Aug  7 13:15:02 mail postfix/smtpd[25329]: match_hostaddr: 127.0.0.1 ~? 127.0.0.0/8
Aug  7 13:15:02 mail postfix/smtpd[25329]: lost connection after CONNECT from localhost[127.0.0.1]
Aug  7 13:15:02 mail postfix/smtpd[25329]: disconnect from localhost[127.0.0.1]
Aug  7 13:15:07 mail postfix/smtpd[25250]: NOQUEUE: reject: RCPT from adsl-76-247-42-220.dsl.pltn13.sbcglobal.net[76.247.42.220]: 554 5.7.1 <jluros@luros.eu>: Relay access denied; from=<jluros@adsl-76-247-42-220.dsl.pltn13.sbcglobal.net> to=<jluros@luros.eu> proto=SMTP helo=<adsl-76-247-42-220.dsl.pltn13.sbcglobal.net>
Reply With Quote
  #6  
Old 8th August 2009, 14:30
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
 
Default

Did you enable "Server requires authentication" in your email client?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Relay access denied when using SMTP to external recipients Kamran Shah Installation/Configuration 111 14th May 2014 19:10
Postfix issue: Relay access denied and problem with sending mails Debianer Installation/Configuration 9 14th February 2009 14:47
relay access denied (i've readen the previous post about this ) jeanjacquesjeanjacques Installation/Configuration 5 22nd April 2006 00:34
Questions in regards to ISP-Server Setup - Ubuntu 5.10 "Breezy Badger" rbrantley HOWTO-Related Questions 16 10th April 2006 19:26
Bug? (postfix refuses mail, relay access denied) st2xo General 2 31st January 2006 17:00


All times are GMT +2. The time now is 15:49.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.