I recently installed sendmail on my virtualmin run server and cannot get mail to work on any of my domains. When i check via any system, i get "connection refused messages. When I try to connect via Usermin, i get - "An error occurred listing mail in this folder : Failed to connect to localhost:143 : Connection refused"n
Here is my sendmail config file:
divert(-1)dnl
Other #-----------------------------------------------------------------------------
Other # $Sendmail: debproto.mc,v 8.14.2 2008-01-24 14:29:57 cowboy Exp $
Other #
Other # Copyright (c) 1998-2007 Richard Nelson. All Rights Reserved.
Other #
Other # cf/debian/sendmail.mc. Generated from sendmail.mc.in by configure.
Other #
Other # sendmail.mc prototype config file for building Sendmail 8.14.2
Other #
Other # Note: the .in file supports 8.7.6 - 9.0.0, but the generated
Other # file is customized to the version noted above.
Other #
Other # This file is used to configure Sendmail for use with Debian systems.
Other #
Other # If you modify this file, you will have to regenerate /etc/mail/sendmail.cf
Other # by running this file through the m4 preprocessor via one of the following:
Other # * make (or make -C /etc/mail)
Other # * sendmailconfig
Other # * m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
Other # The first two options are preferred as they will also update other files
Other # that depend upon the contents of this file.
Other #
Other # The best documentation for this .mc file is:
Other # /usr/share/doc/sendmail-doc/cf.README.gz
Other #
Other #-----------------------------------------------------------------------------
Other divert(0)dnl
Other #
Other # Copyright (c) 1998-2005 Richard Nelson. All Rights Reserved.
Other #
Other # This file is used to configure Sendmail for use with Debian systems.
Other #
Define define(_USE_ETC_MAIL_')dnl
Other include(
/usr/share/sendmail/cf/m4/cf.m4')dnl
Other VERSIONID($Id: sendmail.mc, v 8.14.2-2build1 2008-01-24 14:29:57 cowboy Exp $')
OS Type OSTYPE(
debian')dnl
Other DOMAIN(debian-mta')dnl
Other dnl # Items controlled by /etc/mail/sendmail.conf - DO NOT TOUCH HERE
Undefine undefine(
confHOST_STATUS_DIRECTORY')dnl #DAEMON_HOSTSTATS=
Other dnl # Items controlled by /etc/mail/sendmail.conf - DO NOT TOUCH HERE
Other dnl #
Other dnl # General defines
Other dnl #
Other dnl # SAFE_FILE_ENV: [undefined] If set, sendmail will do a chroot()
Other dnl # into this directory before writing files.
Other dnl # If all your user accounts are under /home then use that
Other dnl # instead - it will prevent any writes outside of /home !
Other dnl # define(confSAFE_FILE_ENV',
')dnl
Other dnl #
Other dnl # Daemon options - restrict to servicing LOCALHOST ONLY !!!
Other dnl # Remove , Addr=' clauses to receive from any interface
Other dnl # If you want to support IPv6, switch the commented/uncommentd lines
Other dnl #
Feature FEATURE(
no_default_msa')dnl
Other dnl DAEMON_OPTIONS(Family=inet6, Name=MTA-v6, Port=smtp, Addr=::1')dnl
Other DAEMON_OPTIONS(
Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl
Other dnl DAEMON_OPTIONS(Family=inet6, Name=MSP-v6, Port=submission, Addr=::1')dnl
Other DAEMON_OPTIONS(
Family=inet, Name=MSP-v4, Port=submission, Addr=127.0.0.1')dnl
Other dnl #
Other dnl # Be somewhat anal in what we allow
Other define(confPRIVACY_FLAGS',dnl
Other
needmailhelo,needexpnhelo,needvrfyhelo,restrictqrun,restrictexpand,nobodyreturn,authwarnings')dnl
Other dnl #
Other dnl # Define connection throttling and window length
Define define(confCONNECTION_RATE_THROTTLE',
15')dnl
Define define(confCONNECTION_RATE_WINDOW_SIZE',
10m')dnl
Other dnl #
Other dnl # Features
Other dnl #
Other dnl # use /etc/mail/local-host-names
Feature FEATURE(use_cw_file')dnl
Other dnl #
Other dnl # The access db is the basis for most of sendmail's checking
Feature FEATURE(
access_db', , skip')dnl
Other dnl #
Other dnl # The greet_pause feature stops some automail bots - but check the
Other dnl # provided access db for details on excluding localhosts...
Feature FEATURE(
greet_pause', 1000')dnl 1 seconds
Other dnl #
Other dnl # Delay_checks allows sender<->recipient checking
Feature FEATURE(
delay_checks', friend',
n')dnl
Other dnl #
Other dnl # If we get too many bad recipients, slow things down...
Define define(confBAD_RCPT_THROTTLE',
3')dnl
Other dnl #
Other dnl # Stop connections that overflow our concurrent and time connection rates
Feature FEATURE(conncontrol',
nodelay', terminate')dnl
Feature FEATURE(
ratecontrol', nodelay',
terminate')dnl
Other dnl #
Other dnl # If you're on a dialup link, you should enable this - so sendmail
Other dnl # will not bring up the link (it will queue mail for later)
Other dnl define(confCON_EXPENSIVE',
True')dnl
Other dnl #
Other dnl # Dialup/LAN connection overrides
Other dnl #
Other include(/etc/mail/m4/dialup.m4')dnl
Other include(
/etc/mail/m4/provider.m4')dnl
Other dnl #
Other dnl # Default Mailer setup
Other MAILER_DEFINITIONS
Mailer MAILER(local')dnl
Mailer MAILER(
smtp')dnl
Any help would be appreciated!
Howdy,
Well, most of us here aren't particularly familiar with Sendmail -- you may on your own for configuring that, unfortunately :-)
However, this particular error:
Failed to connect to localhost:143
That's not a problem with Sendmail, that's an IMAP issue. And IMAP is provided by Dovecot. It's possible it's as simple as your Dovecot daemon isn't running.
What happens if you run this:
/etc/init.d/dovecot start
Does that do the trick?
-Eric
I entered that command. No change. Usermin still gives the same error. Would i be better off using a different mail server?
Howdy,
The problem you're seeing isn't an issue with the mail server, it's an issue with your IMAP server. Our suggestion is to stick with the default Postfix mail server when using Virtualmin -- but that's not the cause of the issues you're seeing at the moment.
If you launched Dovecot, and you're still getting an error saying you can't connect to port 143, that means Dovecot didn't start, or it's unaccessible.
The next step would be to look in the mail logs to determine why Dovecot isn't working as expected... that would be located in either /var/log/mail.log, or /var/log/maillog, depending on your distro.
-Eric
Eric,
Can you tell me how to switch back to Postfix? Sendmail was a suggestion from a friend, but if Postfix is better supported from this forum, that is the way i would rather go. I will look for those logs. Thanks
Cj
Howdy,
Well, when installing with the install.sh script, your system is setup for use with Postfix by default. Sendmail is capable of working for those who prefer it, but there's not usually a good reason to switch, and it may require having some expertise in Sendmail.
As far as how to switch back -- it's difficult to say exactly, I don't know what all went into switching to Sendmail on your server in the first place :-)
You'd essentially need to undo any changes you made in any configs (Virtualmin and otherwise), make sure Sendmail is no longer running, and launch Postfix.
-Eric