LinuxQuestions.org
Visit Jeremy's Blog.
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 05-21-2010, 10:56 AM   #1
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 37
Sendmail won't accept mail


I have a bit of problem setting up sendmail on my server.

I've gotten so far that I can send mail from my mail server and relay mail from my LAN computers through it. Also, local delivery seems to be working.
The problem is receiving mail from other domains. When I send mail from my gmail account to any user in my domain the mail gets delivered back to gmail as it exceeds the max hop count.
The mail gets bounced between my ISP mailserver which I use as smart host and between my server.
The problem seems to be that my mail server won't accept any mail it is supposed to receive.

I want the server to receive all mails to @mydomain.com

I have put 'mydomain.com' to my /etc/mail/local-host-names but it did not help.
How to get this thing to work?

Bit cleaned sendmail.mc
Code:
define(`SMART_HOST', `[mail.isp.com]')dnl
define(`confPRIVACY_FLAGS', `authwarnings,needmailhelo,noexpn,novrfy,nobodyreturn')dnl
define(`confCW_FILE', `-o MAIL_SETTINGS_DIR`'local-host-names')dnl
define(`confCT_FILE', `-o MAIL_SETTINGS_DIR`'trusted-users')dnl
FEATURE(nouucp, `reject')dnl
FEATURE(`access_db', `hash -o -T<TMPF> /etc/mail/access')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`mailertable', `hash -o /etc/mail/mailertable')dnl
FEATURE(`use_ct_file')dnl
FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable')dnl
FEATURE(genericstable, `hash -o /etc/mail/genericstable')dnl
FEATURE(always_add_domain)dnl
FEATURE(redirect)dnl
FEATURE(`no_default_msa')dnl
DAEMON_OPTIONS(`Family=inet, Address=0.0.0.0, Name=MTA')dnl
DAEMON_OPTIONS(`Family=inet6, Address=::, Name=MTA6, M=O')dnl
DAEMON_OPTIONS(`Family=inet, Address=0.0.0.0, Port=587, Name=MSA, M=E')dnl
DAEMON_OPTIONS(`Family=inet6, Address=::, Port=587, Name=MSA6, M=O, M=E')dnl
CLIENT_OPTIONS(`Family=inet, Address=0.0.0.0')dnl
CLIENT_OPTIONS(`Family=inet6, Address=::')dnl
define(`confBIND_OPTS', `WorkAroundBrokenAAAA')dnl
MASQUERADE_AS(`mydomain.com')dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
 
Old 05-21-2010, 10:58 AM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
What do the logs show for an attempted message delivery (post a log chunk).
 
Old 05-21-2010, 11:07 AM   #3
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Original Poster
Rep: Reputation: 37
Here goes:
Code:
May 21 18:09:25 hydra sm-mta[16801]: o4LF9ADN016801: from=<timo.myyra@gmail.com>, size=5371, class=0, nrcpts=1, msgid=<AANLkTiksFqDusDBg
pxwoTvAAUxr2xDWLPMUUt8_4idsx@mail.gmail.com>, proto=ESMTP, daemon=MTA, relay=mta-out.inet.fi [195.156.147.13]
May 21 18:09:25 hydra sm-mta[12334]: o4LF9ADN016801: to=<zmyrgel@wickedbsd.net>, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=3537
1, relay=mail.inet.fi. [195.156.147.15], dsn=2.0.0, stat=Sent (<4B17EA3D06749ACA> Mail accepted)
May 21 18:09:25 hydra sm-mta[25761]: o4LF9GGI025761: from=<timo.myyra@gmail.com>, size=5739, class=0, nrcpts=1, msgid=<AANLkTiksFqDusDBg
pxwoTvAAUxr2xDWLPMUUt8_4idsx@mail.gmail.com>, proto=ESMTP, daemon=MTA, relay=mta-out.inet.fi [195.156.147.13]
May 21 18:09:25 hydra sm-mta[25761]: o4LF9GGI025761: SYSERR(root): Too many hops 26 (25 max): from <timo.myyra@gmail.com> via mta-out.in
et.fi, to <zmyrgel@wickedbsd.net>
May 21 18:14:44 hydra sm-mta[2451]: o4LF9GGI025761: SYSERR(root): Too many hops 26 (25 max): from <timo.myyra@gmail.com> via localhost, 
to <zmyrgel@wickedbsd.net>
May 21 18:14:44 hydra sm-mta[2451]: o4LF9GGI025761: o4LFEib3002451: DSN: Too many hops 26 (25 max): from <timo.myyra@gmail.com> via loca
lhost, to <zmyrgel@wickedbsd.net>
 
Old 05-21-2010, 11:24 AM   #4
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Maybe an issue with forwarding or a mail loop, what does the message returned from gmail look like header wise? What do you get when you do a 'dig MX mydomain.tld +short'? Have you restarted sendmail since config changes/initial setup? Have you regenerated the cf?

Last edited by rweaver; 05-21-2010 at 11:26 AM.
 
Old 05-21-2010, 11:25 AM   #5
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Original Poster
Rep: Reputation: 37
Appears to be working now. Updated alias database and fixed a typo in virtusertable.
 
Old 05-21-2010, 11:25 AM   #6
sang_froid
Member
 
Registered: Oct 2006
Posts: 179

Rep: Reputation: 15
This is a mail looping problem...seems your gmail is fowarding to your wickedbsd a/c and then wickedbsd a/c is forwarding to your gmail a/c


Quote:
Originally Posted by Zmyrgel View Post
Here goes:
Code:
May 21 18:09:25 hydra sm-mta[16801]: o4LF9ADN016801: from=<timo.myyra@gmail.com>, size=5371, class=0, nrcpts=1, msgid=<AANLkTiksFqDusDBg
pxwoTvAAUxr2xDWLPMUUt8_4idsx@mail.gmail.com>, proto=ESMTP, daemon=MTA, relay=mta-out.inet.fi [195.156.147.13]
May 21 18:09:25 hydra sm-mta[12334]: o4LF9ADN016801: to=<zmyrgel@wickedbsd.net>, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=3537
1, relay=mail.inet.fi. [195.156.147.15], dsn=2.0.0, stat=Sent (<4B17EA3D06749ACA> Mail accepted)
May 21 18:09:25 hydra sm-mta[25761]: o4LF9GGI025761: from=<timo.myyra@gmail.com>, size=5739, class=0, nrcpts=1, msgid=<AANLkTiksFqDusDBg
pxwoTvAAUxr2xDWLPMUUt8_4idsx@mail.gmail.com>, proto=ESMTP, daemon=MTA, relay=mta-out.inet.fi [195.156.147.13]
May 21 18:09:25 hydra sm-mta[25761]: o4LF9GGI025761: SYSERR(root): Too many hops 26 (25 max): from <timo.myyra@gmail.com> via mta-out.in
et.fi, to <zmyrgel@wickedbsd.net>
May 21 18:14:44 hydra sm-mta[2451]: o4LF9GGI025761: SYSERR(root): Too many hops 26 (25 max): from <timo.myyra@gmail.com> via localhost, 
to <zmyrgel@wickedbsd.net>
May 21 18:14:44 hydra sm-mta[2451]: o4LF9GGI025761: o4LFEib3002451: DSN: Too many hops 26 (25 max): from <timo.myyra@gmail.com> via loca
lhost, to <zmyrgel@wickedbsd.net>
 
Old 05-21-2010, 11:31 AM   #7
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Original Poster
Rep: Reputation: 37
Quote:
Originally Posted by sang_froid View Post
This is a mail looping problem...seems your gmail is fowarding to your wickedbsd a/c and then wickedbsd a/c is forwarding to your gmail a/c
The mail loop is between my ISP mailserver and my own. At least looking at the mail which got returned to gmail.

snip
Code:
... 
Received: from jenni2.inet.fi (mta-out.inet.fi [195.156.147.13])
	by hydra.wickedbsd.net (8.14.3/8.14.3) with ESMTP id o4LF9GGI025761
	for <zmyrgel@wickedbsd.net>; Fri, 21 May 2010 18:09:25 +0300 (EEST)
Received: from hydra.wickedbsd.net (80.221.34.59) by jenni2.inet.fi (8.5.014)
        id 4B17EA3D06749ACA for zmyrgel@wickedbsd.net; Fri, 21 May 2010 18:09:25 +0300
Received: from kirsi2.inet.fi (mta-out.inet.fi [195.156.147.13])
	by hydra.wickedbsd.net (8.14.3/8.14.3) with ESMTP id o4LF9ADN016801
	for <zmyrgel@wickedbsd.net>; Fri, 21 May 2010 18:09:25 +0300 (EEST)
Received: from hydra.wickedbsd.net (80.221.34.59) by kirsi2.inet.fi (8.5.014)
        id 4B17EFA606B29317 for zmyrgel@wickedbsd.net; Fri, 21 May 2010 18:09:25 +0300
...
 
Old 05-24-2010, 04:46 PM   #8
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
What do you mx records say? and do you have any forwards setup at isp/gmail?
 
Old 05-25-2010, 03:12 AM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Are you sure that your domain is added in /etc/mail/local-host-names?
And what is the output of:
Code:
sendmail -bv zmyrgel@wickedbsd.net
Regards
 
  


Reply

Tags
count, email, sendmail


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Cannot turn off "Accept mail for users' real names" option in sendmail louisedp Linux - Newbie 0 11-03-2009 07:08 AM
How do I configure sendmail to accept/send mail from outside our network? russmitch Linux - Server 3 12-09-2008 01:11 PM
Sendmail doesn't accept mail in it's queue when there is no internet. vedang Linux - Server 1 08-29-2007 09:44 AM
determine Sendmail not to accept arbitrary "Mail From:" tag alext Linux - Networking 0 07-15-2006 01:25 PM
My sendmail won´t accept incoming mail pjon SUSE / openSUSE 3 07-20-2005 12:41 AM

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

All times are GMT -5. The time now is 09:31 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