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 20th November 2007, 17:19
plathw plathw is offline
Junior Member
 
Join Date: Oct 2007
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Default postfix/email problems...will not send emails out

I am running X-Cart (shopping cart software) on linux/ubuntu and am having problems with emails being sent out. I believe that some emails are being sent out, but it seems to be having problems sending emails to my domains.

My actual mail server that I use for the company is hosted on another server, but the domain (______.coker.com) is hosted on the linux box. When my shopping cart program tries to send emails to ______@coker.com it seems to be getting errors. Hope this makes sence.

Error Log:
Code:
20 09:11:09 cokerlinux1 postfix/cleanup[14706]: 6CAE0298147: message-id=<20071120141109.6CAE0298147@cokerlinux1>
Nov 20 09:11:09 cokerlinux1 postfix/qmgr[1176]: 6CAE0298147: from=<store@coker.com>, size=6078, nrcpt=1 (queue active)
Nov 20 09:11:09 cokerlinux1 postfix/smtp[14707]: connect to mailin-02.mx.aol.com[64.12.137.168]: server dropped connection without sending the initial SMTP greeting (port 25)
Nov 20 09:11:10 cokerlinux1 postfix/smtp[14707]: 6CAE0298147: to=<davbergltd@aol.com>, relay=mailin-02.mx.aol.com[64.12.137.89], delay=1, status=sent (250 OK)
Nov 20 09:11:10 cokerlinux1 postfix/qmgr[1176]: 6CAE0298147: removed
Nov 20 09:12:11 cokerlinux1 postfix/pickup[13166]: D072C298147: uid=33 from=<store@coker.com>
Nov 20 09:12:11 cokerlinux1 postfix/cleanup[14706]: D072C298147: message-id=<20071120141211.D072C298147@cokerlinux1>
Nov 20 09:12:11 cokerlinux1 postfix/qmgr[1176]: D072C298147: from=<store@coker.com>, size=20935, nrcpt=1 (queue active)
Nov 20 09:12:12 cokerlinux1 postfix/pickup[13166]: 0670829814A: uid=33 from=<davbergltd@aol.com>
Nov 20 09:12:12 cokerlinux1 postfix/cleanup[14706]: 0670829814A: message-id=<20071120141212.0670829814A@cokerlinux1>
Nov 20 09:12:12 cokerlinux1 postfix/qmgr[1176]: 0670829814A: from=<davbergltd@aol.com>, size=21601, nrcpt=1 (queue active)
Nov 20 09:12:12 cokerlinux1 postfix/qmgr[1176]: 0670829814A: to=<store@coker.com>, relay=none, delay=1, status=deferred (delivery temporarily suspended: connect to coker.com[66.18.46.195]: Connection refused)
Nov 20 09:12:12 cokerlinux1 postfix/pickup[13166]: 311EE29814C: uid=33 from=<davbergltd@aol.com>
Nov 20 09:12:12 cokerlinux1 postfix/cleanup[14706]: 311EE29814C: message-id=<20071120141212.311EE29814C@cokerlinux1>
Nov 20 09:12:12 cokerlinux1 postfix/qmgr[1176]: 311EE29814C: from=<davbergltd@aol.com>, size=20860, nrcpt=1 (queue active)
Nov 20 09:12:12 cokerlinux1 postfix/qmgr[1176]: 311EE29814C: to=<brianc@coker.com>, relay=none, delay=0, status=deferred (delivery temporarily suspended: connect to coker.com[66.18.46.195]: Connection refused)
Nov 20 09:12:13 cokerlinux1 postfix/smtp[14707]: D072C298147: to=<davbergltd@aol.com>, relay=mailin-01.mx.aol.com[205.188.156.248], delay=2, status=sent (250 OK)
Nov 20 09:12:13 cokerlinux1 postfix/qmgr[1176]: D072C298147: removed
Nov 20 09:14:05 cokerlinux1 postfix/smtp[14634]: connect to mail.twinpharm.cn[82.208.60.203]: read timeout (port 25)
Nov 20 09:14:05 cokerlinux1 postfix/smtp[14634]: 7550729817B: to=<g16@twinpharm.cn>, relay=none, delay=49989, status=deferred (connect to mail.twinpharm.cn[82.208.60.203]: read timeout)
Nov 20 09:14:10 cokerlinux1 postfix/smtp[14632]: connect to mail.twinpharm.cn[82.208.60.203]: read timeout (port 25)
Nov 20 09:14:10 cokerlinux1 postfix/smtp[14632]: EAAF729816E: to=<g13@twinpharm.cn>, relay=none, delay=50002, status=deferred (connect to mail.twinpharm.cn[82.208.60.203]: read timeout)
Reply With Quote
Sponsored Links
  #2  
Old 20th November 2007, 17:20
plathw plathw is offline
Junior Member
 
Join Date: Oct 2007
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Default

etc/postfix/main.cf (if needed):
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

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_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 = cokerlinux1
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
#mydestination = cokerlinux1, localhost.localdomain, , localhost
relayhost = 
mynetworks = subnet
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain = 
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

virtual_maps = hash:/etc/postfix/virtusertable

mydestination = /etc/postfix/local-host-names
Reply With Quote
  #3  
Old 20th November 2007, 17:23
plathw plathw is offline
Junior Member
 
Join Date: Oct 2007
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Default

output of netstat -tap

Code:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State                                                                                    PID/Program name
tcp        0      0 *:mysql                 *:*                     LISTEN     3                                                                             883/mysqld
tcp        0      0 *:81                    *:*                     LISTEN     4                                                                             226/ispconfig_http
tcp        0      0 *:ftp                   *:*                     LISTEN     4                                                                             481/proftpd: (acce
tcp        0      0 virtual-ip2-coke:domain *:*                     LISTEN     4                                                                             465/named
tcp        0      0 virtual-ip3-coke:domain *:*                     LISTEN     4                                                                             465/named
tcp        0      0 virtual-ip1-coke:domain *:*                     LISTEN     4                                                                             465/named
tcp        0      0 cokerlinux1:domain      *:*                     LISTEN     4                                                                             465/named
tcp        0      0 localhost.locald:domain *:*                     LISTEN     4                                                                             465/named
tcp        0      0 *:smtp                  *:*                     LISTEN     1                                                                             173/master
tcp        0      0 localhost.localdoma:953 *:*                     LISTEN     4                                                                             465/named
tcp        0      0 virtual-ip2-coker:40674 network.upl.cz:smtp     ESTABLISHED1                                                                             9262/smtp
tcp6       0      0 *:imaps                 *:*                     LISTEN     3                                                                             757/couriertcpd
tcp6       0      0 *:pop3s                 *:*                     LISTEN     3                                                                             792/couriertcpd
tcp6       0      0 *:pop3                  *:*                     LISTEN     3                                                                             772/couriertcpd
tcp6       0      0 *:imap2                 *:*                     LISTEN     3                                                                             737/couriertcpd
tcp6       0      0 *:www                   *:*                     LISTEN     1                                                                             8233/apache2
tcp6       0      0 *:ssh                   *:*                     LISTEN     4                                                                             055/sshd
tcp6       0      0 *:smtp                  *:*                     LISTEN     1                                                                             173/master
tcp6       0      0 ip6-localhost:953       *:*                     LISTEN     4                                                                             465/named
tcp6       0      0 *:https                 *:*                     LISTEN     1                                                                             8233/apache2
tcp6       0      0 cokerlinux1:www         adsl-76-228-197-21:2556 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         ec2-67-202-28-54.:34120 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         ec2-67-202-28-54.:33769 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         server.myviphosti:28554 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         server.myviphosti:28522 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         adsl-76-228-197-21:2557 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         adsl-76-228-197-21:2558 TIME_WAIT  -                                                                             
tcp6       0      0 virtual-ip3-cokerli:www adsl-67-116-253-11:4566 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:ssh         it218.coker.net:2442    ESTABLISHED1                                                                             4529/sshd: root@no
tcp6       0      0 cokerlinux1:www         adsl-76-228-197-21:2559 TIME_WAIT  -                                                                             
tcp6       0      0 virtual-ip3-cokerli:www adsl-67-116-253-11:4567 TIME_WAIT  -                                                                             
tcp6       0    148 cokerlinux1:ssh         it218.coker.net:fax     ESTABLISHED1                                                                             9358/0
tcp6       0      0 cokerlinux1:www         adsl-76-228-197-21:2552 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         c-68-83-11-151.hs:54978 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         ::ffff:64.22.107.:54282 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         ec2-67-202-28-54.:33293 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         adsl-76-228-197-21:2553 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         adsl-76-228-197-21:2554 TIME_WAIT  -                                                                             
tcp6       0      0 virtual-ip3-cokerli:www adsl-67-116-253-11:4562 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         ec2-67-202-28-54.:33423 TIME_WAIT  -
Reply With Quote
  #4  
Old 20th November 2007, 17:24
plathw plathw is offline
Junior Member
 
Join Date: Oct 2007
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Default

netstat -tap cont

Code:
tcp6       0      0 cokerlinux1:www         server.myviphosti:28524 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         adsl-76-228-197-21:2555 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         ::ffff:64.22.107.:54023 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:ssh         it218.coker.net:3009    ESTABLISHED1                                                                             6356/sshd: root@no
tcp6       0      0 cokerlinux1:www         adsl-76-228-197-21:2548 TIME_WAIT  -                                                                             
tcp6       0      0 virtual-ip3-cokerli:www adsl-67-116-253-11:4572 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         ::ffff:64.22.107.:54374 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         adsl-76-228-197-21:2549 TIME_WAIT  -                                                                             
tcp6       0      0 virtual-ip3-cokerli:www adsl-67-116-253-11:4573 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         ::ffff:64.22.107.:54373 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         adsl-76-228-197-21:2550 TIME_WAIT  -                                                                             
tcp6       0      0 virtual-ip3-cokerli:www adsl-67-116-253-11:4574 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         adsl-76-228-197-21:2551 TIME_WAIT  -                                                                             
tcp6       0      0 virtual-ip3-cokerli:www adsl-67-116-253-11:4575 TIME_WAIT  -                                                                             
tcp6       0      0 virtual-ip3-cokerli:www adsl-67-116-253-11:4568 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         server.myviphosti:28550 TIME_WAIT  -                                                                             
tcp6       0      0 virtual-ip3-cokerli:www adsl-67-116-253-118:iax TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         ::ffff:64.22.107.:53954 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         ::ffff:64.22.107.:54049 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         ::ffff:64.22.107.:54273 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         2.ae.344a.static.:59294 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:ssh         it218.coker.net:2823    ESTABLISHED1                                                                             5726/sshd: root@no
tcp6       0      0 cokerlinux1:www         ec2-67-202-28-54.:33862 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         2.ae.344a.static.:59295 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         ::ffff:64.22.107.:54368 TIME_WAIT  -                                                                             
tcp6       0      0 virtual-ip3-cokerli:www adsl-67-116-253-11:4571 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         main.anicom.org:39750   TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         ::ffff:64.22.107.:54367 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         ec2-67-202-28-54.:34041 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         ::ffff:64.22.107.:54109 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         main.anicom.org:39653   TIME_WAIT  -                                                                             
tcp6       0      0 virtual-ip3-cokerli:www adsl-67-116-253-11:4576 TIME_WAIT  -                                                                             
tcp6       0      0 virtual-ip3-cokerli:www adsl-67-116-253-11:4577 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         ::ffff:64.22.107.:53945 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         ::ffff:64.22.107.:54296 TIME_WAIT  -                                                                             
tcp6       0      0 virtual-ip3-cokerli:www adsl-67-116-253-11:4547 TIME_WAIT  -                                                                             
tcp6       0      0 virtual-ip3-cokerli:www adsl-67-116-253-11:4556 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         main.anicom.org:39599   TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         ec2-67-202-28-54.:34227 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         ec2-67-202-28-54.:33523 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         ::ffff:64.22.107.:54196 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         adsl-76-228-197-21:2560 TIME_WAIT  -                                                                             
tcp6       0      0 virtual-ip3-cokerli:www adsl-67-116-253-11:4552 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         adsl-76-228-197-21:2561 TIME_WAIT  -                                                                             
tcp6       0      0 virtual-ip3-cokerli:www adsl-67-116-253-11:4553 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         main.anicom.org:39752   TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         adsl-76-228-197-21:2562 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         ::ffff:64.22.107.:54289 TIME_WAIT  -                                                                             
tcp6       0      0 cokerlinux1:www         adsl-76-228-197-21:2563 TIME_WAIT  -
Reply With Quote
  #5  
Old 21st November 2007, 14:58
plathw plathw is offline
Junior Member
 
Join Date: Oct 2007
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Default

Anyone? I just found out this is being sent to every customer. Every order placed sends an order notification to _____@coker.com, with the "from" email address being the customer's. Since email can not be delivered to _____@coker.com the customer is being sent this:

Code:
This is the Postfix program at host cokerlinux1.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to <postmaster>

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

   The Postfix program

<_____@coker.com>: delivery temporarily suspended: connect to
    coker.com[66.18.46.195]: Connection refused

--------------------------------------------------------------------------------
Reporting-MTA: dns; cokerlinux1
X-Postfix-Queue-ID: 0586B2986A0
X-Postfix-Sender: rfc822; customer@emailaddress.com
Arrival-Date: Mon, 12 Nov 2007 21:48:01 -0500 (EST)

Final-Recipient: rfc822; _____@coker.com
Action: failed
Status: 4.0.0
Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to
    coker.com[66.18.46.195]: Connection refused

------ End of Forwarded Message
Reply With Quote
  #6  
Old 21st November 2007, 19:06
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Is 66.18.46.195 your server's IP address? Do you have a firewall that blocks port 25? What's the output of
Code:
iptables -L
?
__________________
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
  #7  
Old 21st November 2007, 19:55
plathw plathw is offline
Junior Member
 
Join Date: Oct 2007
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Default

Code:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
Okay, there is the output for you, but I think I have narrowed down the problem some. I double checked the 66.18.46.195...this is not the server's IP address, but I thought this was our mail server IP. It is actually another web hosting box we have here for coker.com. The actual IP for the mail server is 192.168.0.201.

The MX record is set up correctly with our domain host, and we get mail just fine. I think that it has something to do with either subdomains of coker.com being hosted by the linux box postfix is running on, or it is because the linux box is within our local network along with several other servers.

Both of those may not even be close, but I'm not sure what else it could be!

So, to sum it up, when post fix sends mail to outside email hosts (not coker.com) it sends just fine and finds the correct MX record. When it tries to send to coker.com it is sending it to the web host NOT the mail host as set up in with our domain host.

EDIT: Also, after going through the forums again, just wanted to let you know that each domain has been set to external mailserver, and the co-domain "coker.com" has been set to external mailserver as well.

Last edited by plathw; 21st November 2007 at 21:35.
Reply With Quote
  #8  
Old 22nd November 2007, 16:47
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Quote:
Originally Posted by plathw
The actual IP for the mail server is 192.168.0.201.
And what's the mail server's public IP address (this is the public IP address of your router)? Did you forward port 25 from your router to your server?
__________________
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 26th November 2007, 14:49
plathw plathw is offline
Junior Member
 
Join Date: Oct 2007
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Default

66.18.46.196 is the public IP. Yes, it is forwarding properly. The mail server is getting mail just fine from other sources.
Reply With Quote
  #10  
Old 26th November 2007, 18:22
chipsafts chipsafts is offline
Senior Member
 
Join Date: Nov 2007
Posts: 184
Thanks: 2
Thanked 6 Times in 6 Posts
 
Default

Quote:
Originally Posted by plathw
66.18.46.196 is the public IP. Yes, it is forwarding properly. The mail server is getting mail just fine from other sources.
local DNS mis-configuration ?
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
mail problems: receive but cannot send shajazzi Server Operation 6 24th June 2007 10:27
postfix prevent all users of a virtual domain to send emails dimitar Installation/Configuration 0 4th June 2007 11:24
OT: Problems sending emails to gmail. I used postfix debian install (based falko) tuflipes HOWTO-Related Questions 20 29th May 2007 00:01
isp doesnt allow to send emails munika Installation/Configuration 6 1st December 2006 15:59
Can't SEND eMails. DanceNgine Installation/Configuration 21 6th October 2005 18:12


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


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