LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Sendmail won't accept mail (http://www.linuxquestions.org/questions/linux-server-73/sendmail-wont-accept-mail-809321/)

Zmyrgel 05-21-2010 10:56 AM

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


rweaver 05-21-2010 10:58 AM

What do the logs show for an attempted message delivery (post a log chunk).

Zmyrgel 05-21-2010 11:07 AM

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>


rweaver 05-21-2010 11:24 AM

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?

Zmyrgel 05-21-2010 11:25 AM

Appears to be working now. Updated alias database and fixed a typo in virtusertable.

sang_froid 05-21-2010 11:25 AM

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 (Post 3976725)
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>



Zmyrgel 05-21-2010 11:31 AM

Quote:

Originally Posted by sang_froid (Post 3976748)
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
...


rweaver 05-24-2010 04:46 PM

What do you mx records say? and do you have any forwards setup at isp/gmail?

bathory 05-25-2010 03:12 AM

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


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