LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-25-2008, 09:33 PM   #1
nelson.ck.sit
LQ Newbie
 
Registered: Nov 2008
Posts: 3

Rep: Reputation: 0
Unhappy Why my 2 mail server cannot send mail to each other via Sendmail?


Hello everyone.

I'm Nelson, a newbie of Linux. I've setup two mail servers in same subnet (192.168.20.x), both of them have pointed a mx records and I found that each of the mail server can send or receive mails to/from other mail servers like Yahoo.com, Gmail.com...etc via Openwebmail.

But they cannot send or receive mails each other.
I've set the hostname to avoid the collision from HELO message.
Is there anything else I need to set to achieve?

Please kindly advise me. Thank you very much.
Enclosed herewith my two mail servers setting.

Quote:
Version information:

"mail1.happymacao.com
sendmail-8.13.8-2.el5
sendmail-cf-8.13.8-2.el5
perl-Compress-Zlib-1.42-1.fc6
perl-Text-Iconv-1.7-2.el5
perl-Text-Iconv-debuginfo-1.7-2.el5
perl-suidperl-5.8.8-15.el5_2.1
perl-5.8.8-15.el5_2.1
dovecot-1.0.7-2.el5
openwebmail-data-2.53-3
openwebmail-2.53-3

"mail.mayp.happymacao.com
sendmail-cf-8.13.8-2.el5
sendmail-8.13.8-2.el5
perl-5.8.8-15.el5_2.1
perl-Text-Iconv-1.7-2.el5
perl-Compress-Zlib-1.42-1.fc6
perl-CGI-SpeedyCGI-2.22-1.2.el4.rf
perl-suidperl-5.8.8-15.el5_2.1
perl-Text-Iconv-debuginfo-1.7-2.el5
dovecot-1.0.7-2.el5
openwebmail-2.53-3
openwebmail-data-2.53-3
Quote:
DNS setting (provided by NetworkSolutions.com)
(A) happymacao.com
(A) mail1.happymacao.com
(A) mail2.happymacao.com
(A) mayp.happymacao.com
(A) mail.mayp.happymacao.com

MX for happymacao.com
(MX) 10 mail1.happymacao.com
(MX) 20 mail2.happymacao.com

MX for the subdomain of mayp.happymacao.com
(MX) 10 mail.mayp.happymacao.com

Quote:
"mail1.happymacao.com" configuration

/etc/hosts
192.168.20.71 mail.happymacao.com MAIL
192.168.20.71 mail1.happymacao.com MAIL
192.168.20.71 happymacao.com MAIL
192.168.20.82 mail.mayp.happymacao.com TS2
192.168.20.82 mayp.happymacao.com TS2
127.0.0.1 mail.happymacao.com MAIL
127.0.0.1 mail1.happymacao.com MAIL
127.0.0.1 happymacao.com MAIL
127.0.0.1 localhost.localdomain localhost MAIL


/etc/mail/access
Connect:localhost.localdomain RELAY
Connect:localhost RELAY
Connect:127.0.0.1 RELAY
mail.happymacao.com RELAY
mail1.happymacao.com RELAY

happymacao.com RELAY
enetmacau.com RELAY

192.168.20.71 RELAY
172.xx.xx.71 RELAY <-- Intranet IP (for mapping with Internet IP)


/etc/mail/local-host-names
happymacao.com
mail.happymacao.com
mail1.happymacao.com
mail2.happymacao.com


/etc/mail/sendmail.mc
divert(-1)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for linux')dnl
OSTYPE(`linux')dnl
define(`confDEF_USER_ID', ``8:12'')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST', `True')dnl
define(`confDONT_PROBE_INTERFACES', `True')dnl
define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confTO_IDENT', `0')dnl
FEATURE(`no_default_msa', `dnl')dnl
FEATURE(`smrsh', `/usr/sbin/smrsh')dnl
FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
define(`confMAX_DAEMON_CHILDREN', `20')dnl
define(`confCONNECTION_RATE_THROTTLE', `3')dnl
define(`confMAX_MESSAGE_SIZE', 20000000)dnl
define(`confMAX_RCPTS_PER_MESSAGE', 25)dnl
FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl
FEATURE(`accept_unresolvable_domains')dnl
FEATURE(`relay_hosts_only')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
FEATURE(masquerade_envelope)dnl
MASQUERADE_DOMAIN(happymacao.com)dnl
MASQUERADE_DOMAIN(abex88.com)dnl
FEATURE(dnsbl, `bl.spamcop.net', `"Spam blocked see: http://spamcop.net/bl.shtml?" $&{client_addr}')dnl
FEATURE(dnsbl, `sbl-xbl.spamhaus.org', `"550 Mail from " $&{client_addr} " rejected by Spamhaus block See http://www.spamhaus.org/query/bl?ip=" $&{client_addr}')dnl
FEATURE(`dnsbl', `cbl.abuseat.org',`"554 Rejected " $&{client_addr} " found in cbl.abuseat.org - see http://cbl.abuseat.org/lookup.cgi?ip="$&{client_addr}"&submit=Lookup"')dnl
MAILER(smtp)dnl
MAILER(procmail)dnl


/var/www/cgi-bin/openwebmail/etc/defaults/dbm.conf
dbm_ext .db
dbmopen_ext .db
dbmopen_haslock yes


/var/www/cgi-bin/openwebmail/etc/defaults/openwebmail.conf
domainnames auto
smtpserver 127.0.0.1
authpop3_server 127.0.0.1

Quote:
"mail.mayp.happymacao.com" configuration

/etc/hosts
192.168.20.82 mail.mayp.happymacao.com TS2
192.168.20.82 mayp.happymacao.com TS2
192.168.20.71 mail.happymacao.com MAIL
192.168.20.71 mail1.happymacao.com MAIL
192.168.20.71 happymacao.com MAIL
127.0.0.1 mail.mayp.happymacao.com TS2
127.0.0.1 mayp.happymacao.com TS2
127.0.0.1 localhost.localdomain localhost MAIL


/etc/mail/access
Connect:localhost.localdomain RELAY
Connect:localhost RELAY
Connect:127.0.0.1 RELAY
Connect:happymacao.com RELAY
Connect:enetmacau.com RELAY
Connect:mail.mayp.happymacao.com RELAY
Connect:mayp.happymacao.com RELAY

Connect:192.168.20.71 RELAY
Connect:192.168.20.82 RELAY
Connect:172.xx.xx.71 RELAY <-- Intranet IP (for mapping with Internet IP)
Connect:172.xx.xx.82 RELAY <-- Intranet IP (for mapping with Internet IP)
Connect:mail.happymacao.com RELAY
Connect:mail1.happymacao.com RELAY
Connect:mail2.happymacao.com RELAY


/etc/mail/local-host-names
mayp.happymacao.com
mail.mayp.happymacao.com


/etc/mail/sendmail.mc
divert(-1)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for linux')dnl
OSTYPE(`linux')dnl
define(`confMAX_MESSAGE_SIZE', `5000000')dnl
define(`confMAX_RCPTS_PER_MESSAGE', `25')dnl
define(`confDEF_USER_ID', ``8:12'')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST', `True')dnl
define(`confDONT_PROBE_INTERFACES', `True')dnl
define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confQUEUE_LA', `12')dnl
define(`confREFUSE_LA', `18')dnl
define(`confTO_IDENT', `0')dnl
FEATURE(`no_default_msa', `dnl')dnl
FEATURE(`smrsh', `/usr/sbin/smrsh')dnl
FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
define(`confCONNECTION_RATE_THROTTLE', `3')dnl
FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl
FEATURE(`accept_unresolvable_domains')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
FEATURE(masquerade_envelope)dnl
MASQUERADE_DOMAIN(mayp.happymacao.com)dnl
MASQUERADE_DOMAIN(mayp.abex88.net)dnl
FEATURE(dnsbl, `bl.spamcop.net', `"Spam blocked see: http://spamcop.net/bl.shtml?" $&{client_addr}')dnl
FEATURE(dnsbl, `sbl-xbl.spamhaus.org', `"550 Mail from " $&{client_addr} " rejected by Spamhaus block See http://www.spamhaus.org/query/bl?ip=" $&{client_addr}')dnl
FEATURE(`dnsbl', `cbl.abuseat.org',`"554 Rejected " $&{client_addr} " found in cbl.abuseat.org - see http://cbl.abuseat.org/lookup.cgi?ip="$&{client_addr}"&submit=Lookup"')dnl
MAILER(smtp)dnl
MAILER(procmail)dnl


/var/www/cgi-bin/openwebmail/etc/defaults/dbm.conf
dbm_ext .db
dbmopen_ext .db
dbmopen_haslock yes


/var/www/cgi-bin/openwebmail/etc/defaults/openwebmail.conf
domainnames auto
smtpserver 127.0.0.1
authpop3_server 127.0.0.1
Quote:
/var/log/maillog (nelson.sit@mail.mayp.happymacao.com --> nelson.sit@happymacao.com

Nov 26 11:27:38 TS2 sendmail[24436]: mAQ3RcFM024436: from=<nelsonsit@mail.mayp.happymacao.com>, size=385, class=0, nrcpts=1, msgid=<20081126032718.M88072@mail.mayp.happymacao.com>, proto=ESMTP, daemon=MTA, relay=mail.mayp.happymacao.com [127.0.0.1] (may be forged)

Nov 26 11:31:39 TS2 sendmail[24438]: mAQ3RcFM024436: to=<nelson.sit@happymacao.com>, ctladdr=<nelsonsit@mail.mayp.happymacao.com> (503/100), delay=00:04:01, xdelay=00:04:01, mailer=esmtp, pri=120385, relay=mail2.happymacao.com. [202.68.199.207], dsn=4.0.0, stat=Deferred: Connection timed out with mail2.happymacao.com.
 
Old 11-26-2008, 09:05 PM   #2
ehawk
Senior Member
 
Registered: Jul 2003
Posts: 1,257

Rep: Reputation: 48
Similar problem?

http://ubuntuforums.org/showthread.php?t=181204

Using postfix to send mail between two mail client using smtp on the same subnet:

http://books.google.com/books?id=76Q...um=9&ct=result

This site give pretty comprehensive documentation for sendmail and popmail:

http://www.linuxhomenetworking.com/w...x_Mail_Servers

About halfway down the page it discusses the configuration for sendmail. It is discussing it in a debian context, but once you have sendmail installed, I would think the configuration is the same for any linux distribution:

An online google books result:

http://books.google.com/books?id=YWf...sult#PPA496,M1

http://www.aboutdebian.com/internet.htm

I was able to view the first 10 pages of this google book display. Maybe it will help you:

http://books.google.com/books?id=6cO...result#PPP1,M1

Last edited by ehawk; 11-26-2008 at 09:20 PM.
 
Old 12-02-2008, 07:48 PM   #3
nelson.ck.sit
LQ Newbie
 
Registered: Nov 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ehawk View Post
Similar problem?

http://ubuntuforums.org/showthread.php?t=181204

Using postfix to send mail between two mail client using smtp on the same subnet:

http://books.google.com/books?id=76Q...um=9&ct=result

<---- Omitted ---->
Thanks Ehawk so much, you just provide many useful sites for me...But I've referenced from your sites, my problem still cannot find the solutions.

I'm suspecting the localmail between two local smtp servers will have some different configuration.

Sigh...Still suffering...

Last edited by nelson.ck.sit; 12-02-2008 at 08:04 PM.
 
Old 12-02-2008, 09:22 PM   #4
tajamari
Member
 
Registered: Jul 2007
Distribution: Red Hat CentOS Ubuntu FreeBSD OpenSuSe
Posts: 252

Rep: Reputation: 32
Do the network layer troubleshooting first.

1. Can the servers ping each other?
2. If yes, telnet localhost port 25.
3. Do also a telnet on port 25 to server2 from server1 and vice versa.

On default sendmail.cf, you need to edit this line

O DaemonPortOptions=Port=smtp,Name=MTA

Make sure to remove the 127.0.0.1 on that line. Hope it helps.
 
Old 12-09-2008, 07:22 PM   #5
nelson.ck.sit
LQ Newbie
 
Registered: Nov 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Unhappy

Quote:
Originally Posted by tajamari View Post
Do the network layer troubleshooting first.

1. Can the servers ping each other?
2. If yes, telnet localhost port 25.
3. Do also a telnet on port 25 to server2 from server1 and vice versa.

On default sendmail.cf, you need to edit this line

O DaemonPortOptions=Port=smtp,Name=MTA

Make sure to remove the 127.0.0.1 on that line. Hope it helps.

Hi tajamari,

Thanks for you advised, I've already removed the line which you pointed above.

Sorry for all good helpers first, due to my office during relocating. I haven't enough time for test now....Just...sigh.
I will report again after test.
Thanks again.

regards,

Nelson

Last edited by nelson.ck.sit; 12-09-2008 at 07:29 PM.
 
  


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
How to configure sendmail only to send mail to external mail account Nivix Linux - Newbie 2 10-23-2008 12:46 AM
sendmail to send all email to another mail server it@stcroixknits.com Linux - Software 2 10-27-2006 10:19 AM
Mail Server Issues; Can't Send E-mail (using sendmail) Vegetarian Smoker Linux - Software 1 06-18-2006 02:16 PM
how to send all mail through isp server with sendmail or? dlm4444 Linux - Wireless Networking 1 07-06-2005 04:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:53 AM.

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