LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 05-26-2005, 01:49 AM   #1
pjon
LQ Newbie
 
Registered: May 2005
Location: Jonkoping, Sweden
Distribution: SLES 9
Posts: 9

Rep: Reputation: 0
Connection refused in sendmail


I have a default installation of sendmail on a SLES9. But when sending mail to the server I get the following respons:

Deferred: Connection refused by <serveraddress>

I get the same response when connecting with telnet over port 25. Im new with Linux and sendmail so I haven't figured it out how to allow connection to sendmail over port 25. Can anyone help me.
 
Old 05-26-2005, 03:49 AM   #2
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
Have you configured it to use "smarthost"?
Code:
divert(-1)
dnl This is the macro config file used to generate sendmail.cf
dnl file. If you modify this file you will have to regenerate 
dnl sendmail.cf by running this macro config through the m4
dnl preprocessor:
dnl
dnl        m4 /home/fancy/Documents/sendmail.mc > /etc/sendmail.cf <--Change to your path
dnl
dnl You will need to have the sendmail-cf RPM installed for this
dnl to work, if you use an rpm build of sendmail
dnl
dnl include(`../m4/cf.m4')
dnl
dnl If you compile sendmail from a tarball, use the include above.
dnl In this setup, you should create the file as cf/cf/config.mc 
dnl (in the sendmail source tree: eg. /usr/src/sendmail-8.11.6/cf/cf
dnl Now give the command "sh Build config.cf".  Now copy the file
dnl config.cf as /etc/mail/sendmail.cf (please backup first!)
dnl
dnl If you are using the RPM build of sendmail, use the 
dnl include statement given below instead
dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')
define(`confDEF_USER_ID',``8:12'')
OSTYPE(`linux')
undefine(`UUCP_RELAY')
undefine(`BITNET_RELAY')
define(`confCF_VERSION',`dialup-1.3')
define(`SMART_HOST', `smtp.yourisp.com') <--Change this
define(`confAUTO_REBUILD')
define(`confTO_CONNECT', `1m')
define(`confTO_IDENT',0)
define(`confTRY_NULL_MX_LIST',true)
define(`confDONT_PROBE_INTERFACES',true)
define(`confCON_EXPENSIVE',true)
define(`confDELIVERY_MODE', `queued')
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')
define(`ALIAS_FILE',`/etc/mail/aliases')
MASQUERADE_AS(`yourisp.com') <--Change this
FEATURE(`masquerade_envelope')
FEATURE(`smrsh',`/usr/sbin/smrsh')
FEATURE(`mailertable',`hash -o /etc/mail/mailertable')
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')
FEATURE(redirect)
FEATURE(always_add_domain)
FEATURE(use_cw_file)
FEATURE(`use_ct_file')
FEATURE(local_procmail)
MAILER(smtp)
MAILER(procmail)
FEATURE(`access_db')
FEATURE(`blacklist_recipients')
FEATURE(`accept_unresolvable_domains')
FEATURE(`accept_unqualified_senders')
dnl FEATURE(`relay_based_on_MX')
# Common e-mail tools
sendmail - postfix - sends mail to local users (and internet when configured correctly)
fetchmail - gets mail from internet accounts (non-Hotmail type)
procmail - sorts and delivers into separate mailboxes
mutt - mail client that sucks less than all the others
Email the Linux Way
Suresh Ramasubramanian's email guide
The Linux Mail User HOWTO
The Linux Electronic Mail Administrator HOWTO
SquirrelMail web mail
Why use Hotmail when there is LinuxMail?
 
Old 05-26-2005, 04:56 AM   #3
pjon
LQ Newbie
 
Registered: May 2005
Location: Jonkoping, Sweden
Distribution: SLES 9
Posts: 9

Original Poster
Rep: Reputation: 0
Im not sure wich file you mean.

In YaST i have configured SENDMAIL_SMARTHOST with the following value:
uucp-dom:<ipaddress to my smtprelayserver>

In the file /etc/sysconfig/sendmail I can se the same value.

Is this correct?
 
Old 05-26-2005, 06:42 AM   #4
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
I don't use the gui front ends as so much stuff is hidden from view such as the errors produced when you make typos, etc., so I can't help you there.

Can you find a file named /etc/sendmail.cf (the configuration file proper for sendmail in the majority of distros). If it isn't there, find where it is on your system.

To do it by hand, first locate the config and file you need to edit:

Open an x terminal, command:
su -
<give root password and hit enter>
locate sendmail.cf
sendmail.mc


To create that file properly, Edit the file sendmail.mc with your fave command line editor such as nano, pico or the editor that comes with mc (midnight commander).

Change the parts I indicated earlier marked by <--Change this.

Then run that file through the m4 pre-processor to create the proper /etc/sendmail.cf :
m4 /path/to/your/sendmail.mc > /etc/sendmail.cf

Alter as needed to fit your system.

Last edited by fancypiper; 05-26-2005 at 06:51 AM.
 
  


Reply


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
RH9 Sendmail: connection refused DaddyBad Linux - Newbie 9 08-30-2010 08:35 PM
SMTP & IMAP OK but Sendmail Connection refused OtinDaku Linux - Networking 5 10-22-2003 11:02 AM
SMTP & IMAP OK but Sendmail Connection refused OtinDaku Linux - General 5 10-20-2003 07:49 AM
sendmail Deferred: Connection refused by localhost.localdomain. 360 Linux - Software 6 03-31-2003 01:07 PM
Sendmail - POP connection refused 360 Linux - Networking 5 04-02-2002 04:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 06:38 PM.

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