Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Aug 12, 2014 4:24 am 
Offline
Senior Newbie

Joined: Mon Aug 04, 2014 3:41 am
Posts: 8
I have configured the server for my website. Now the problem is that mails are not sending from my server. I am using cakephp in my website. I tried setting up mail server also using following links:

https://www.georgebuckingham.com/blog/p ... ail-ubuntu
https://www.linode.com/docs/email/exim/ ... -6-squeeze

but still i am unable to send mails from my server. Please help me setting up mail server.

When I try to send mail from command prompt then following error occurs.


root@monjardeal:~# echo "This is a test." | mail -s Testing gaganpreet@equasar.com
-bash: mail: command not found


Top
   
PostPosted: Thu Aug 14, 2014 5:21 pm 
Offline
Newbie

Joined: Sun Dec 08, 2013 6:44 pm
Posts: 3
Website: http://www.cloudsysadmins.com
Location: San Antonio, TX
Hey,

Try installing the mail application.

apt-get install mailutils


Top
   
PostPosted: Wed Aug 20, 2014 1:24 am 
Offline
Senior Newbie

Joined: Mon Aug 04, 2014 3:41 am
Posts: 8
Hey p.woodman,

I have tried installing the mail application using the command given above. Now when i execute the following command

root@monjardeal:~# echo "This is a test." | mail -s Testing gaganpreet@equasar.com

then error is removed which was coming previously but still mail is not being sending from command prompt as well as from my project. Please help.


Top
   
PostPosted: Wed Aug 20, 2014 6:04 am 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
What does your mail server's log file say?

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
PostPosted: Thu Aug 21, 2014 8:40 am 
Offline
Senior Newbie

Joined: Mon Aug 04, 2014 3:41 am
Posts: 8
Following is the content of mail log file of my server.

Aug 21 12:34:58 monjardeal postfix/qmgr[29724]: 33D62101B9: from=<www-data@monjardeal.com>, size=355, nrcpt=1 (queue active)
Aug 21 12:34:58 monjardeal postfix/qmgr[29724]: 4ACFD101B8: from=<root@monjardeal.com>, size=351, nrcpt=1 (queue active)
Aug 21 12:34:58 monjardeal postfix/smtp[847]: warning: relayhost configuration problem
Aug 21 12:34:58 monjardeal postfix/smtp[848]: warning: relayhost configuration problem
Aug 21 12:34:58 monjardeal postfix/smtp[847]: 33D62101B9: to=<gaganpreet@equasar.com>, relay=none, delay=306, delays=306/0.02/0.02/0, dsn=4.3.5, status=deferred (Host or domain name not found. Nam$
Aug 21 12:34:58 monjardeal postfix/smtp[848]: 4ACFD101B8: to=<gaganpreet@equasar.com>, relay=none, delay=21465, delays=21465/0.01/0.02/0, dsn=4.3.5, status=deferred (Host or domain name not found.$


Top
   
PostPosted: Thu Aug 21, 2014 6:36 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
The lines are being lopped off, which is making it difficult to read the entire error message. But, "relayhost configuration problem" is telling. What is your relayhost set to in main.cf?

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
PostPosted: Fri Aug 22, 2014 12:30 am 
Offline
Senior Newbie

Joined: Mon Aug 04, 2014 3:41 am
Posts: 8
Relayhost is set to "smtp.localdomain" in main.cf file.

relayhost = smtp.localdomain


Top
   
PostPosted: Fri Aug 22, 2014 1:16 am 
Offline
Senior Newbie

Joined: Mon Aug 04, 2014 3:41 am
Posts: 8
I have changed the values of "mydestination " and also commented out the "relayhost" in main.cf. After making these changes my mail function is working.

Thanks for your help hoopycat :)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group