Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sendmail 8.12.8/8.12.10 and aliases file - can't get it working together

21 views
Skip to first unread message

Magda Hewryk

unread,
Feb 25, 2004, 2:00:23 AM2/25/04
to
Hi,

I've tested the aliases issue on Fedora/Sendmail 8.12.8 and 8.12.10 on
few boxes (four) and I'm getting the same result - when sending email
by using 'mail' it doesn't references to aliases file. When debugging
I can see that aliases file is read.

Any inputs or thoughts are greatly appreciated.
Thanks,
Magda

All I've done is:
1. /etc/mail/sendmail.cf
set smart relay
#DS
DSrelay:mailhost
set domain name to AAA:
#Dj$w.Foo.COM
Dj$w.AAA.com

2 /etc/mail/submit.cf
set smart relay
#DS
DSrelay:mailhost
set MTA
#D{MTAHost}[127.0.0.1]
D{MTAHost} mailhost
set domain name
#Dj$w.Foo.COM
Dj$w.AAA.com

3. /etc/hosts
set mailhost to notes server
10.xxx.xx.xx mailhost xxx.AAA.com

4. trun off sendmail:
# chkconfig --list | grep on
#chckonfig sendamil off
#service sendmail stop

5. DNS
verify /etc/resolv.conf file

6. test MTA functionality:
# mail -v na...@AAA.com
test

7. set cron entry to run
5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/lib/sendmail -q


For some reason when I try to send email using MTA it doesn't read
aliases file.
For instance /etc/aliases file has entry: magda mhe...@xxx.com

1). debug looks good, an alias is found
# sendmail -bv -d27.2 magda
magda (, magda) aliased to mhe...@AAA.com
self_reference(mhe...@AAA.com)
... no self ref
mhe...@AAA.com... deliverable: mailer esmtp, host AAA.com., user
mhe...@AAA.com

2.) When I add a double entry to aliases file is sees it
# newaliases
/etc/aliases: line 88: magda... Warning: duplicate alias name magda
/etc/aliases: 68 aliases, longest 23 bytes, 736 bytes total

3.) When running mail -v magda command
it doesn't say "magda ... aliased to... mhe...@AAA.com" :
# mail -v magda
RCPT To:<ma...@hostname.domain.com>
554 Relay rejected for policy reasons.



Which sendmail version do you use ?
Version 8.12.8

Is hostname.domain.com on the list of local email domains ?
Yes
echo '$=w' | sendmail -bt

What is reported by the command below ?


Is hostname.domain.com on the list of local email domains ?
echo '$=w' | sendmail -bt

Yes, the hostname.domain.cm is on the list:
hostname
localhost.localdomain
hostname.domain.com
localhost
hostname.domain.com

What is reported by the command below ?
sendmail -bv ma...@hostname.domain.com

Here is the report:
===================

# sendmail -bv magda
mhe...@AAA.com... deliverable: mailer relay, host mailhost, user
mhe...@AAA.com
# sendmail -bv mhe...@AAA.com
mhe...@AAA.com... deliverable: mailer relay, host mailhost, user
mhe...@AAA.com

Here is the /etc/aliases file:
===========================
magda: mhe...@domain.com
mhewryk: mhe...@domain.com


Which sendmail version do you use ?

echo '$=R' | /usr/lib/sendmail -bt -d0.4
Version 8.12.8

Thanks,
Magda

Per Hedeland

unread,
Feb 25, 2004, 4:21:06 PM2/25/04
to
In article <146d95ae.04022...@posting.google.com>

mhe...@hotmail.com (Magda Hewryk) writes:
>
>I've tested the aliases issue on Fedora/Sendmail 8.12.8 and 8.12.10 on
>few boxes (four) and I'm getting the same result - when sending email
>by using 'mail' it doesn't references to aliases file. When debugging
>I can see that aliases file is read.

>All I've done is:


>1. /etc/mail/sendmail.cf
>set smart relay
>#DS
>DSrelay:mailhost
>set domain name to AAA:
>#Dj$w.Foo.COM
>Dj$w.AAA.com

Don't edit sendmail.cf directly, use a .mc file and m4.

>2 /etc/mail/submit.cf
>set smart relay
>#DS
>DSrelay:mailhost
>set MTA
>#D{MTAHost}[127.0.0.1]
>D{MTAHost} mailhost
>set domain name
>#Dj$w.Foo.COM
>Dj$w.AAA.com

Don't change submit.cf *or* submit.mc *at all* unless you really
know what you're doing. Anyway there's your problem - you have told
the MSP to send directly to another host instead of to the local
MTA at 127.0.0.1 - and the local MTA is where aliasing is done. And
sendmail -bv uses sendmail.cf (as described in sendmail/SECURITY),
since it's quite uninteresting to see the MSP processing that is
based on submit.cf - all it's supposed to do is to hand the message
to the MTA.

--Per Hedeland
p...@hedeland.org

Magda Hewryk

unread,
Feb 27, 2004, 4:34:24 AM2/27/04
to
p...@hedeland.org (Per Hedeland) wrote in message news:<c1j3k2$n6i$1...@hedeland.org>...

Thanks for explanation. I've understood MTA and aliasing stuff now
much better.
However, I need to keep sendmail processes off even if sendmail is
accepting email only on 127.0.0.1. I need to keep port 25 close.
Period.
How can I make MTA and aliasing work? It works with the old versions
of sendmail.
Any idea?
Thanks,
Magda

> --Per Hedeland
> p...@hedeland.org

Per Hedeland

unread,
Feb 27, 2004, 3:19:30 PM2/27/04
to
In article <146d95ae.04022...@posting.google.com>
mhe...@hotmail.com (Magda Hewryk) writes:
>
>Thanks for explanation. I've understood MTA and aliasing stuff now
>much better.
>However, I need to keep sendmail processes off even if sendmail is
>accepting email only on 127.0.0.1. I need to keep port 25 close.
>Period.

Making such an assertion without any justification just sounds stupid -
since there is no possible justification for it.

>How can I make MTA and aliasing work? It works with the old versions
>of sendmail.

It's quite possible to setup sendmail 8.12 "the old way" too, it's even
specifically mentioned in the documentation - but you're basically on
your own if it doesn't work out.

--Per Hedeland
p...@hedeland.org

0 new messages