[SOLVED] sendmail sometimes sending emails and sometimes not
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.
sendmail sometimes sending emails and sometimes not
hello, i'm using sendmail to send notification emails.
i'm sending test emails as root but some messages get delivered and some not even though i'm sending to the same sender.
the command i'm using :
yes that is the complete file, i thought senmdmail is a mail server and doesn't need a relay. i read in the internet that a smart host can be set up to relay to the smtp server but the boss doesn't want the messages relayed to the smtp server in case the server fails.
this ip is of mx2.activeby.net which can be seen in a
Code:
nslookup 109.237.213.144
this is our email host service provider for the domain profiland. i have a susspicion that some messages are filtered as spam and some are passed, is it possible?
what is weird is that if i send mail to the local domain bellakt.com the mail always gets delivered probably because it is forwarded to the internal ip address of the exchange server. but if i send mail to the domain profiland throught the relay mx2 it sometimes gets delivered and sometimes not. the boss just informed me that he is going to ask that bellakt.com (which is domain of the linux machine) to be added to the white list. hopefully this will help.
by asking what is this ip I meant is this your server which you are using to sendmails?
I don't think it has got anything related with spam
Quote:
Originally Posted by Majed17
what is weird is that if i send mail to the local domain bellakt.com the mail always gets delivered probably because it is forwarded to the internal ip address of the exchange server. but if i send mail to the domain profiland throught the relay mx2 it sometimes gets delivered and sometimes not. the boss just informed me that he is going to ask that bellakt.com (which is domain of the linux machine) to be added to the white list. hopefully this will help.
and yup that might be the issue because the sendmail is using mx2.activeby.net as a relay server for sending mails for which the mail is not getting delivered
and when your server is taking localhost as relay everything goes fine
you can try this but this will again act as a relay server(which you don't want I guess)
but now messages to bellakt.com are not arriving at all with the following error.
Code:
Nov 4 13:54:04 srvmon-Bellakt sm-mta[12706]: pA4As1uS012704: to=<admin50@localdomain.com>, ctladdr=<nagios@srvmon-Bellakt.Bellakt.com> (102/1002), delay=00:00:03, xdelay=00:00:03, mailer=esmtp, pri=120575, relay=mail.bellakt.com. [172.16.1.100], dsn=4.0.0, stat=Deferred: mail.bellakt.com.: No route to host
i suspect this is because nslookup at the linux machine for mail.bellakt.com is 172.16.1.100
while from a computer not in the domain it is : 178.124.149.43
it seems it was a problem with the exchange server and it was down. now the message i'm getting:
Code:
Nov 4 14:53:20 srvmon-Bellakt sm-mta[21536]: pA4BrKEo021534: to=<admin50@localdomain.com>, ctladdr=<nagios@srvmon-Bellakt.Bellakt.com> (102/1002), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120595, relay=mail.bellakt.com. [172.16.1.100], dsn=2.0.0, stat=Sent (<201111041153.pA4BrKsE021533@srvmon-Bellakt.Bellakt.com> Queued mail for delivery)
but i'm still unable to login to check mail.
but anyway the problem is not solved. some emails are still not getting delivered and bellakt.com (the local domain) was added to the white list. any more ideas for this weird problem?
frankly i don't understand how sendmail is working, it seems it is an smtp server by itself?
sendmail is running on srvmon-Bellakt.Bellakt.com gentoo machine. profiland is the domain i'm trying to send the messages to and the are also emails on bellakt.com which i send emails too. (mainly through the nagios program, but my test emails are from root)
Quote:
mx2.activeby.net. [109.237.213.144]------->>is your mail server?
it is not my mail server. it is the server that profiland is on and so when root sends emails to profiland it passes through this mx2.
Quote:
which machine are you using to send mails?
from srvmon-Bellakt.Bellakt.com
i disscused the situation with my boss and he says if we relay to mx2 then messages other than to profiland will not be delivered because there is authentication on the server otherwise it would be used by spammers to relay spam. so i'm gonna wait for your answer before adding the new feature:
yes you are correct. you understood it to the letter it seems
i just checked the exchange server on bellakt and all the mail on bellakt arrived after the exchange server is up and running again.
but the problem is when sending to profiland or hotmail for that matter
some emails arrive and some get status unavailable.. i'm reading on the internet and some say this is a dns problem others say the server sending the emails has to be from a real domain which is true (bellakt.com is a real domain) yet others say that the mail server (mx2) is rejecting the emails.
when i configured send mail i was expecting to supply some smtp address and pop3 but it started working simply after installing it so i thought it is an smtp server by itslef.
today the work day is over so i'm going to try adding the feature you meantioned later but i think it will cause problems for sending emails to the bellakt local domain.
monday will be holiday here (they still celebrate the october revolution of 1917 over here) so i'll be back on tuesday and hopefully you'll still be fine by then
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.