LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Sending mail from Linux (https://www.linuxquestions.org/questions/linux-newbie-8/sending-mail-from-linux-861313/)

sridaran 02-07-2011 11:25 PM

Sending mail from Linux
 
I have sendmail installed on my Redhat linux(version 5). But I am unable to sendmail. I tried various commands like:

service sendmail status
output:
sendmail (pid 2296 2288) is running...

telnet localhost 25
output:
Connected to localhost.localdomain (127.0.0.1).
220 localhost.localdomain ESMTP Sendmail 8.13.8/8.13.8;


What changes do I need to make inorder to send mail from my Linux? Please tell me the procedure step by step. I am new to Linux.

EricTRA 02-08-2011 01:24 AM

Hello,

How did you set up and/or want to use sendmail? You'll need to configure where sendmail has to send its mails to. Have a look at this site.

Kind regards,

Eric

sridaran 02-08-2011 05:59 AM

I didn't set sendmail. It was there by default on my Redhat Linux. I used the command "service sendmail start" and it started successfully. Actually I installed one mailer in Linux which will send multiple mails at a time. The mailer installed successfully. It is also dispatching mails without any error. But mails are not going from my local system. Can you please tell me how to configure sendmail inorder to send mail successfully from the mailer?

Snark1994 02-08-2011 06:45 AM

Are you sure you want to use sendmail?

Quote:

Sendmail is not intended as a user interface routine; other programs provide user-friendly front ends; sendmail is used only to deliver pre-formatted messages.
from the man-page

So if you were intending to use sendmail to send/receive emails, you're probably better off finding another programme that interfaces sendmail. However, if you do actually mean to use sendmail then I apologise in advance :)

tommylovell 02-08-2011 08:38 AM

I agree with Snark1994 about the use of sendmail. And if you do use it, it's not easy to configure. 'postfix' is a lot easier for someone (like me) that is "email incompetent".

But I'm unclear about what you are actually trying to do and how. Are you using the 'mail' (or 'mailx') command to send mail to other systems in your "domain"? Do you need to send email across the Internet? It doesn't sound like you're trying to use a GUI mail client.

If you are trying to send mail across the Internet, then you are probably going to have to use your Internet provider's SMTP server as a 'smart relay' (or one of your company's SMTP servers as a 'smart relay'). (see the DS parameter in /etc/mail/sendmail.cf), and you will probably have to rewrite headers in your outgoing messages so that the relay system doesn't complain... No easy task. Again, I think 'postfix' is a little more straight forward.

The reason for a 'smart relay' is that many providers block outgoing port 25 traffic to assure that any open relays on their customer's systems are not used to propagate spam. But I don't know your exact situation.

sridaran 02-09-2011 11:29 PM

Actually I installed a software(IMT-Mailer) on my linux system. This is used to send multiple emails at a time across the internet. The emails list will be in a file with .csv extension. Then we need to start the mailer, upload this csv file(email list), set the template, set the time for sending mails. At that particular time these emails will be sent.We need to send around 1000 mails at a time.

This mailer runs on java platform with PHP as front-end, Sqlite as database in the Linux OS. The mailer installed and started successfully. It is also dispatching mails without error. But those mails are not going from the system. I thought this is sendmail problem in Linux.

As I am new to Linux, I don't know how to configure the sendmail. Also I didn't set domain name. Whether it is Sendmail or Postfix or SMTP smart relay, I need help to configure any one of this for sending mails. I need step by step procedure. I am using Redhat Linux 5.

tommylovell 02-10-2011 02:01 PM

At the risk of promoting more spam, I'd suggest:

1. Use the mail command to confirm that sendmail is or is not properly set up.
Code:

echo "this is just a test" | mail -s "test message" youremail@yourisp.com
This sends an email to your own external email address. Give it a few minutes, then type in 'mail' on your Linux server to see if there is a bounce message. There probably will be. Type 'x' to get out of the mail client (and retain read messages) or 'q' to quit (and delete read messages).

2. Google for "configure sendmail".

Why reinvent the wheel here? The first one I looked at, http://www.wikihow.com/Configure-Sendmail, looks promising, but I've I've spent hours arguing with/configuring 'sendmail'. Eric Allman's book was authorative at one time. I don't know if it's been kept current.

3. Use #1 to test it, once you have it configured.

(Make sure you 'su' to the same id that is sending the mail before you use the 'mail' command to look at responses.)

As I said in an earlier post, sendmail is not easy to configure. The catch that I see here is that you may need to relay mail to a server that can establish post 25 connections to your mail destinations. The bounce messages will be informative.

I really can't contribute much more than what I already have.

TB0ne 02-10-2011 02:21 PM

Quote:

Originally Posted by sridaran (Post 4251767)
I didn't set sendmail. It was there by default on my Redhat Linux. I used the command "service sendmail start" and it started successfully. Actually I installed one mailer in Linux which will send multiple mails at a time. The mailer installed successfully. It is also dispatching mails without any error. But mails are not going from my local system. Can you please tell me how to configure sendmail inorder to send mail successfully from the mailer?

Really??? Then why did you post these other threads, where you explicitly ask how to install sendmail?
http://www.linuxquestions.org/questi...lation-858955/
http://www.linuxquestions.org/questi...-error-858992/

So you obviously DIDN'T have it installed by default. Also, in your other thread, you specifically mention wanting to send advertising emails, and huge volumes of those:
http://www.linuxquestions.org/questi...roblem-854814/

I, for one, will not help ANYONE send more spam emails. And again, as has been pointed out to you several times in your other threads, if you're using RHEL, then CALL REDHAT SUPPORT, since you're paying for it. Or do you think we should provide you with support for a product you're using for free, so you can then thank us by sending spam emails??


All times are GMT -5. The time now is 10:24 PM.