View Single Post
  #110  
Old 23rd March 2013, 06:38
klaipedaville klaipedaville is offline
Junior Member
 
Join Date: Mar 2013
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I strongly suggest you study the mailbox_command in your configuration. If you have Procmail and it sounds you have it because you are on Ubuntu, you have to set this parameter first (it's absolutely mandatory to set) otherwise emails will not go anywhere.
Removing this parameter won't help, unless you remove entire Procmail.

The next option please, try setting your ISP's IP address in $mynetworks parameter and restart your posrfix. If it starts working then it will mean that either your ISP is not SASL authenticated or you have misconfigured your SASL. This simple test won't do any harm

Quote:
Originally Posted by Desp View Post
Please some help before losing my mind !
I dhave setup postfix with smtp/imap and using squirrelmail on ubuntu . The problem is that I cant send emails outside the box getting the error Relay access denied . have tested many ways to solve this problem with no luck , The only good thing that happend is that the error msg disapeard but the problem remained . I have added my Wan ip to my networks =
take a look at my main.cf + /etc/hosts and logs :

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
smtpd_tls_cert_file = /etc/ssl/certs/smtpd.crt
smtpd_tls_key_file = /etc/ssl/private/smtpd.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

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

myhostname = trinity.selman.us
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = selman.us, trinity.selman.us, localhost.selman.us, , localhost
relayhost =
mynetworks = 213.112.127.0/24, 127.0.0.0/8, 192.168.1.0/24 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
html_directory = /usr/share/doc/postfix/html
home_mailbox = Maildir/
mailbox_command =
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated permit_mynetworks reject_unauth_destination # I guess here is the problem but how to solve it !!
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_tls_auth_only = no
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

/etc/hosts :

192.168.1.64 trinity.selman.us # Added by NetworkManager
127.0.0.1 localhost.localdomain localhost
::1 trinity localhost6.localdomain6 localhost6
127.0.1.1 trinity.selman.us
213.112.127.168 trinity.selman.us
213.112.127.168 selman.us
213.112.127.168 smtp.selman.us
213.112.127.168 webmail.selman.us
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

and mail.log

Jan 18 18:50:20 trinity postfix/qmgr[12712]: 2CBF44A16AF: from=<mahmoud@selman.us>, size=713, nrcpt=1 (queue active)
Jan 18 18:50:41 trinity postfix/smtp[13262]: connect to mx1.hotmail.com[65.55.37.104]:25: Connection timed out
Jan 18 18:51:02 trinity postfix/smtp[13262]: connect to mx2.hotmail.com[65.55.37.72]:25: Connection timed out
Jan 18 18:51:23 trinity postfix/smtp[13262]: connect to mx2.hotmail.com[65.54.188.110]:25: Connection timed out
Jan 18 18:51:44 trinity postfix/smtp[13262]: connect to mx1.hotmail.com[65.54.188.72]:25: Connection timed out
Jan 18 18:52:05 trinity postfix/smtp[13262]: connect to mx4.hotmail.com[65.55.92.184]:25: Connection timed out
Jan 18 18:52:05 trinity postfix/smtp[13262]: 2CBF44A16AF: to=<desp@live.com>, relay=none, delay=3351, delays=3246/0.01/105/0, dsn=4.4.1, status=deferred (connect to mx4.hotmail.com[65.55.92.184]:25: Connection timed out)

some more info:
root@trinity:~# dig selman.us mx

; <<>> DiG 9.7.1-P2 <<>> selman.us mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8061
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;selman.us. IN MX

;; ANSWER SECTION:
selman.us. 3600 IN MX 10 selman.us.
selman.us. 3600 IN MX 0 selman.us.

;; Query time: 143 msec
;; SERVER: 192.168.1.254#53(192.168.1.254)
;; WHEN: Tue Jan 18 18:58:46 2011
;; MSG SIZE rcvd: 59

root@trinity:~# cat /etc/resolv.conf
# Generated by NetworkManager
domain lan
search lan selman.us
nameserver 192.168.1.254
nameserver 195.54.122.199
nameserver 195.54.122.204
search selman.us

Thank you in advance !
Reply With Quote