LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-18-2012, 06:41 AM   #1
trungmv
Member
 
Registered: Apr 2012
Posts: 36

Rep: Reputation: 0
Sendmail or SMTP


Hi everyone,

I have an application that can use send email via Php function or Sendmail or SMTP:
http://nl1.upanh.com/b5.s13.d5/ab50f...09341.mail.jpg
I also have an email account that authenticated.
Now, i want to use that account to send out email from my linux box.
Which one may i choose Sendmail or SMTP to install to send email?
My server is CentOS 5.7
But i did not own the server mail.
Any help me to how to configure??
Any feedback is appreciate.

Regards,
 
Old 04-18-2012, 06:33 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,356

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
On v5 RHEL/Centos, sendmail is the default smtp server.
You can use the ps cmd to see if its running
Code:
ps -ef|grep sendmail
 
Old 04-18-2012, 08:30 PM   #3
trungmv
Member
 
Registered: Apr 2012
Posts: 36

Original Poster
Rep: Reputation: 0
Hi Chris,

I know sendmail is default on my box.
But i do not know how to configure the sendmail that using the account which i already have to send mail from my application.

Regards,
 
Old 04-19-2012, 03:58 AM   #4
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Just type on google, how to configure sendmail in CentOS 5.7, you'll get many links, take help from there to configure sendmail.
 
Old 04-19-2012, 04:36 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
When you say you have an account, what do you mean? What account? Where is the account? On some third party service? Local system account?
 
Old 04-19-2012, 07:52 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,356

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
In your original post asked about sendmail OR SMTP; SMTP is just the protocol, sendmail is an email server daemon/service.

Anyway, we need more detail as requested above.
We need to know if you ARE using sendmail or something else eg postfix, qmail etc

If you are using sendmail, this will give useful cfg info
Code:
sendmail -d0  < /dev/null
(that's a zero btw)

Here's a simple test email
Code:
(uname -n)|mailx -s "Test email" you@your_email.com
substitute your details there

Last edited by chrism01; 04-19-2012 at 07:54 PM.
 
Old 04-20-2012, 03:44 AM   #7
trungmv
Member
 
Registered: Apr 2012
Posts: 36

Original Poster
Rep: Reputation: 0
Hi all,

My email account is an email account on exchange server(i did not own this server).
As i said i have a application:http://nl1.upanh.com/b5.s13.d5/ab50f...09341.mail.jpg
If i choose send email by PhP Mail() Function is ok
but send by sendmai or SMTP not ok.
Code:
[root@machine ~]# sendmail -d0.1 -bv
Version 8.13.8
 Compiled with: DNSMAP HESIOD HES_GETMAILHOST LDAPMAP LOG MAP_REGEX
                MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETINET6
                NETUNIX NEWDB NIS PIPELINING SASLv2 SCANF SOCKETMAP STARTTLS
                TCPWRAPPERS USERDB USE_LDAP_INIT

============ SYSTEM IDENTITY (after readcf) ============
      (short domain name) $w = machine
  (canonical domain name) $j = machine.domain
         (subdomain name) $m = Domain
              (node name) $k = machine.domain
========================================================
when i try:
Code:
(uname -n)|mailx -s "Test email" you@your_email.com
already received Test email.

Regards,

Last edited by trungmv; 04-20-2012 at 03:46 AM.
 
Old 04-20-2012, 05:48 AM   #8
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
If you use SMTP, you will need to provide the information needed. Does your exchange support SMTP authentication? Is it configured for SMTP authentication? If yes, then have you configured your application with proper needed SMTP settings? It will most probably need the hostname or IP address of SMTP server, user name and password for authentication. If authentication mechanism uses SSL or TLS, your application should also support this.
As for with sendmail, you will need path to sendmail server and user name and password if it is configured for authentication.
 
Old 04-21-2012, 03:50 AM   #9
trungmv
Member
 
Registered: Apr 2012
Posts: 36

Original Poster
Rep: Reputation: 0
Hi,

So, exactly now i am using Cacti to monitor our system.

When i choose Sendmail type, and has issue:
http://nl0.upanh.com/b1.s13.d5/f906c...0.sendmail.jpg
http://nl2.upanh.com/b2.s26.d1/61511....sendmail1.jpg

When i choose SMTP type:
http://nl0.upanh.com/b6.s26.d1/24a2b...8210.smtp1.jpg
http://nl1.upanh.com/b6.s13.d5/2fe08...28211.smtp.jpg

Who using Cacti can help me this?
Any feedback is appreciate

Best regards,
 
Old 04-22-2012, 04:10 AM   #10
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
When you are using SMTP, it clearly says that your SMTP server does not support authentication. Hence, you do not need to supply user name and password in the credentials section. Just fill in the host name or the IP address of the SMTP server.
In the first case, sendmail, it says it needs recipient address. This could mean that your sendmail is either not configured properly and hence not accepting the address supplied by you or you actually forgot to tell sendmail whom do you want to send mail to.
Check your both settings and try to send the mail. And if you want to use sendmail method, you could use mail command to check if sendmail is working properly.
 
Old 04-22-2012, 09:38 PM   #11
trungmv
Member
 
Registered: Apr 2012
Posts: 36

Original Poster
Rep: Reputation: 0
Hi chaitanya,

Within this case, how to configure sendmail to sen email with my account?
Could you help me how to do?
I am new in sendmail.
Any reply is appreciated

Best regards,
 
Old 04-22-2012, 10:40 PM   #12
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
The best bet would be to use SMTP option and remove the credentials. If you want to use sendmail, I am not sure how would you do that. I guess you would have to configure sendmail to relay your mails through exchange. But that would be an extra step when you can directly use your exchange server as SMTP without any credentials.
 
Old 04-23-2012, 03:05 AM   #13
trungmv
Member
 
Registered: Apr 2012
Posts: 36

Original Poster
Rep: Reputation: 0
Hi chaitanya,

Thank you your reply as SAP
I tried SMTP type, so have message:
http://nl4.upanh.com/b6.s13.d5/bfc8d...3874.snmp1.jpg
http://nl5.upanh.com/b4.s26.d2/187e3...3875.snmp2.jpg
Meaning the account is wrong?
what is mean authenticate fail???
and also, i can not received email from threshold if breach.
Any help is appreciated,

Best regards,

Last edited by trungmv; 04-23-2012 at 03:21 AM.
 
Old 04-23-2012, 03:56 AM   #14
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
As far as I can see, it says that it was able to send the message successfully. It does not mean authentication failure or anything.
 
Old 04-23-2012, 04:08 AM   #15
trungmv
Member
 
Registered: Apr 2012
Posts: 36

Original Poster
Rep: Reputation: 0
Hmm...
Hard to configuration.
If i using the PhP Mail() Function, can already received email with difference domain such as gmail, yahoo mail
But with our domain (abc.com) i can not received email.
Code:
q3N8jEPs024087: to=<def@abc.com>, ctladdr=<user@machine.domain> (502/502), delay=00:00:11, xdelay=00:00:02, mailer=esmtp, pri=214885, relay=mail.domain. [IP address's Email server], dsn=2.0.0, stat=Sent (Message accepted for delivery)
With above message, could you help me??

Regards,
 
  


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
how to use sendmail as smtp server instead of my isp smtp server h.haider Red Hat 8 04-07-2011 03:34 AM
smtp auth with sendmail through smtp.sbcglobal.yahoo.com woodson2 Fedora 0 10-23-2008 02:55 PM
sendmail and SMTP orpheon Linux - Networking 9 07-03-2007 07:19 PM
can I use sendmail for SMTP instead of my ISP's SMTP server? fcdev Linux - Networking 1 02-05-2007 01:27 AM
SMTP by SendMail thomas_hk03 Linux - Software 5 08-06-2003 10:53 PM


All times are GMT -5. The time now is 02:14 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration