Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 3rd January 2012, 07:41
ELY_M ELY_M is offline
Junior Member
 
Join Date: Jan 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Question postfix - not getting any emails. I can send out emails to outside from postfix

my server is on amazon aws service. I made sure smtpd ports are open.
I am able to use thunderbird to check my emails and send out emails.

I sent many test emails in my gmail and yahoo accounts to admin@my-domain.biz
They never show up in mailbox for user admin.
I do not see any errors in maillog

I have postfix 2.66 and dovecot installed

Code:
[root@ip-10-170-91-47 postfix]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = 10.170.91.47, localhost
inet_protocols = all
local_recipient_maps =
mail_spool_directory = /var/spool/mail
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain
mydomain = my-domain.biz
myhostname = mail.my-domain.biz
mynetworks = 50.xx.xx.xx, 10.170.91.47, 127.0.0.0/8
mynetworks_style = host
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
relay_domains =
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP Authorized use only
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
[root@ip-10-170-91-47 postfix]#

dig command show that MX is set correctly...

Code:
dig MX my-domain.biz

; <<>> DiG 9.2.4 <<>> MX my-domain.biz
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40145
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 5

;; QUESTION SECTION:
;my-domain.biz.               IN      MX

;; ANSWER SECTION:
my-domain.biz.        3600    IN      MX      10 mail.my-domain.biz.

;; AUTHORITY SECTION:
my-domain.biz.        86400   IN      NS      ns1.afraid.org.
my-domain.biz.        86400   IN      NS      ns3.afraid.org.
my-domain.biz.        86400   IN      NS      ns2.afraid.org.
my-domain.biz.        86400   IN      NS      ns4.afraid.org.

;; ADDITIONAL SECTION:
mail.my-domain.biz.   3600    IN      A       50.xx.xx.xx
ns3.afraid.org.         390     IN      A       72.20.15.62
ns1.afraid.org.         390     IN      A       50.23.197.95
ns4.afraid.org.         48      IN      A       174.128.246.102
ns2.afraid.org.         6051    IN      A       174.37.196.55

;; Query time: 88 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Tue Jan  3 00:34:54 2012
;; MSG SIZE  rcvd: 216
I am able to telnet to mail server fine.
Code:
[glow@IBM ~]$ telnet mail.my-domain.biz 25557
Trying 50.xx.xx.xx...
Connected to mail.my-domain.biz (50.xx.xx.xx).
Escape character is '^]'.
220 mail.my-domain.biz ESMTP Authorized use only
EHLO localhost
250-mail.my-domain.biz
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
quit
221 2.0.0 Bye
Connection closed by foreign host.
[glow@IBM ~]$


I see no error in maillog
so I think emails get lost somewhere.....

Last edited by ELY_M; 3rd January 2012 at 08:04.
Reply With Quote
Sponsored Links
  #2  
Old 3rd January 2012, 12:25
White White is offline
Member
 
Join Date: Apr 2008
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default

when you send the emails, do you get postmaster emails saying "could not send" or "retrying" to send in your gmail and yahoo accounts?
Reply With Quote
  #3  
Old 3rd January 2012, 12:39
ELY_M ELY_M is offline
Junior Member
 
Join Date: Jan 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

finally they came after like a day .......
took long time for the error mails to come....

Code:
This is an automatically generated Delivery Status Notification

THIS IS A WARNING MESSAGE ONLY.

YOU DO NOT NEED TO RESEND YOUR MESSAGE.

Delivery to the following recipient has been delayed:

     admin@my-domain.biz

Message will be retried for 2 more day(s)

Technical details of temporary failure: 
The recipient server did not accept our requests to connect. Learn more at http://mail.google.com/support/bin/answer.py?answer=7720 
[mail.my-domain.biz. (10): Connection timed out]

----- Original message -----

MIME-Version: 1.0
Received: by 10.14.125.146 with SMTP id z18mr18978374eeh.88.1325490834780;
 Sun, 01 Jan 2012 23:53:54 -0800 (PST)
Received: by 10.14.125.2 with HTTP; Sun, 1 Jan 2012 23:53:54 -0800 (PST)
Date: Mon, 2 Jan 2012 01:53:54 -0600
Message-ID: <CAO7tG7-TbgAz=Sh5FgXT8=kwVdWmN6uLEdnHP8uSyKg_yoQOsw@mail.gmail.com>
Subject: testttttttt 666666
From: "ELY M." <xxxxxxxxx@gmail.com>
To: admin@my-domain.biz
Content-Type: text/plain; charset=ISO-8859-1

6666666666666666666666666

Last edited by ELY_M; 3rd January 2012 at 12:46.
Reply With Quote
  #4  
Old 3rd January 2012, 16:01
White White is offline
Member
 
Join Date: Apr 2008
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default

is the server yours?

is it behind a router?

is the router setup to allow traffic to ports 25 and 10025 in the NAT - Virtual Server ? for the server?
Reply With Quote
  #5  
Old 3rd January 2012, 16:11
ELY_M ELY_M is offline
Junior Member
 
Join Date: Jan 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

it is my server. it is vps I think.
The firewall is already set up to allow smtpd's port.
I am using different port for smtpd.
I said I am able to telnet to the postfix from diff box.
Reply With Quote
  #6  
Old 3rd January 2012, 18:31
White White is offline
Member
 
Join Date: Apr 2008
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i dont know, if they were getting lost then they would be being delivered somewhere and so theoretically you should have no postmaster error emails saying "The recipient server did not accept our requests to connect".

I had these errors which is why i asked the questions as it was my router which was refusing to connect the incoming emails requests to my server.

whats the result of

netstat -tap
Reply With Quote
  #7  
Old 4th January 2012, 01:33
ELY_M ELY_M is offline
Junior Member
 
Join Date: Jan 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Code:
[root@ip-10-170-91-47 postfix]# netstat -tap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
tcp        0      0 *:imaps                     *:*                         LISTEN      12715/dovecot
tcp        0      0 *:pop3s                     *:*                         LISTEN      12715/dovecot
tcp        0      0 *:27777                       *:*                         LISTEN      1326/sshd
tcp        0      0 *:25557                     *:*                         LISTEN      27463/master
tcp        0      0 *:imap                      *:*                         LISTEN      12715/dovecot
tcp        0      0 *:adobeserver-2             *:*                         LISTEN      12715/dovecot
tcp        0      0 *:39000                     *:*                         LISTEN      7498/perl
tcp        0    256 ip-10-170-91-47.us-west:27777 xxxxx.dhcp.ro:33655 ESTABLISHED 13026/3
tcp        0      0 ip-10-170-91-47.us-we:34671 204.246.160.138:http        TIME_WAIT   -
tcp        0      0 *:imaps                     *:*                         LISTEN      12715/dovecot
tcp        0      0 *:pop3s                     *:*                         LISTEN      12715/dovecot
tcp        0      0 *:27777                       *:*                         LISTEN      1326/sshd
tcp        0      0 *:25557                     *:*                         LISTEN      27463/master
tcp        0      0 *:imap                      *:*                         LISTEN      12715/dovecot
tcp        0      0 *:adobeserver-2             *:*                         LISTEN      12715/dovecot
[root@ip-10-170-91-47 postfix]#
Reply With Quote
  #8  
Old 4th January 2012, 16:16
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

The problem is that you are not using port 25 for smtp. How should Gmail and others connect to your server if you use another port?
__________________
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
  #9  
Old 4th January 2012, 23:11
ELY_M ELY_M is offline
Junior Member
 
Join Date: Jan 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

blah.... I tried falko's suggestion about port 25
I opened port 25 in firewall and open it in master.cf
restarted postfix...
now, I am getting test emails.
I sent new test email and I got new test email fast.....
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
Postfix/courier/Centos 6 cant send email to external email servers maxtorzito Installation/Configuration 14 7th October 2011 10:56
mail authentication failure - unknown user or password evok Installation/Configuration 9 16th October 2010 06:37
Mail server using Postfix, Dovecot, Mysql... Postfix virtual maps doesn't work?? tarasbuljba HOWTO-Related Questions 33 28th May 2010 14:33
postfix, pop3 uvbnserved Server Operation 22 24th May 2009 21:00
Mail System Error - Returned Mail tristanlee85 General 16 16th March 2008 09:40


All times are GMT +2. The time now is 07:22.


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