?
Solved

Virtual host problem with sendmail - please help!

Posted on 2005-02-28
8
Medium Priority
?
836 Views
Last Modified: 2013-12-18
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
Comment
Question by:magitek
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 34

Expert Comment

by:PsiCop
ID: 13423536
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
 

Author Comment

by:magitek
ID: 13423722
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
 
LVL 34

Expert Comment

by:PsiCop
ID: 13424029
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!

 
LVL 40

Accepted Solution

by:
jlevie earned 750 total points
ID: 13424243
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
 

Author Comment

by:magitek
ID: 13424379
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
 

Author Comment

by:magitek
ID: 13424730
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
 

Author Comment

by:magitek
ID: 13424943
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
 
LVL 34

Expert Comment

by:PsiCop
ID: 13430091
Yeah, looks like it was a combination of issues, including address-rewriting. Glad its working.
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
In this article we will learn how to backup a VMware farm using Nakivo Backup & Replication. In this tutorial we will install the software on a Windows 2012 R2 Server.
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
Suggested Courses

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question