Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
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.
I don't know much about sendmail itself, but it says you're getting a host name lookup failure which will be DNS. Your machine may not be looking the name up successfully. Can you resolve gmail.com from the CLI?
I have no dns setup. I just connect to the internet through a router. Is that ok?
Check this ping:
[root@localhost etc]# ping gmail.com
PING gmail.com (64.233.161.83) 56(84) bytes of data.
64 bytes from gmail.com (64.233.161.83): icmp_seq=1 ttl=242 time=62.2 ms
64 bytes from gmail.com (64.233.161.83): icmp_seq=2 ttl=242 time=26.5 ms
64 bytes from gmail.com (64.233.161.83): icmp_seq=3 ttl=242 time=48.6 ms
64 bytes from gmail.com (64.233.161.83): icmp_seq=4 ttl=242 time=27.0 ms
64 bytes from gmail.com (64.233.161.83): icmp_seq=5 ttl=242 time=39.2 ms
64 bytes from gmail.com (64.233.161.83): icmp_seq=6 ttl=242 time=31.5 ms
64 bytes from gmail.com (64.233.161.83): icmp_seq=7 ttl=242 time=29.4 ms
64 bytes from gmail.com (64.233.161.83): icmp_seq=8 ttl=242 time=29.0 ms
64 bytes from gmail.com (64.233.161.83): icmp_seq=9 ttl=242 time=38.1 ms
64 bytes from gmail.com (64.233.161.83): icmp_seq=10 ttl=242 time=29.0 ms
64 bytes from gmail.com (64.233.161.83): icmp_seq=11 ttl=242 time=41.1 ms
64 bytes from gmail.com (64.233.161.83): icmp_seq=12 ttl=242 time=37.1 ms
64 bytes from gmail.com (64.233.161.83): icmp_seq=13 ttl=242 time=35.6 ms
64 bytes from gmail.com (64.233.161.83): icmp_seq=14 ttl=242 time=37.6 ms
64 bytes from gmail.com (64.233.161.83): icmp_seq=15 ttl=242 time=62.5 ms
64 bytes from gmail.com (64.233.161.83): icmp_seq=16 ttl=242 time=69.4 ms
64 bytes from gmail.com (64.233.161.83): icmp_seq=17 ttl=242 time=52.1 ms
64 bytes from gmail.com (64.233.161.83): icmp_seq=18 ttl=242 time=31.0 ms
It may be your network connection - i.e. dynamic DNS? If you use Dynamic DNS for your domain, then many email systems will reject email from you based on your server's public (and dynamic) IP address.
Are you using a SMART HOST? Using your ISP to send email is the way to avoid the problem I've just outlined. Your ISP will have a static IP address that other servers will "respect" and accept email from.
BTW: I prefer Postfix and would recommend you use it instead of Sendmail.
PS: It could also be that your server's hostname is incorrectly set for interacting publicly. The log message says your email is from root@localhost.localdomain which is OK in private, but no good when dealing with other servers like gmail.
Last edited by blacky_5251; 04-27-2008 at 07:02 AM.
Sendmail and Postfix don't require a fixed IP to "work", but some major email systems will reject email from IP addresses that are assigned dynamically. They do this because they "assume" that the email is being sent from a spambot, not from a correctly configured email server. This is an anti-spam measure and discriminates against those of us using dynamic DNS for our servers.
The solution though is SMART HOST. This is where you relay all out-bound email through your ISP's email server rather than sending the message directly. For example, if I sent an email to you, my server would send the message to my ISP first, who then sends it to your server.
Having said that, I still think the problem lies with your domain name settings in Sendmail. Sendmail is sending messages from "root@localhost.localdomain" and that won't work. It must be "root@your.domain.com" or whatever your domain name is.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.