$ tail sendmail.mc
...
dnl
----------------------------------------------------------------------------
LOCAL_CONFIG
Kcheckaddress regex -a@MATCH ^genericuser[+-]
somevariablestring<@mydomain.com.>
dnl
----------------------------------------------------------------------------
LOCAL_RULESETS
SLocal_check_mail
R$* $: $>Parse0 $>3 $1
R$+ $: $(checkaddress $1 $)
R@MATCH $#local $: genericuser
dnl
----------------------------------------------------------------------------
$ sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> Local_check_mail <genericuser-som...@mydomain.com>
Local_check_mail input: < user-somevariablestring @ mydomain . com >
canonify input: < user-somevariablestring @ mydomain . com >
Canonify2 input: user-somevariablestring < @ mydomain . com >
Canonify2 returns: user-somevariablestring < @ mydomain . com .
>
canonify returns: user-somevariablestring < @ mydomain . com .
>
Parse0 input: user-somevariablestring < @ mydomain . com .
>
Parse0 returns: user-somevariablestring < @ mydomain . com .
>
Local_check_mail returns: $# local $: genericuser
$ telnet mail.mydomain.com 25
Trying 1.2.3.4...
Connected to mail.mydomain.com.
Escape character is '^]'.
220 mail.mydomain.com ESMTP; Mon, 2 Mar 2009 16:08:40 +0100
helo test
250 mail.mydomain.com Hello test [127.0.0.1], pleased to meet you
mail from: <myu...@mydomain.com>
250 2.1.0 <myu...@mydomain.com>... Sender ok
rcpt to: <genericuser-som...@mydomain.com>
550 5.1.1 <genericuser-som...@mydomain.com>... User
unknown
quit
221 2.0.0 mail.mydomain.com closing connection
Connection closed by foreign host.
> [...]
Rewrite '-' separator to '+' separator and allow sendmail handle
deliveries to 'user+detail' as usual (with 'user' as the final try).
LOCAL_CONFIG
Kplus regex -s1,2 -d+ ^(genericsuser)-([0-9a-z]{1,32})$
LOCAL_RULE_0
R$+ <@$=w.> $* $: $(plus $1 $: $1 $) <@$2.> $3
http://groups.google.com/group/comp.mail.sendmail/msg/6c92c14e01082f5e?dmode=source
From: Andrzej Filip <a...@priv.onet.pl>
Newsgroups: comp.mail.sendmail
Subject: Re: Handling sites that don't support plussed addressing
Date: Wed, 22 Oct 2003 09:49:00 +0000
Message-ID: <bn5fr8$6uh$1...@anfi.freeshell.org>
--
[pl>en Andrew] Andrzej Adam Filip : an...@onet.eu : an...@xl.wp.pl
Open-Sendmail: http://open-sendmail.sourceforge.net/
Linux: Where Don't We Want To Go Today?
-- Submitted by Pancrazio De Mauro, paraphrasing some well-known sales talk
whoah! that was quick
thx a lot, it works and is much cleaner this way
i did not know you could use regex within the user field only
something learned, something gained... ;-)
thx again
regards
hoyte