SendMail Not Sending, Messages Stuck In Queue As: Deferred: Connection
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
As far as I know the smart host is in case you have a gateway, a computer fully connected and you need to redirect all the email to get out that way. That is the only case where you would use smart host. If this is the case and you need smart host, use the external interface instead of the loopback.
BELVEDERE | root -=-> cat /etc/mail/access
# Check the /usr/share/doc/sendmail/README.cf file for a description
# of the format of this file. (search for access_db in that file)
# The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc
# by default we allow relaying from localhost...
or you could simply list your public IP address in the /etc/mail/access file as the following:
WARNING, once you do this, you will become a target for spammers, so you need to lock down your SMTP server. There are several ways to do that. Perhaps the best way to lock down you SMTP server is to always require authentication before a message is accepted for delivery. What this means is that each time a message is send to the SMTP server for external delivery, the SMTP server then required a valid user name and password before the message is accepted for delivery. However, the SMTP server is also aways listening on the SMTP port for incomming messages, these messages are intended to be delivered to your local users and no authentication is required, as these are messages are from users on other systems.
let me say that again:
Outgoing SMTP messages should require authentication before the message is accepted for delivery. Incomming SMTP messages should not require authentication before being accepted, but sendmail will check to see if the email account is valid on the local system.
Ok the problem is that, the static (public) IP changes, we are using a DSL connection in the office, and this server resides in the office. All the content served by Apache and the FTP server is only local, which is fine, but I need to be able to send email externally, for obvious reasons. So, locally in the office we simply type: http://192.168.0.200/myfolder/ for Apache/Web Server content, and the same idea for FTP, which works.
So, as a result I have no DNS (domain) configured, BIND is running, but not setup at all.
So, when you say:
you can add a range of IP addresses with a single command in the /etc/mail/access file
would allow 198.168.0.x to relay, where x is any decimal integer from 0 to 255 inclusive.
This will allow you to send email to your local network, but the question is how to configure sendmail to relay email on DHCP. If you know the possible range of IPs that you could be assigned, then you could add that to the /etc/mail/access file
would allow 28.x.x.x to relay
Do you have router as a gateway to your dsl connection, and is it configured to DHCP? I would definitely include the 126.96.36.199 in the access relay list, although it may work without it, something to try ...
I would goto a site like http://whatismyipaddress.com/ and determine what you IP is now. Then do a whois lookup to find out the range of ips that your carrier owns, or you might call then and ask for the range that you could be assigned. On a linux box, goto the command line and type whois followed by the ip address and then hit enter, it gives way better results than from most web pages that I've seen.
Once you have your access file setup with the local and external ranges, create a text file in your /root directory called sendstuff and while logged in as root type the following to test your sendmail, first start your sendmail service
then type this to send an email from the command line
the -v is for verbose mode, and will show you the transcript of the message as it is sent, and any error messages that you might be getting.
then don't forget to stop your sendmail service, you need to seriously figure out how to require authentication first before you let it run for hours unattended, otherwise spammers will eventually take advantage of your smtp server ... Your IP will likely stay the same, when it's lease is up the typically reassign the same IP. Your IP will most likely change to a new IP if you reset your DSL connection by cycling the power on your DSL modem.
Thanks for the help, but still getting the email bounced back to the server. Do you have to have DNS setup on a server to be able to send email? Cant you just send email from an IP address? Also, its interesting that is says the name server is 127.0.0.1, is this normal? Shouldnt it have my ISP's DNS server there, so it can route? Thanks for the help, once again.
The original message was received at Mon, 19 Mar 2007 10:19:27 -0700
from localhost [127.0.0.1]
----- The following addresses had permanent fatal errors -----
(reason: 550 Host unknown)
----- Transcript of session follows -----
550 5.1.2 <firstname.lastname@example.org>... Host unknown (Name server: 127.0.0.1: host not found)