As the title suggests, my Debian server doesn't send emails whatsoever. I've tried searching the internet and these forums but I'm completely stuck. I've managed to host multiple websites on this server using ISPConfig, and share folders across my network using Samba, but I simply can't get sendmail working. I don't even know where to begin. I feel like a complete n00b! Someone please help!!!
My message board, mailing list and contact form on my personal blog all say they've sent the email whenever I try to use them. However I never receive them. I don't see any error messages as such. Is there anywhere else where I might see any errors?
Where're the logs? See what I mean when I say I feel/am a n00b at this? I don't know what to do, where to look, or anything regarding sendmail. I probably wouldn't even be able to interpret the logs if I did find them.
Okay are even running sendmail anyway as exim is the default mta on debian and has been for quite sometime. The mail logs will be found in /var/log/ Code: ls -l /var/log/mail.*
The reason I assume that I'm using sendmail is because when I check for currently running services under "System -> Services" in my main KDE menu, it lists sendmail as my mail agent. Strangely though, "postfix" is listed there as my mail agent too. I've carried out that command in the Terminal and got a list of error logs, some of them are dated today so I can only assume they were last written to today. The logs I checked are mail.log, mail.warn, mail.info and mail.err, all located in /var/log/*. It seems that every twenty minutes, the following is printed into the logs: Code: Apr 17 18:40:01 Luggage sm-msp-queue[25282]: My unqualified host name (localhost) unknown; sleeping for retry Apr 17 18:41:01 Luggage sm-msp-queue[25282]: unable to qualify my own domain name (localhost) -- using short name The name of my server is "Luggage" and, from what I understand, it's queued any emails I've tried to send and attempting to send them every twenty minutes using the domain name "localhost" and failing each time. I can only summise from this that "localhost" is the wrong name to use. What would you advise I change this to, and how do I change it?
Thanks. I found a variation of what you suggested in my hosts file so I just replaced it with yours. I restarted sendmail and then tried to get my message board to send me an activation email for a new account. Again, it says it was successful but I didn't receive the email. I checked the logs again and this is what it threw at me: Code: Apr 17 22:43:19 Luggage sendmail[28982]: m3HLhJWG028982: from=www-data, size=2115, class=0, nrcpts=1, msgid=<200804172143.m3HLhJWG028982@Luggage>, relay=www-data@localhost Apr 17 22:43:19 Luggage sm-mta[29003]: m3HLhJ12029003: from=<www-data@Luggage>, size=2245, class=0, nrcpts=1, msgid=<200804172143.m3HLhJWG028982@Luggage>, proto=ESMTP, daemon=MSP-v4, relay=www-data@localhost [127.0.0.1] Apr 17 22:43:19 Luggage sendmail[28982]: m3HLhJWG028982: to=*****@gmail.com, ctladdr=www-data (33/33), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32115, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (m3HLhJ12029003 Message accepted for delivery) Apr 17 22:43:24 Luggage sm-mta[29006]: m3HLhJ12029003: to=<*****@gmail.com>, ctladdr=<www-data@Luggage> (33/33), delay=00:00:05, xdelay=00:00:05, mailer=esmtp, pri=122245, relay=gmail-smtp-in.l.google.com. [216.239.59.27], dsn=5.0.0, stat=Service unavailable Apr 17 22:43:24 Luggage sm-mta[29006]: m3HLhJ12029003: m3HLhO12029006: DSN: Service unavailable Apr 17 22:43:24 Luggage sm-mta[29006]: m3HLhO12029006: to=<www-data@Luggage>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent I don't understand the information here. It says the service is unavailable, yet at the end it says "stat=Sent" (??). This is repeated a couple of times before this for a couple of other addresses that I had tried before changing the hosts file. BTW I blanked out the beginning of my email address with asterisks. It doesn't actually look like that on the log. It really shows my email address in full. Does this shed any light on the problem?
Hmm yeah it seems it is. I checked with the link you provided and it's blacklisted 21 times somehow, on a list of 124 blacklists. I followed a link there which was offering suggestions but it states "Please note that at this time we are only able to respond to requests from the United States or Canada". Unfortunately I live in the UK. I thought maybe if I follow the "Show Details" links on some of the entries it may offer some more information and provide me with an option to un-list my IP address, but most of them lead to chinese/japanese websites and I can't understand them. I've also checked on spamhaus but thankfully they don't have my server blacklisted. Can any further advice be given here? Should I fill the form in anyway? Also, should I be concerned with the "service unavailable" messages I'm getting in my log as shown above?
This happens because your server is blacklisted. Therefore Google's mail server pretends to be unavailable. Do you have a static or a dynamic IP address?
Technically speaking it's a dynamic IP address, however I have cable internet with virgin media (aka ntl) and a wireless router, and the IP address can stay the same for months on end. Plus I like the IP addy I have now... very easy to remember Are you going to suggest that I restart my modem and router a few times until I get a fresh IP address from my ISP? That would eliminate the blacklisting problem I guess.
That will not eliminate the blacklisting problem if your block has been declared as dynamic by your ISP you are not allowed to send mail directly from there you have to use your ISP as a smart host.
Edit your sendmail.mc file and set this Code: define(`SMART_HOST', `smtp.your.provider') Then Code: cd /etc/mail make make restart