0

I'm on Solaris 5.11 running sendmail. Local usernames are of the form <letters><numbers> (e.g. hn06511). In the past we used aliases to make point to <username>@olddomain.com.

<username> <username>@olddomain.com

Now there's a new email address scheme and a new domain. Now email addresses are of the form <firstname>.<lastname>@newdomain.com.

So I changed the aliases to be:

<username> <firstname>.<lastname>@newdomain.com

This works, however <username>@olddomain.com no longer works. To add insult to injury, there are many scripts with hardcoded email addresses to the old style.

So I want to change <username>@olddomain.com -> <firstname><lastname>@newdomain.com. I thought I could use virtusertables to accomplish this so I made a virtusertable that contains:

@olddomain.com %1

Supposedly that should take <anybody>@olddomain.com and route it to just the username (%1). I hoped that then the aliases I have defined would translate <username> -> <firstname>.<lastname>@newdomain.com. But as far as I can see sendmail is ignoring this virtusertable completely and attempting delivery to <username>@olddomain.com and, of course, failing.

AFAICT I formated the virtusertable properly and ran makemap (should I be using dbm or hash? I've seen both). AFAICT I have put in the proper FEATURE and done the make and made sure the generated sendmail.cf is in the proper place. I've seen FEATURE expressed as both

FEATURE(virtusertable',dbm -o /etc/mail/virtusertable')

and

FEATURE(virtusertable',hash -o /etc/mail/virtusertable')

But neither work.

What kind of debugging or other info can I provide and try?

Thanks in advance.

1 Answers1

0

virtusertable debug commands for user root

Look for @oldomain.com entry in virtusertable

echo '/map virtusertable xxx@oldomain.com' | sendmail -bt

Check if sendmail checks virtusertable for olddomain.com email addresses

echo '3,0 john.doe@olddomain.com' | sendmail -d60.5 -bt

-d60.5 tracks maps' lookups (also virtusertable lookups).


More hints:

  1. m4 expects another quoting

    FEATURE(virtusertable,`hash /etc/mail/virtusertable')
    
  2. Do not make virtusertable optional. Remove -o from the FEATURE line.
    With -o sendmail ignores missing virtusertable.

  3. Sendmail uses compiled version of virtusertable. Use makemap to compile virtusertable.

  4. virtusertable is consulted only for local email domains ($=w) and $={VirtHost} domains.

    Use the command below as root to get both list of domains

    echo '$=w' | sendmail -bt
    echo '$={VirtHost}' | sendmail -bt
    
AnFi
  • 6,326