Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sendmail does relay but does not put in mailbox

Status
Not open for further replies.

ivanros

Technical User
Dec 13, 2002
9
NL
Hi,

My current situation: I have Red Hat Linux 9 installed and I have sendmail installed. I can send data through port 25 but cannot receive data on port 25, thus my port 25 is filtered from the outside by my provider. I solved this problem bij using the services of Dynu.com, they forward the mail to an other port let say port 3800. I have my sendmail listining to that port bij adding the followinf statement in my sendmail.cf: O DaemonPortOptions=Name=Sendmail, Port=3800

I have let say my domain xxx.dynu.com and my MX Records as instructed bij Dynu.com is email.dynu.com. 10. xxx=hostname of my server.

In my access file i relay:
localhost.localdomain RELAY
localhost RELAY
192.168.0.* RELAY
127.0.0.1 RELAY
xxx RELAY
@xxx.dynu.com RELAY
email.dynu.com RELAY
xxx.dynu.com RELAY

I have the following problem:when I send a email from hotmail.com to let say my_name@xxx.dynu.com sendmail does receive the mail, when I check the log I see:

May 17 21:26:07 xxx sendmail[2526]: h4HJPJo0002524: to=<my_name@xxx.dynu.com>, delay=00:00:47, xdelay=00:00:47, mailer=esmtp, pri=33415, relay=email.dynu.com. [198.144.7.125], dsn=2.0.0, stat=Sent (Ok)
May 17 21:27:33 xxx sendmail[2527]: h4HJRWo0002527: from=<ivanrosaria@hotmail.com>, size=4033, class=0, nrcpts=1, msgid=<BAY2-F34Jjt8gsVWDKp00001edc@hotmail.com>, proto=SMTP, daemon=Sendmail, relay=c-24-118-52-210.mn.client2.attbi.com [24.118.52.210]
May 17 21:28:23 xxx sendmail[2529]: h4HJRWo0002527: to=<my_name@xxx.dynu.com>, delay=00:00:50, xdelay=00:00:50, mailer=esmtp, pri=33721, relay=email.dynu.com. [198.144.7.125], dsn=2.0.0, stat=Sent (Ok)

This keeps repeating till I get the following messages in de maillog:
May 17 21:29:49 xxx sendmail[2531]: h4HJTmo0002531: SYSERR(root): Too many hops 26 (25 max): from <ivanrosaria@hotmail.com> via c-24-118-52-210.mn.client2.attbi.com, to <my_name@xxx.dynu.com>

And then it sends a mail back to ivanrosaria@hotmail.com:
May 17 21:51:51 xxx sendmail[2617]: h4HJoko2002617: to=<ivanrosaria@hotmail.com>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=35566, relay=mx4.hotmail.com. [65.54.254.151], dsn=2.0.0, stat=Sent ( <200305171951.h4HJoko2002617@localhost.localdomain> Queued mail for delivery)

I don't know why it doesn't deliver the mail to my_user which is a user on my server. Maybe sendmail cannot identify my server as the server that should receive the mail?

Here is my sendmail.mc file(without comment) which a converted to sendmail.cf and afterthat I added the line O DaemonPortOptions=Name=Sendmail, Port=3800 :
divert(-1)dnl
dnl #
dnl # This is the sendmail macro config file for m4. If you make changes to
dnl # /etc/mail/sendmail.mc, you will need to regenerate the
dnl # /etc/mail/sendmail.cf file by confirming that the sendmail-cf package is
dnl # installed and then performing a
dnl #
dnl # make -C /etc/mail
dnl #
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for Red Hat Linux')dnl
OSTYPE(`linux')dnl

define(`confDEF_USER_ID',``8:12'')dnl
define(`confTRUSTED_USER', `smmsp')dnl
dnl define(`confAUTO_REBUILD')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(`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

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

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

LOCAL_DOMAIN(`localhost.localdomain')dnl

MASQUERADE_AS('xxx.dynu.com')dnl
FEATURE(masquerade_envelope)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl

I hope you can help me out. Thanks in advance.

Bye,

Ivan Rosaria

 
Look in /var/spool/mail/username where username is the name of a valid user on your system. If you see these files, then e-mail is making it to your server and is waiting to be delivered. This is doen with a POP3/IMAP server. POP3 listens to port 110 so if it is being blocked by your isp, you will need to take care of that also. RH 9 comes with a pop3 daemon. You will need to start xinetd as well as pop3d at boot up for it start working.
 
Hi,

What caused the problem in case was that with the newer version of sendmail(sendmail-8.12.8-5.90) you have to put all the aliases of your machine is the file local-host-names. In my case these are xxx.dynu.com and xxx. After putting these aliases in this file you must restart sendmail.

When sendmail receives a mail from someone to my_name@xxx.dynu.com it compares the aliases in this file and your hostname with the extension xxx.dynu.com and checks if it has to accept it and deliver it to the mailbox. If xxx.dynu.com is not in this file or is not the same as the hostname it is not delivered to the user and you get the &quot;too many hops&quot; problem.

Thus putting the allias in the local-host-names solved my problem.

Bye,

Ivan Rosaria
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top