Connection Times Out When Sending Email to Virtualmin Hosted Domain from MS Outlook using Exchange

Hello,

I am unable to send email using Outlook through Exchange to any of my Virtualmin hosted domains. I receive delay notifications from the mail system after a period of time and when I check Exchange the queue shows the messages waiting to send with a status of "The remote server did not respond to a connection attempt." The strange thing is, Virtualmin can receive fine from google.

Any help is greatly appreciated.

  • Carl
Status: 
Closed (fixed)

Comments

tpnsolutions's picture
Submitted by tpnsolutions on Sun, 10/04/2009 - 11:47

Could you add a sample of your DNS zone for one of the domains in question? (that you are attempting to send to)

Hi Carl -- are you sure your Exchange server is able to send email to other mail servers?

Many providers are blocking port 25, and it's possible that your Exchange server isn't able to communicate on the standard SMTP port with outside servers.

We can send to just about any other server in the world as far as we know. We host exchange from our data center so no ISP blocks. The virtualmin server is also hosted in our data center.

Sure. Please see below.

Start DNS Zone File for technology2reality.com

$ttl 38400 @ IN SOA host1.plexuslogics.com. root.host1.plexuslogics.com. ( 1253488853 10800 3600 604800 38400 ) @ IN NS host1.plexuslogics.com. technology2reality.com. IN A 64.139.218.41 www.technology2reality.com. IN A 64.139.218.41 ftp.technology2reality.com. IN A 64.139.218.41 m.technology2reality.com. IN A 64.139.218.41 localhost.technology2reality.com. IN A 127.0.0.1 webmail.technology2reality.com. IN A 64.139.218.41 admin.technology2reality.com. IN A 64.139.218.41 mail.technology2reality.com. IN A 64.139.218.41 technology2reality.com. IN MX 5 mail.technology2reality.com. technology2reality.com. IN TXT "v=spf1 a mx a:technology2reality.com ip4:64.139.218.41 ?all"

Sorry, not sure how to keep the line breaks in original format when pasting here.

Should port 25 on mail.technology2reality.com be accessible to the outside world?

I'm unable to connect to it, I get a "connection refused" when attempting to connect to it.

Mail.technology2reality.com is the mail server and I can send and receive technology2reality.com email using Outlook mail client configured to connect using POP.

CORRECTION - I cannot receive at all. After sending, message is queued but all outside mail servers appear to get a connection timed out message.

Definitly!
Let me double check FTP is turned off but I am pretty sure it is. Does it look like there is anything wrong/missing here in the postfix config?

#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
-o smtp inet n - n - - smtpd
-o submission inet n - - - - smtpd
# -o smtpd_enforce_tls=yes
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
smtps inet n - - - - smtpd
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
587 inet n - n - - smtpd
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - n - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
old-cyrus unix - n n - - pipe
flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
cyrus unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient

Well, lets start here... is Postfix running?

What happens if you log into SSH, and run:

/etc/init.d/postfix restart

Also, are you seeing any errors in the mail log, in /var/log/maillog?

Postfix was running but after restart, I find one error at the bottom:

Oct 4 13:29:31 host1 postfix/postfix-script: stopping the Postfix mail system Oct 4 13:29:31 host1 postfix/master[32505]: terminating on signal 15 Oct 4 17:29:32 host1 postfix/postqueue[26082]: warning: Mail system is down -- accessing queue directly Oct 4 13:29:39 host1 postfix/postfix-script: starting the Postfix mail system Oct 4 13:29:39 host1 postfix/master[26131]: warning: /etc/postfix/master.cf: logical line must not start with whitespace: " -o smtp inet n?-?n?-?-?smtp..." Oct 4 13:29:39 host1 postfix/master[26131]: daemon started -- version 2.3.3, configuration /etc/postfix

Hrm, your master.cf file looks awry.

Two issues that stand out right away are that with these two lines at the top:

-o smtp inet n - n - - smtpd
-o submission inet n - - - - smtpd

Those lines should not start with a "-o"... the "-o" is how options are passed into a command.

I'd remove the -o from the start of those two lines and then restart Postfix.

Admittedly, I still have more to learn about postfix config....but thank you. I have made these changes and this has allowed mail from google and msn to begin flowing in (and all others I have tested including external exchange servers).

My Exchange server however is a different issue. I am assuming it is an issue internal as both servers are hosted behind the same firewall and are on the same subnet. This I will have to get to the bottom of but the main problem has been corrected.

Thanks Very Much

Carl