Multiple aliases - user unknown

Multiple aliases - user unknown

am 03.10.2007 05:23:05 von Darren Satkunas

I'm attempting to get sendmail to recognize 2 separate alias files.
I've managed to get sendmail to recognize both of them when
initializing the database.


ls -la /etc/ | grep alias

-rw-r--r-- 1 root root 14390 Oct 2 18:51 aliases
-rw-r----- 1 root smmsp 40960 Oct 2 19:09 aliases.db
lrwxrwxrwx 1 root root 52 Oct 2 18:15 aliasesB -> /path/to/
other/aliases
-rw-r----- 1 root smmsp 24576 Oct 2 19:09 aliasesB.db


In the second aliases file (aliasesB) I added 'usertest:' aliased to
user@domain.com. This alias does not exist in the orginal aliases
file, only the second.


sendmail -bi

/etc/aliases: 417 aliases, longest 69 bytes, 12098 bytes total
/etc/aliasesB: 342 aliases, longest 69 bytes, 11228 bytes total


Sendmail successfully translated the alias when queried.


sendmail -bv usertest

user@domain.com... deliverable: mailer esmtp, host domain.com., user
user@domain.com


However whenever I send this user an email I get thrown a user unknown
error.


cat /var/log/maillog | grep usertest | tail -2

Oct 2 18:36:56 centos sendmail[23251]: l931auB7023251:
... User unknown
Oct 2 18:36:56 centos sendmail[23250]: l931auIr023250:
to=usertest@domain.com, ctladdr=root (0/0), delay=00:00:00,
xdelay=00:00:00, mailer=relay, pri=30321, relay=[127.0.0.1]
[127.0.0.1], dsn=5.1.1, stat=User unknown


There's nothing in /var/log/messages to indicate a problem such as
SELinux. Has anyone worked through a similar problem?

Re: Multiple aliases - user unknown

am 03.10.2007 15:44:54 von jnemeth

Darren Satkunas (aluzion@gmail.com) wrote:
: I'm attempting to get sendmail to recognize 2 separate alias files.
: I've managed to get sendmail to recognize both of them when
: initializing the database.


: ls -la /etc/ | grep alias

: -rw-r--r-- 1 root root 14390 Oct 2 18:51 aliases
: -rw-r----- 1 root smmsp 40960 Oct 2 19:09 aliases.db
: lrwxrwxrwx 1 root root 52 Oct 2 18:15 aliasesB -> /path/to/
: other/aliases
: -rw-r----- 1 root smmsp 24576 Oct 2 19:09 aliasesB.db


: In the second aliases file (aliasesB) I added 'usertest:' aliased to
: user@domain.com. This alias does not exist in the orginal aliases
: file, only the second.


: sendmail -bi

: /etc/aliases: 417 aliases, longest 69 bytes, 12098 bytes total
: /etc/aliasesB: 342 aliases, longest 69 bytes, 11228 bytes total


: Sendmail successfully translated the alias when queried.


: sendmail -bv usertest

: user@domain.com... deliverable: mailer esmtp, host domain.com., user
: user@domain.com


: However whenever I send this user an email I get thrown a user unknown
: error.


: cat /var/log/maillog | grep usertest | tail -2

: Oct 2 18:36:56 centos sendmail[23251]: l931auB7023251:
: ... User unknown
: Oct 2 18:36:56 centos sendmail[23250]: l931auIr023250:
: to=usertest@domain.com, ctladdr=root (0/0), delay=00:00:00,
: xdelay=00:00:00, mailer=relay, pri=30321, relay=[127.0.0.1]
: [127.0.0.1], dsn=5.1.1, stat=User unknown


: There's nothing in /var/log/messages to indicate a problem such as
: SELinux. Has anyone worked through a similar problem?


I just put a line like this in my .mc file and never had any problems:

define(`ALIAS_FILE', `/etc/mail/aliases,/etc/mail/aliasesB')dnl

Re: Multiple aliases - user unknown

am 03.10.2007 20:44:02 von Darren Satkunas

>
> I just put a line like this in my .mc file and never had any problems:
>
> define(`ALIAS_FILE', `/etc/mail/aliases,/etc/mail/aliasesB')dnl

This is exactly what I did to get sendmail to recognize both aliases
files. initializing the alias database from both files and verifying
the name works fine. Alas there is still a problem during transport.

Re: Multiple aliases - user unknown

am 04.10.2007 00:39:28 von per

In article <1191381785.327277.271220@n39g2000hsh.googlegroups.com>
Darren Satkunas writes:
>
>sendmail -bi
>
>/etc/aliases: 417 aliases, longest 69 bytes, 12098 bytes total
>/etc/aliasesB: 342 aliases, longest 69 bytes, 11228 bytes total
>
>
>Sendmail successfully translated the alias when queried.
>
>
>sendmail -bv usertest
>
>user@domain.com... deliverable: mailer esmtp, host domain.com., user
>user@domain.com
>
>
>However whenever I send this user an email I get thrown a user unknown
>error.

Did you restart the sendmail daemon after having modified sendmail.cf to
add the second alias file? Your two commands above read sendmail.cf when
you invoke them, the daemon only reads it at startup. (Um, sendmail
*always* reads the file only on startup, but your commands cause a
startup of sendmail.:-)

--Per Hedeland
per@hedeland.org