OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 

From: Tom Ryan (tom.ryanwhitehorsestrategic.com)
Date: Sun Mar 02 2003 - 18:40:33 CST


I've got an OpenBSD 3.2-release mailserver that recieves mail for a couple
of domains, let's say: eg1.com and eg2.com. I'm running postfix-1.1.11 from
packages. I use /etc/mail/aliases a fair bit.

In almost all cases it's fine for addy1eg1.com and addy1eg2.com to go to
the same local recipient. In fact, it's desired behaviour in all cases but
one: the addresses exceptioneg1.com and exceptioneg2.com need to go to
different local users.

I understand from man 5 virtual that I want to start using "sendmail-style"
virtual domains, primarily to avoid: 1, changing things unnecessarily and 2,
so that I can continue to use /etc/mail/aliases. So, here's the steps I'm
going through:

in /etc/postfix/virtual:
exceptioneg1.com user1
exceptioneg2.com user2

I've tried some variations on that, including 'user1localhost' and putting
a line like "DOMAIN eg1.com" in immediately above each of the two aliases.

next:
$ sudo /usr/local/sbin/postmap /etc/postfix/virtual

No response, looks good.

Initially I didn't, but I've since done a "postfix reload" here, too.
Didn't seem to make a difference.

Now, if I try to send mail to exception eg1.com or eg2.com, I get the
following back:
This is the Postfix program at host mx.eg1.com.
-snip-
<exceptioneg1.com>: unknown user: "exception"

There is no local user or alias for "exception", he's only mentioned in
/etc/postfix/virtual. However, user1 and user2 can both receive mail
without issue.

It looks like the worst case scenario is a teensy bit of work to convert my
aliases file into a nice format for virtual. Not a big deal. But I'd rather
do this The Right Way if possible, not with what would essentially be a
workaround. I expect that this would be a common problem in the case of
accounts such as webmaster.

Maillog excerpt follows. If there's any other info that would be helpful
just sing out, I'll be most happy to oblige.

thanks,
tom ryan.

-------maillog entry--------------
Feb 28 12:06:44 mail2 postfix/smtpd[27582]: connect from unknown[10.0.0.10]
Feb 28 12:06:44 mail2 postfix/smtpd[27582]: 8174C3E5DD:
client=unknown[10.0.0.10]
Feb 28 12:06:44 mail2 postfix/cleanup[22206]: 8174C3E5DD:
message-id=<NGBBLEHFGDKBCFIDCKKFGEGICIAA.tom.ryanwhitehorsestrategic.com>
Feb 28 12:06:44 mail2 postfix/qmgr[2213]: 8174C3E5DD:
from=<tom.ryanwhitehorsestrategic.com>, size=702, nrcpt=1 (queue active)
Feb 28 12:06:44 mail2 ravpostfix[12340]: data received... begin scanning...
Feb 28 12:06:44 mail2 ravpostfix[12340]: scanning returns OK... sending
file...
Feb 28 12:06:44 mail2 postfix/smtpd[28247]: connect from
localhost.whitehorsestrategic.com[127.0.0.1]
Feb 28 12:06:44 mail2 postfix/smtpd[27582]: disconnect from
unknown[10.0.0.10]
Feb 28 12:06:44 mail2 postfix/smtpd[28247]: C5F9A3E5EF:
client=localhost.whitehorsestrategic.com[127.0.0.1]
Feb 28 12:06:45 mail2 postfix/cleanup[22206]: C5F9A3E5EF:
message-id=<NGBBLEHFGDKBCFIDCKKFGEGICIAA.tom.ryanwhitehorsestrategic.com>
Feb 28 12:06:45 mail2 postfix/smtpd[28247]: disconnect from
localhost.whitehorsestrategic.com[127.0.0.1]
Feb 28 12:06:45 mail2 postfix/smtp[28093]: 8174C3E5DD:
to=<exceptioneg1.com>, relay=127.0.0.1[127.0.0.1], delay=1, status=sent
(250 Ok)
Feb 28 12:06:45 mail2 postfix/qmgr[2213]: C5F9A3E5EF:
from=<tom.ryanwhitehorsestrategic.com>, size=908, nrcpt=1 (queue active)
Feb 28 12:06:45 mail2 postfix/local[27509]: C5F9A3E5EF:
to=<exceptioneg1.com>, relay=local, delay=1, status=bounced (unknown user:
"exception")
Feb 28 12:06:45 mail2 postfix/cleanup[22206]: 22E8C3E5DD:
message-id=<20030228010645.22E8C3E5DDmail2.whitehorsestrategic.com>
Feb 28 12:06:45 mail2 postfix/qmgr[2213]: 22E8C3E5DD: from=<>, size=2623,
nrcpt=1 (queue active)
Feb 28 12:06:45 mail2 postfix/local[27509]: 22E8C3E5DD:
to=<tmrmail2.whitehorsestrategic.com>, relay=local, delay=0, status=sent
(maildir)
----------------------------------