LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-25-2005, 04:29 PM   #1
djgerbavore
Member
 
Registered: Jun 2004
Location: PA
Distribution: Fedora (latest git kernel)
Posts: 458

Rep: Reputation: 30
getting sendmail to work


i'm trying to get sendmail working so i can get scripts emailed to me. however when i type:

Code:
sendmail myaddr@host.com
My Message
.
I don't get an error, but when i look at my /var/log/maillog file i see this:
Code:
May 25 10:48:00 darkstar sendmail[1824]: j4PElp3A001824: to=gerb.stralko@gmail.com, ctladdr=root (0/0), delay=00:00:09, xdelay=00:00:00, mailer=relay, pri=30020,relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
how do i setup sendmail to email me?

thanks,
djgerabavor3
 
Old 05-26-2005, 10:58 AM   #2
niknah
Member
 
Registered: Dec 2002
Location: In front of a computer
Distribution: UPS, DHL, FedEx
Posts: 466

Rep: Reputation: 38
> Connection refused by [127.0.0.1]

It looks like your sendmail daemon isn't running,
you can start it up manually by running...
/usr/sbin/sendmail -bd
 
Old 05-26-2005, 11:23 AM   #3
djgerbavore
Member
 
Registered: Jun 2004
Location: PA
Distribution: Fedora (latest git kernel)
Posts: 458

Original Poster
Rep: Reputation: 30
that seem to work, but i'm still getting errors, however i don't know if there is anything i can do:
Code:
May 26 11:19:09 darkstar sendmail[2133]: j4QFJ8VL002131: to=<gerb.stralko@gmail.com>,
ctladdr=<root@darkstar.example.net> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=esmtp,
pri=120323, relay=gsmtp185.google.com. [64.233.185.27], dsn=4.0.0, stat=Deferred: Connection 
refused by gsmtp185.google.com.
its seems to be on google's end? am i right , or is there something i can do?

thanks,


djgerbavor3
 
Old 05-26-2005, 12:49 PM   #4
niknah
Member
 
Registered: Dec 2002
Location: In front of a computer
Distribution: UPS, DHL, FedEx
Posts: 466

Rep: Reputation: 38
Try telneting to any mail server on port 25.
you can find the mail server of a domain by typing...
host -t MX gmail.com

Some anti-spam isps block port 25, if they've done this you have to change the smart relay in sendmail.cf like...
DSsmtp.isp.com

the smtp server is your isp's smtp server.
 
Old 05-26-2005, 01:21 PM   #5
djgerbavore
Member
 
Registered: Jun 2004
Location: PA
Distribution: Fedora (latest git kernel)
Posts: 458

Original Poster
Rep: Reputation: 30
sorry for asking dumb questions, but how to you telnet to any mail server on port 25 I know what telnet and ssh are, but i not familar with telneting on a different port then 21 and 22... Could you help me out when you say "Try telneting to any mail server on port 25."


thanks,

djgerbavor3
 
Old 05-26-2005, 08:04 PM   #6
niknah
Member
 
Registered: Dec 2002
Location: In front of a computer
Distribution: UPS, DHL, FedEx
Posts: 466

Rep: Reputation: 38
type...
telnet gsmtp185.google.com 25

and a messge should come up if their mail server is working.
press ctrl-] and type quit to get out of telnet

also try another mail server like... just to be sure.
telnet mx.linuxquestions.org 25

if no messages come up then you've got to set the smart host
 
Old 05-26-2005, 09:38 PM   #7
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,147

Rep: Reputation: Disabled
You have to route your mail thru your ISP SMTP server unless you have valid MX/RMX records for your box.
 
Old 05-26-2005, 09:59 PM   #8
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
You may need to re-configure sendmail.

How I did it (from Suresh Ramasubramanian's email guide):
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?
 
  


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
Sendmail won't work at all? thrash.tux Linux - Software 1 04-27-2004 05:55 AM
sendmail does not work through webmail cdrom Linux - Newbie 5 03-01-2004 08:57 AM
why sendmail dont want to work..help Drogo Linux - Software 1 01-29-2004 09:18 PM
Sendmail Does Not Work! edhan Linux - General 3 10-15-2003 11:08 PM
I really need help getting sendmail to work right. Please help! WorldBuilder Linux - Networking 28 05-15-2003 09:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:14 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration