LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-20-2004, 12:40 PM   #1
geomonap
LQ Newbie
 
Registered: Dec 2004
Posts: 17

Rep: Reputation: 0
Sending mail without running Sendmail


Hi guys:
I am running RedHat 2.1. I don't want to run sendmail on my system since my system won't be a mail server/relay. However, I would like to send mail from the server. I understand this can be done without running sendmail. Can you guys give any tips on how this can be done.

This is what I tried:
I disabled running sendmail at boot time/.
Stopped sendmail server
Crontab entry for sendmail with -q

After this i try sending mail by
# mail -v abc@xyz.com

I get the following error
abc@xyz.com... Connecting to [127.0.0.1] via relay...
abc@xyz.com... Deferred: Connection refused by [127.0.0.1]


You tips would be greatly appreciated.
Thanks,


G
 
Old 12-20-2004, 12:57 PM   #2
Herr Kloßen
LQ Newbie
 
Registered: Dec 2004
Posts: 2

Rep: Reputation: 0
What happens if you try
"telnet xyz.com 25"
(where 25 is the SMTP port, see /etc/services)
Is the connection accepted? Can you send mail like this?

Maybe they refuse you because they think you're a spammer.

Last edited by Herr Kloßen; 12-20-2004 at 12:59 PM.
 
Old 12-20-2004, 12:58 PM   #3
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 47
You need to set sendmail to only listen only on loopback, which I'm pretty sure is the default behavior. Start the daemon back up and check which interfaces it's running on with netstat.

Also, don't cross post.
 
Old 12-21-2004, 07:18 AM   #4
the-chains
LQ Newbie
 
Registered: Jul 2004
Distribution: Red Hat
Posts: 11

Rep: Reputation: 0
I recall you can forward mail to a default SMTP server (SMART_HOST) without starting the sendmail daemon. Open /etc/mail/submit.cf , enter your smtp server's name next to the DS directive.

ie: DS smtp.example.com

save and then use the mail or sendmail command
(mail uses sendmail anyways)


hope it works out!
 
Old 12-21-2004, 08:11 AM   #5
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 47
Don't edit the .cf files. That's a no no. Do edit the .mc files and use m4 to rebuild the .cf files.

It's generally a good idea to run a MTA listening on localhost, even if the machine will not be handling mail. *NIX machines have traditionally had one, and a lot of software expects to be able to mail that way.
 
Old 12-22-2004, 06:34 AM   #6
the-chains
LQ Newbie
 
Registered: Jul 2004
Distribution: Red Hat
Posts: 11

Rep: Reputation: 0
You are right about the submit.mc ... I am just plain lazy. For any modifications it's better practice to edit via the submit.mc .
 
  


Reply



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 - not sending mail movitto Linux - Software 9 09-19-2014 03:23 AM
sendmail not sending mail dtra Linux - Software 1 06-09-2005 07:47 PM
Sending mail without sendmail geomonap Linux - Security 2 12-21-2004 01:32 AM
Sending mail without running Sendmail geomonap Linux - General 1 12-20-2004 12:43 PM
sendmail not sending mail clinger Linux - Software 8 07-30-2004 02:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:07 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