Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


Search this Thread
Old 01-07-2005, 04:36 PM   #1
Registered: Nov 2004
Posts: 32

Rep: Reputation: 15
Postfix config problem

I originally tried sendmail without much luck... was recommended I try getting postfix to work instead, so I followed this tutorial:

... but seems something isn't right still.

I have smtp on port 2525 as my isp blocks 25.

When I try and access my mail using outlook, it successfully "checks" the mail... but it fails trying to send with this error:
Your server has unexpectedly terminated the connection. Possible causes for this include server problems, network problems, or a long period of inactivity. Account: '', Server: '', Protocol: SMTP, Port: 2525, Secure(SSL): No, Error Number: 0x800CCC0F

Also if I send a mail to me, it never seems to recieve it.


Here are some of the config files:

# See /usr/share/postfix/ for a commented, more complete version

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

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

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

myhostname =
mydomain =
alias_maps = hash:/etc/aliases, ldap:ldapdata
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname localhost.$mydomain
relayhost =
mynetworks =
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
mailbox_transport = lmtp:unix:/var/run/cyrus/socket/lmtp

ldapdata_server_host =
ldapdata_search_base = dc=purrfect.dyndns,dc=org
ldapdata_query_filter = (mailLocalAddress=%s)
ldapdata_result_attribute = mailRoutingAddress

smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, permit

smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtp.example.crt
smtpd_tls_key_file = /etc/postfix/smtp.example.key

smtpd_sasl_auth_enable = yes
smtpd_tls_auth_only = yes

# Postfix master process configuration file. Each logical line
# describes how a Postfix daemon program should be run.
# A logical line starts with non-whitespace, non-comment text.
# Empty lines and whitespace-only lines are ignored, as are comment
# lines whose first non-whitespace character is a `#'.
# A line that starts with whitespace continues a logical line.
# The fields that make up each line are described below. A "-" field
# value requests that a default value be used for that field.
# Service: any name that is valid for the specified transport type
# (the next field). With INET transports, a service is specified as
# hostort. The host part (and colon) may be omitted. Either host
# or port may be given in symbolic form or in numeric form. Examples
# for the SMTP server: localhost:smtp receives mail via the loopback
# interface only; 10025 receives mail on port 10025.
# Transport type: "inet" for Internet sockets, "unix" for UNIX-domain
# sockets, "fifo" for named pipes.
# Private: whether or not access is restricted to the mail system.
# Default is private service. Internet (inet) sockets can't be private.
# Unprivileged: whether the service runs with root privileges or as
# the owner of the Postfix system (the owner name is controlled by the
# mail_owner configuration variable in the file). Only the
# pipe, virtual and local delivery daemons require privileges.
# Chroot: whether or not the service runs chrooted to the mail queue
# directory (pathname is controlled by the queue_directory configuration
# variable in the file). Presently, all Postfix daemons can run
# chrooted, except for the pipe, virtual and local delivery daemons.
# The proxymap server can run chrooted, but doing so defeats most of
# the purpose of having that service in the first place.
# The files in the examples/chroot-setup subdirectory describe how
# to set up a Postfix chroot environment for your type of machine.
# Wakeup time: automatically wake up the named service after the
# specified number of seconds. A ? at the end of the wakeup time
# field requests that wake up events be sent only to services that
# are actually being used. Specify 0 for no wakeup. Presently, only
# the pickup, queue manager and flush daemons need a wakeup timer.
# Max procs: the maximum number of processes that may execute this
# service simultaneously. Default is to use a globally configurable
# limit (the default_process_limit configuration parameter in
# Specify 0 for no process count limit.
# Command + args: the command to be executed. The command name is
# relative to the Postfix program directory (pathname is controlled by
# the daemon_directory configuration variable). Adding one or more
# -v options turns on verbose logging for that service; adding a -D
# option enables symbolic debugging (see the debugger_command variable
# in the configuration file). See individual command man pages
# for specific command-line options, if any.
# General options can be overridden for specific services.
# To override one or more options, specify them as arguments
# below, preceding each option by "-o". There must be no whitespace
# in the option itself (separate multiple values for an option by
# commas).
# In order to use the "uucp" message tranport below, set up entries
# in the transport table.
# In order to use the "cyrus" message transport below, configure it
# in as the mailbox_transport.
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - - - - smtpd
2525 inet n - - - - smtpd
#submission inet n - - - - smtpd
# -o smtpd_etrn_restrictions=reject
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - - 300 1 qmgr
#qmgr fifo n - - 300 1 oqmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - - - - smtp
relay unix - - - - - smtp
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - - - - showq
error unix - - - - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
# maildrop. See the Postfix MAILDROP_README file for details.
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
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=bsmtp argv=/usr/lib/bsmtp/bsmtp -d -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}

# only used by postfix-tls
#tlsmgr fifo - - n 300 1 tlsmgr
#smtps inet n - n - - smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#587 inet n - n - - smtpd -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
Old 01-08-2005, 12:20 AM   #2
Registered: Jan 2005
Posts: 37

Rep: Reputation: 15
Re: Postfix config problem

Okay, this could be a few things.

First, look at this:

Originally posted by Rarrum
mynetworks =
Since you said you're using Outlook, I'm assuming that you're using a different computer on your LAN to connect to it? If so, then mynetworks needs to include your LAN range in order to accept the connection. You could also define it with "mynetworks_style = subnet", in which Postfix "trusts" the entire subnet, so all users can send mail.

I also noticed that you're using dynamic dns. This is fine. But, if you did not already, you might need to add an entry to your hosts file in the computers on your LAN. This is so it connects through the LAN interface, and not the WAN. Edit the hosts file on your computer(s), and add the LAN ip address of your server, along with the domain name (

If neither of these work, double check and make sure your firewall isn't blocking port 2525.

Old 01-08-2005, 07:48 PM   #3
Registered: Nov 2004
Posts: 32

Original Poster
Rep: Reputation: 15
Well the computer could be anywhere... and at the time I was trying it, it was from a computer about 1500 miles away... was setting it up remotely. Am at the site locally now, but plan to use server from anywhere.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix config + dbc001 Mandriva 3 08-17-2005 08:18 AM
basic config for postfix dienerk Linux - General 1 10-25-2004 02:52 AM
Postfix Config problem Beetle B. Linux - Networking 5 09-27-2004 07:48 PM
Postfix config on Debian thebiz Linux - Networking 2 10-15-2003 11:50 AM
postfix with dynamic ip config jay820 Linux - Software 30 08-11-2003 11:26 AM

All times are GMT -5. The time now is 11:35 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration