OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
virtual(5): aliasing an address to itself?

From: /dev/rob0 (rob0gmx.co.uk)
Date: Tue Oct 25 2005 - 13:28:53 CDT


Example.com is a relay domain to Postfix on my server. It relays to a
qmail/vpopmail which happens to be running on the same machine. I
could, and probably should, convert it to virtual(8) delivery but not
today. $mydestination is mail.example.com, which is unused.

Today's problem is that they want one mailbox, doubleexample.com, to
deliver to 2 places: a mailbox and a script. The mail will arrive at
Postfix as "RCPT TO: <doubleexample.com>". No rewriting takes place,
and it's handed off to the qmail on localhost.

Could I use a virtual alias to deliver to the same address ...
virtual_alias:
doubleexample.com doublemail.example.com, doubleexample.com

Or would that create a loop? Do I need to rewrite doubleexample.com to
a local(8) class address and then use aliases(5) to deliver one and
send a copy on to the qmail/vpopmail mailbox? Or ... would that loop
too?

I can probably do this using a dot-qmail(5) file, but eventually I'll
eliminate qmail here anyway, and I'd also have to hassle with the user
permissions (delivery takes place as the vpopmail user.) I think doing
this in Postfix would be much cleaner.

Oh wait: GIMF:
http://archives.neohapsis.com/archives/postfix/2004-02/2922.html

Wietse's example shows this being done, although I'm not sure how it
works in the context of a relay domain. doubleexample.com isn't going
to be expanded again, is it?

Thanks, I know I am being dense here, $STANDARD_EXCUSES ... :)
--
    mail to this address is discarded unless "/dev/rob0"
    or "not-spam" is in Subject: header