OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: [newbie question] RegExp on Postfix

From: Noel Jones (njonesmegan.vbhcs.org)
Date: Thu Sep 01 2005 - 13:31:37 CDT


At 07:04 AM 9/1/2005, Jug Mensenares wrote:
>Hi everyone! The last time I administered a Postfix server was 3
>years ago so i hope the list would be very forgiving. Hehe
>
>I've just finished installing and configuring
>postfix-2.1.5-4.2.RHEL4 on CentOS. I've configured it and confirmed
>that I can already send and receive emails. What I need to do now is
>be able to accept emails for
><mailto:acctNNNNNNNNmydomain.com>acctNNNNNNNNmydomain.com, where N
>is any number, and deliver it to a particular mailbox. I'm quite lost.

Use a regexp virtual_alias_maps. Something like this should do:

# main.cf
virtual_alias_maps = regexp:/etc/postfix/virtual.regexp

# virtual.regexp
/^acct[0-9]+example\.com$/ userexample.com

Note changes to regexp files are not detected automatically, so run
"postfix reload" after you edit virtual.regexp.

Also, please click the "Plain Text" button when composing list mail in Gmail.

--
Noel Jones