• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 839
  • Last Modified:

Virtual host problem with sendmail - please help!

I'm having a problem getting a virtual host to work with sendmail.

Here's as much relevant information as I can think of:

Machine host = magiteck.milleniumcare.com
Virtual Host = perfume-oil.com
Sendmail version = 8.13.2
OS = Slackware 10.1, Linux 2.6.9
POP3 server = qpopper

Some command responses:
root@magiteck:/etc/mail# sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> $=w
magiteck.milleniumcare.com
magiteck
[192.168.1.103]
localhost
[127.0.0.1]
> /map virtuser jared@perfume-oil.com
map_lookup: virtuser (jared@perfume-oil.com) returns jared (0)

My /etc/mail/local-host-names file contains:
magiteck.milleniumcare.com
perfume-oil.com
mail.perfume-oil.com

virtusertable contains:
jared@perfume-oil.com   jared

When I compiled sendmail.mc into sendmail.cf, the .mc file contained:

divert(0)dnl
VERSIONID(`$Id: generic-linux.mc,v 8.1 1999/09/24 22:48:05 gshapiro Exp $')
OSTYPE(linux)dnl
DOMAIN(milleniumcare.com)dnl
FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')dnl
MAILER(local)dnl
MAILER(smtp)dnl

When I send mail to jared@magiteck.milleniumcare.com, it goes right through.
When I attempt to send mail to jared@perfume-oil.com, I get a failure message that says:

Message from  yahoo.com.
Unable to deliver message to the following address(es).

<jared@perfume-oil.com>:
68.78.223.246 does not like recipient.
Remote host said: 550 5.7.1 <jared@perfume-oil.com>... Relaying denied Giving up on 68.78.223.246.

=======
I'd be very grateful of any help anybody could provide!! Thanks so much!!
0
magitek
Asked:
magitek
  • 4
  • 3
1 Solution
 
PsiCopCommented:
In the original instance of your Question in the Linux TA, I referred you to http://www.experts-exchange.com/Networking/Email_Groupware/Sendmail/Q_21322113.html

Was this not helpful?
0
 
magitekAuthor Commented:
thanks psiCop, it was a very informative document on how to set up, but as far as _I_ know, my setup is correct.  I looked over several documents like the one you posted when trying to set it up initially.

I'm hoping for someone to be able to pinpoint what about my configuration is causing the vhost not to work.

Thanks!
0
 
PsiCopCommented:
Try this to help pinpoint:

root@magiteck:/etc/mail# sendmail -bt -d60 -d21.12
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> 3,2,0 jared@perfume-oil.com
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
jlevieCommented:
I suspect "DOMAIN(milleniumcare.com)dnl" is the problem. DOMAIN is to invoke a specific configuration for a specific site. Since everything else looks okay and that definition would not normally be in a sendmail.mc I think it may be at the root of the problem.
0
 
magitekAuthor Commented:
Thanks for the continued help - the output is pretty long, but here goes!

root@magiteck:/home/jared# sendmail -bt -d60 -d21.12
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> 3,2,0 jared@perfume-oil.com
canonify           input: jared @ perfume-oil . com
-----trying rule: $@
----- rule fails
-----trying rule: $*
-----rule matches: $: $1 < @ >
rewritten as: jared @ perfume-oil . com < @ >
-----trying rule: $* < $* > $* < @ >
----- rule fails
-----trying rule: @ $* < @ >
----- rule fails
-----trying rule: $* [ IPv6 : $+ ] < @ >
----- rule fails
-----trying rule: $* : : $* < @ >
----- rule fails
-----trying rule: : include : $* < @ >
----- rule fails
-----trying rule: $* : $* [ $* ]
----- rule fails
-----trying rule: $* : $* < @ >
----- rule fails
-----trying rule: $* < @ >
-----rule matches: $: $1
rewritten as: jared @ perfume-oil . com
-----trying rule: $* ;
----- rule fails
-----trying rule: $* < $+ : ; > $*
----- rule fails
-----trying rule: $* < $* ; >
----- rule fails
-----trying rule: $@
----- rule fails
-----trying rule: $*
-----rule matches: $: < $1 >
rewritten as: < jared @ perfume-oil . com >
-----trying rule: $+ < $* >
----- rule fails
-----trying rule: < $* > $+
----- rule fails
-----trying rule: < >
----- rule fails
-----trying rule: < $+ >
-----rule matches: $: $1
rewritten as: jared @ perfume-oil . com
-----trying rule: @ $+ , $+
----- rule fails
-----trying rule: @ [ $* ] : $+
----- rule fails
-----trying rule: @ $+ : $+
----- rule fails
-----trying rule: $+ : $* ; @ $+
----- rule fails
-----trying rule: $+ : $* ;
----- rule fails
-----trying rule: $+ @ $+
-----rule matches: $: $1 < @ $2 >
rewritten as: jared < @ perfume-oil . com >
-----trying rule: $+ < $+ @ $+ >
----- rule fails
-----trying rule: $+ < @ $+ >
-----rule matches: $@ $> Canonify2 $1 < @ $2 >
Canonify2          input: jared < @ perfume-oil . com >
-----trying rule: $* < @ localhost > $*
----- rule fails
-----trying rule: $* < @ localhost . milleniumcare . com > $*
----- rule fails
-----trying rule: $* < @ localhost . UUCP > $*
----- rule fails
-----trying rule: $* < @ [ $+ ] > $*
----- rule fails
-----trying rule: $* < @ @ $=w > $*
----- rule fails
-----trying rule: $* < @ @ $+ > $*
----- rule fails
-----trying rule: $* < @ $+ . UUCP > $*
----- rule fails
-----trying rule: $* < @ $+ . . UUCP . > $*
----- rule fails
-----trying rule: $* < @ $* $=P > $*
----- rule fails
-----trying rule: $* < @ $* $~P > $*
-----rule matches: $: $&{daemon_flags} $| $1 < @ $2 $3 > $4
rewrite: RHS $&{daemon_flags} => "(NULL)"
rewritten as: $| jared < @ perfume-oil . com >
-----trying rule: $* CC $* $| $* < @ $+ . $+ > $*
----- rule fails
-----trying rule: $* CC $* $| $*
----- rule fails
-----trying rule: $* $| $* < @ $* > $*
-----rule matches: $: $2 < @ $[ $3 $] > $4
map_lookup(host, perfume-oil.com) => perfume-oil.com. (0)
rewritten as: jared < @ perfume-oil . com . >
-----trying rule: $* $| $*
----- rule fails
-----trying rule: $* < @ $=w > $*
----- rule fails
-----trying rule: $* < @ $=M > $*
----- rule fails
-----trying rule: $* < @ $={VirtHost} > $*
----- rule fails
-----trying rule: $* < @ $* . . > $*
----- rule fails
Canonify2        returns: jared < @ perfume-oil . com . >
rewritten as: jared < @ perfume-oil . com . >
canonify         returns: jared < @ perfume-oil . com . >
2                  input: jared < @ perfume-oil . com . >
2                returns: jared < @ perfume-oil . com . >
parse              input: jared < @ perfume-oil . com . >
-----trying rule: $*
-----rule matches: $: $> Parse0 $1
Parse0             input: jared < @ perfume-oil . com . >
-----trying rule: < @ >
----- rule fails
-----trying rule: $* : $* ; < @ >
----- rule fails
-----trying rule: @ < @ $* >
----- rule fails
-----trying rule: < @ $+ >
----- rule fails
-----trying rule: $+ < @ >
----- rule fails
-----trying rule: $*
-----rule matches: $: < > $1
rewritten as: < > jared < @ perfume-oil . com . >
-----trying rule: < > $* < @ [ $* ] : $+ > $*
----- rule fails
-----trying rule: < > $* < @ [ $* ] , $+ > $*
----- rule fails
-----trying rule: < > $* < @ [ $* ] $+ > $*
----- rule fails
-----trying rule: < > $* < @ [ $+ ] > $*
----- rule fails
-----trying rule: < > $* < $* : $* > $*
----- rule fails
-----trying rule: < > $*
-----rule matches: $1
rewritten as: jared < @ perfume-oil . com . >
-----trying rule: < > $*
----- rule fails
-----trying rule: $* < @ . $* > $*
----- rule fails
-----trying rule: $* < @ $* . . $* > $*
----- rule fails
-----trying rule: $* < @ $* @ > $*
----- rule fails
-----trying rule: $* @ $* < @ $* > $*
----- rule fails
-----trying rule: $* , $~O $*
----- rule fails
-----trying rule: $* < @ > $*
----- rule fails
-----trying rule: < @ $=w . > : $*
----- rule fails
-----trying rule: $- < @ $=w . >
----- rule fails
-----trying rule: < @ $+ >
----- rule fails
-----trying rule: $* $=O $* < @ $=w . >
----- rule fails
-----trying rule: $-
----- rule fails
-----trying rule: < @ *LOCAL* >
----- rule fails
-----trying rule: $* $=O $* < @ *LOCAL* >
----- rule fails
-----trying rule: $* < @ *LOCAL* >
----- rule fails
Parse0           returns: jared < @ perfume-oil . com . >
rewritten as: jared < @ perfume-oil . com . >
-----trying rule: < @ >
----- rule fails
-----trying rule: $*
-----rule matches: $: $> ParseLocal $1
-----skip subr ParseLocal (98)
rewritten as: jared < @ perfume-oil . com . >
-----trying rule: $*
-----rule matches: $: $> Parse1 $1
Parse1             input: jared < @ perfume-oil . com . >
-----trying rule: $* < @ [ $+ ] > $*
----- rule fails
-----trying rule: $* < @ [ $+ ] > $*
----- rule fails
-----trying rule: $* < @ [ $+ ] : > $*
----- rule fails
-----trying rule: $* < @ [ $+ ] : $- : $* > $*
----- rule fails
-----trying rule: $* < @ [ $+ ] : $+ > $*
----- rule fails
-----trying rule: $+
-----rule matches: $: < ! > $1
rewritten as: < ! > jared < @ perfume-oil . com . >
-----trying rule: < ! > $+ < @ $={VirtHost} . >
----- rule fails
-----trying rule: < ! > $+ < @ $=w . >
----- rule fails
-----trying rule: < @ > $+ + $+ < @ $* . >
----- rule fails
-----trying rule: < @ > $+ + $* < @ $* . >
----- rule fails
-----trying rule: < @ > $+ + $* < @ $* . >
----- rule fails
-----trying rule: < @ > $+ + $+ < @ $+ . >
----- rule fails
-----trying rule: < @ > $+ + $* < @ $+ . >
----- rule fails
-----trying rule: < @ > $+ + $* < @ $+ . >
----- rule fails
-----trying rule: < @ > $+ < @ $+ . >
----- rule fails
-----trying rule: < @ > $+
----- rule fails
-----trying rule: < ! > $+
-----rule matches: $: $1
rewritten as: jared < @ perfume-oil . com . >
-----trying rule: < error : $- . $- . $- : $+ > $*
----- rule fails
-----trying rule: < error : $- $+ > $*
----- rule fails
-----trying rule: < $+ > $+ < @ $+ >
----- rule fails
-----trying rule: $=L < @ $=w . >
----- rule fails
-----trying rule: $+ < @ $=w . >
----- rule fails
-----trying rule: $* < @ $* > $*
-----rule matches: $: $> MailerToTriple < > $1 < @ $2 > $3
MailerToTriple     input: < > jared < @ perfume-oil . com . >
-----trying rule: < > $*
-----rule matches: $@ $1
rewritten as: jared < @ perfume-oil . com . >
MailerToTriple   returns: jared < @ perfume-oil . com . >
rewritten as: jared < @ perfume-oil . com . >
-----trying rule: $* < @ $* > $*
-----rule matches: $# esmtp $@ $2 $: $1 < @ $2 > $3
rewritten as: $# esmtp $@ perfume-oil . com . $: jared < @ perfume-oil . com . >
Parse1           returns: $# esmtp $@ perfume-oil . com . $: jared < @ perfume->
rewritten as: $# esmtp $@ perfume-oil . com . $: jared < @ perfume-oil . com . >
parse            returns: $# esmtp $@ perfume-oil . com . $: jared < @ perfume->
0
 
magitekAuthor Commented:
jlevie:

I removed DOMAIN(milleniumcare.com)dnl from my sendmail.mc and remade and reinstalled the sendmail.cf file, and then I restarted sendmail, and the problem still exists.

In the following:
>root@magiteck:/etc/mail# sendmail -bt
>ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
>Enter <ruleset> <address>
>> $=w
>magiteck.milleniumcare.com
>magiteck
>[192.168.1.103]
>localhost
>[127.0.0.1]
>> /map virtuser jared@perfume-oil.com
>map_lookup: virtuser (jared@perfume-oil.com) returns jared (0)

shouldn't the $=w also come up with the perfume-oil.com?
Is there something special I have to do to get sendmail to read it from the local-host-names file?
0
 
magitekAuthor Commented:
Bingo!

jlevie, your removing the DOMAIN string likely had something to do with it, but there was one more piece missing also!

FEATURE(`use_cw_file')
was missing from the sendmail.mc file.  This string is required to force sendmail to read the local-host-names file.  That added perfume-oil.com to class w, and bingo, messages went through.

All is now working good!

PsiCop, you gave me a lot of great background info to go off of, and jlevie, you offered me the great idea to remove the DOMAIN line.  For points, I'm going to award this question to jlevie, and the original post in the Linux forum, I'm going to award to PsiCop and post a link to this thread.  That way you'll both get some points.

Thanks for all your help!

Jared
0
 
PsiCopCommented:
Yeah, looks like it was a combination of issues, including address-rewriting. Glad its working.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now