LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-18-2012, 12:56 PM   #1
vitotol
LQ Newbie
 
Registered: Oct 2011
Location: thessaloniki. gr
Distribution: debian
Posts: 24

Rep: Reputation: Disabled
problem sending email using sendmail


hello, we have set up a centos 6 server.
on my dns entries the server's ip points to test.example.com

when i try to send an email from my server to my email user@example.com which it's on godaddy i get an error on the maillog user unknown but i am able to send emails to my gmail account.

when i do

sendmail -bv user@example.com
root... deliverable: mailer local, user root

sendmail -bv user@gmail.com
I will get deliverable: mailer esmtp, host gmail.com

So what I assume is that the sendmail is trying to deliver the emails to local accounts which they do not exist.

my /etc/hosts:

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.75 test test.example.com

How can I set up sendmail not to try to send on the local users???

If i dig mx example.com

I get the godaddy dns servers.

any ideas guys???

thanks
 
Old 07-18-2012, 01:54 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Add your domain to the relay_domains value in the main.cf file...
 
Old 07-18-2012, 02:15 PM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
@OP
Remove example.com from /etc/mail/local-host-names and restart sendmail

@Kustom42
OP is talking about sendmail, not postfix

Regards
 
Old 07-19-2012, 12:31 AM   #4
vitotol
LQ Newbie
 
Registered: Oct 2011
Location: thessaloniki. gr
Distribution: debian
Posts: 24

Original Poster
Rep: Reputation: Disabled
hello, the only thing i found on my local-host-names is the one below:


# local-host-names - include all aliases for your machine here.


also for another mail account on the example.com
i get the from the sendmail -bv
User Unknown....
 
Old 07-19-2012, 03:33 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Quote:
also for another mail account on the example.com
i get the from the sendmail -bv
User Unknown....
Check what's in /etc/mail/aliases (or /etc/aliases for some distros)

Regards
 
Old 07-19-2012, 05:24 AM   #6
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
What's the vlaue of $HOSTNAME varibale ?. What you are getting hostname command ?

Also you can edit value in /etc/host.conf and make following entries

order bind,hosts

Thanks
 
  


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 facing email sending problem r.bhange Linux - Newbie 8 03-13-2009 06:05 AM
Sendmail - not sending email to outside. Blash Linux - Networking 2 05-03-2007 05:09 AM
sendmail not sending or receiving email kaplan71 Linux - Software 1 12-20-2005 08:26 AM
sending email from a script without sendmail tangle Linux - Networking 1 12-06-2005 01:32 AM
Automatic email sending with sendmail? Stingreen Linux - General 10 04-15-2002 02:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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