LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-04-2011, 08:19 AM   #16
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221

Quote:
Originally Posted by Majed17 View Post
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
yup you can configure a sendmail smtp server with spamassassin which could be the best I suppose

DNS may or may not be the reason but in that case the error which comes is different i.e. some where related to mail goes in a queue after a long wait

I don't think that is the issue in your case
 
Old 11-08-2011, 12:13 AM   #17
Majed17
Member
 
Registered: Jul 2011
Posts: 102

Original Poster
Rep: Reputation: Disabled
i tried adding the feature but it didn't work.
i sent first an email to monitoring @ profiland.by but i got :
Code:
Nov  8 09:00:20 srvmon-Bellakt sm-mta[31517]: pA860DFV031517: to=<monitoring@profiland.by>, ctladdr=<root@srvmon-Bellakt.Bellakt.com> (0/0), delay=00:00:07, xdelay=00:00:07, mailer=esmtp, pri=30332, relay=mx1.activeby.net. [109.237.213.143], dsn=5.0.0, stat=Service unavailable
Nov  8 09:00:20 srvmon-Bellakt sm-mta[31517]: pA860DFV031517: pA860DFW031517: DSN: Service unavailable
Nov  8 09:00:20 srvmon-Bellakt sm-mta[31517]: pA860DFW031517: to=<root@srvmon-Bellakt.Bellakt.com>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31356, relay=local, dsn=2.0.0, stat=Sent
Nov  8 09:00:20 srvmon-Bellakt sendmail[31420]: pA8609dp031420: to=monitoring@profiland.by, ctladdr=root (0/0), delay=00:00:11, xdelay=00:00:07, mailer=relay, pri=30007, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (pA860DFV031517 Message accepted for delivery)
and it didn't arrive.
i next sent to admin50 @ bellakt.com but the message arrived.

now my sendmail.mc looks like this:

Code:
divert(-1)
divert(0)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`$Id: sendmail.mc,v 1.2 2004/12/07 01:59:31 g2boojum Exp $')dnl
OSTYPE(linux)dnl
DOMAIN(generic)dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`local_lmtp',`/usr/sbin/mail.local')dnl
MASQUERADE_AS(bellakt.com)dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
MASQUERADE_DOMAIN(bellakt.com)dnl
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
MAILER(local)dnl
MAILER(smtp)dnl
after modifying sendmail.mc i applied the command:

Code:
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
then
Code:
/etc/init.d/sendmail restart
but it seems that it didn't help, the situation is unchanged, i still get mail undelivered.

anything more to try?

Last edited by Majed17; 11-08-2011 at 12:23 AM.
 
1 members found this post helpful.
Old 11-08-2011, 02:25 AM   #18
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
add this line in sendmail.mc

Code:
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
Code:
#m4 sendmail.mc > sendmail.cf
and put the IP of your machine in access file the way you did earlier and map into access.db
 
1 members found this post helpful.
Old 11-08-2011, 03:17 AM   #19
Majed17
Member
 
Registered: Jul 2011
Posts: 102

Original Poster
Rep: Reputation: Disabled
ok i added
Code:
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
to sendmail.mc and now sendmail.mc looks like this:
Code:
divert(-1)
divert(0)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`$Id: sendmail.mc,v 1.2 2004/12/07 01:59:31 g2boojum Exp $')dnl
OSTYPE(linux)dnl
DOMAIN(generic)dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`local_lmtp',`/usr/sbin/mail.local')dnl
MASQUERADE_AS(bellakt.com)dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
MASQUERADE_DOMAIN(bellakt.com)dnl
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
MAILER(local)dnl
MAILER(smtp)dnl
then i executed the command:
Code:
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
then i added my eth1 interface address to the access file and now it looks like this:
Code:
Connect:109.237.213.144          RELAY
Connect:172.16.40.1              RELAY
and then executed the command:
Code:
makemap -r hash /etc/mail/access.db < /etc/mail/access
then i restarted sendmail:
Code:
/etc/init.d/sendmail restart
then i sent 10 emails to profiland and 10 to bellakt and all arrived and i even sent to my hotmail and it arrived to the inbox
at last it is so far working fine. it seems relaying my own ip address was needed.
thanks alot for your help, i hope you learned something from all this too

Last edited by Majed17; 11-08-2011 at 03:18 AM.
 
1 members found this post helpful.
Old 11-08-2011, 03:41 AM   #20
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
yes even I am trying to learn ways to troubleshoot being a newbie

I would still like to know few things if you don't mind
109.237.213.144 seemed to me like a public IP

can you explain your organizations scenario to me as I am still confused with few stuffs

what is the ip of your machine?
on which ip DNS is configured?
on which IP sendmail is configured and what is the hostname?

Last edited by deep27ak; 11-08-2011 at 03:43 AM.
 
Old 11-08-2011, 04:26 AM   #21
Majed17
Member
 
Registered: Jul 2011
Posts: 102

Original Poster
Rep: Reputation: Disabled
well i am connecting through vpn from profiland to the bellakt domain.
here is the net configuration:
Code:
config_eth1="172.16.1.40/16"
routes_eth1="default via 172.16.1.254" 
dns_servers_eth1="172.16.1.1 172.16.1.2"
i connect through vpn and my ip is from the 10.1.1.0 range
the gento machine is named:
srvmon-Bellakt.Bellakt.com and it mainly uses 172.16.1.1 as dns

regarding sendmail i used to be able to telnet on all ip's on smtp
now after putting :
Code:
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
it is only able to telnet on localhost and not 172.16.1.40
do you think anything is still unsecure about the sendmail configuration?
 
Old 11-08-2011, 05:03 AM   #22
Majed17
Member
 
Registered: Jul 2011
Posts: 102

Original Poster
Rep: Reputation: Disabled
i made a mistake in the access file the ip address was 172.16.40.1 and i corrected it to 172.16.1.40 and still everything is working.
 
Old 11-08-2011, 05:12 AM   #23
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by Majed17 View Post
i made a mistake in the access file the ip address was 172.16.40.1 and i corrected it to 172.16.1.40 and still everything is working.
check the logs
what was the IP which all the mails used to relay all mails
 
Old 11-08-2011, 05:18 AM   #24
Majed17
Member
 
Registered: Jul 2011
Posts: 102

Original Poster
Rep: Reputation: Disabled
Code:
relay=mx2.activeby.net. [109.237.213.144], dsn=2.0.0, stat=Sent (OK id=1RNiuy-0008UE-3E)
i guess the own ip relay is not neccessary what was neccessary :
Code:
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
 
Old 11-08-2011, 05:24 AM   #25
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by Majed17 View Post
Code:
relay=mx2.activeby.net. [109.237.213.144], dsn=2.0.0, stat=Sent (OK id=1RNiuy-0008UE-3E)
i guess the own ip relay is not neccessary what was neccessary :
Code:
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
as per me that option is necessary as you are defining your machine where you have configured sendmail as mail transfer agent (MTA) i.e smtp server
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail: sending emails to Yahoo problem mikeressan Linux - Server 5 04-11-2011 08:54 PM
sendmail is sending unnecessary multiple copies of emails from php form swg1cor14 Linux - Server 1 01-07-2010 08:25 AM
problem of sending out emails through sendmail -- error code 421 kkeith Linux - Newbie 1 06-30-2006 04:59 AM
sending/recieving emails with sendmail xushi Slackware 2 02-25-2004 04:44 PM
Sendmail not sending emails, errorlog hydro Linux - Software 8 06-20-2003 05:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration