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 : Code:
sendmail -v monitoring@mydomain.by i am getting: Code:
16:54:47 srvmon-Bellakt sm-mta[17248]: pA3Dsifc017248: to=<monitoring@mydomain.by>, ctladdr=<root@srvmon-Bellakt.otherdomain.com> (0/0), delay=00:00:03, xdelay=00:00:03, mailer=esmtp, pri=30322, relay=mx2.activeby.net. [109.237.213.144], dsn=2.0.0, stat=Sent (OK id=1RLxkj-0002dF-6r) and when it fails to be sent i get: Code:
Nov 3 17:17:20 srvmon-Bellakt sm-mta[32754]: pA3EHG4E032754: to=<monitoring@mydomain.by>, ctladdr=<root@srvmon-Bellakt.otherdomain.com> (0/0), delay=00:00:04, xdelay=00:00:04, mailer=esmtp, pri=30364, relay=mx2.activeby.net. [109.237.213.144], dsn=5.0.0, stat=Service unavailable perhaps there is a better mail agent to send emails... |
from the logs what I can guess is port issue
which port no. are you using to for ESMTP and RELAY in sendmail.mc? Code:
#vi sendmail.mc |
here is my sendmail.mc configuration:
Code:
divert(-1) Code:
Active Internet connections (only servers) |
I don't see any smtp server in sendmail.mc
Is that your complete file? |
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.
|
but when mail sending is failed it is getting RELAYED by 109.237.213.144
what is this ip? |
this ip is of mx2.activeby.net which can be seen in a
Code:
nslookup 109.237.213.144 |
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:
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) Code:
#vi /etc/mail/access Code:
#makemap -r hash access.db < access |
i did the relay and now but still not all mail is reaching profiland.by.
i test 4 test emails and only 2 arrived Code:
Nov 4 14:03:44 srvmon-Bellakt sm-mta[19040]: pA4B3eA1019040: to=<monitoring@mydomain.by>, ctladdr=<root@srvmon-Bellakt.Bellakt.com> (0/0), delay=00:00:04, xdelay=00:00:04, mailer=esmtp, pri=30331, relay=mx2.activeby.net. [109.237.213.144], dsn=5.0.0, stat=Service unavailable 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 while from a computer not in the domain it is : 178.124.149.43 mydomain=profiland otherdomian=bellakt |
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 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? |
In the mean while I was checking your sendmail.mc as your last post did confused me
because as I said you to make changes in access file but your sendmail.mc is not configured to listen access.db Code:
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl Now returning to your issue Code:
mx2.activeby.net. [109.237.213.144]------->>is your mail server? Code:
which machine are you using to send mails? Code:
mydomain=profiland kindly provide me wit all details at once so that I can understand the whole thing...as everytime I have to scroll the page to view the info |
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:
Quote:
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: Code:
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl |
So from all this what I got to know is when you are sending mail to your
Code:
bellakt.com but while sending to another domain Code:
profiland As far as your sendmail.mc is concerned I don't see any configuration stuff so even I am surprised to see your sendmail is working fine. What I can say is to properly configure the sendmail using a proper smtp and relay server Code:
You can always use spamassassin feature in sendmail to stop spams |
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 :D |
All times are GMT -5. The time now is 07:09 AM. |