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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
04-18-2012, 06:41 AM
|
#1
|
Member
Registered: Apr 2012
Posts: 36
Rep:
|
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,
|
|
|
04-18-2012, 06:33 PM
|
#2
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,441
|
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
|
|
|
04-18-2012, 08:30 PM
|
#3
|
Member
Registered: Apr 2012
Posts: 36
Original Poster
Rep:
|
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,
|
|
|
04-19-2012, 03:58 AM
|
#4
|
Senior Member
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420
|
Just type on google, how to configure sendmail in CentOS 5.7, you'll get many links, take help from there to configure sendmail.
|
|
|
04-19-2012, 04:36 AM
|
#5
|
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638
Rep: 
|
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?
|
|
|
04-19-2012, 07:52 PM
|
#6
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,441
|
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.
|
|
|
04-20-2012, 03:44 AM
|
#7
|
Member
Registered: Apr 2012
Posts: 36
Original Poster
Rep:
|
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.
|
|
|
04-20-2012, 05:48 AM
|
#8
|
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638
Rep: 
|
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.
|
|
|
04-21-2012, 03:50 AM
|
#9
|
Member
Registered: Apr 2012
Posts: 36
Original Poster
Rep:
|
|
|
|
04-22-2012, 04:10 AM
|
#10
|
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638
Rep: 
|
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.
|
|
|
04-22-2012, 09:38 PM
|
#11
|
Member
Registered: Apr 2012
Posts: 36
Original Poster
Rep:
|
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,
|
|
|
04-22-2012, 10:40 PM
|
#12
|
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638
Rep: 
|
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.
|
|
|
04-23-2012, 03:56 AM
|
#14
|
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,638
Rep: 
|
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.
|
|
|
04-23-2012, 04:08 AM
|
#15
|
Member
Registered: Apr 2012
Posts: 36
Original Poster
Rep:
|
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,
|
|
|
All times are GMT -5. The time now is 06:29 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|