[Mimedefang] Enumerate Email Address parts

Steffen Kaiser skmimedefang at smail.inf.fh-bonn-rhein-sieg.de
Wed Feb 3 09:41:25 EST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 3 Feb 2010, Brian Shallenberger wrote:

> Sender email address:  Joe at abc.com
>
> Need to get 'Joe' and make the recipient's email address:  Joe at abc.local
>
> The abc.com and abc.local will not change.
>
> The purpose is to archive email for each user to an individual user account
> on our local server.  The only way I can see to do it (with my current

my $rcp = $Sender;
if($rcp =~ s/\@example\.net(>?)$/\@example.local$1/i) {
 	add_recipient($rcpt);
}

- -or-

if($Sender =~ /^<?(.+?)\@example\.net>?$/i) {
 	add_recipient($1 . '@example.local');
}

- -or-

...

(You know, there is always more than one way to skin a cat )

regards,

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBS2mLF0gddVksjRnHAQLvaQf/XbOS9e33R7S7T1fL+zmyYMSfsSlBe0UQ
BkDQcE9an1ZvNBrfKo2+admURNrkntvsSmNmcwbwgpQ3vqRvRfxDMp0XRQ/DENWL
EBBqCX9NRwyF5GkWX94GIX0RtSX68ioDtB1DxBHEK2Cb7uWG/+UusYmpOaQfzI93
1L2gD/ddHJxgDxbkUXuptNTBNRwwizhqFJg8VQhv8KjxxW/OMcfzmrcor1zpiAuL
6EA1/dAA0kcJ0AJF3o/1t814Xbn6I4QzCJgdxQaI7i66unUDqHCPSid6V42Yv20Z
KscrzhZF9eWo1berrGa9Y3r1/1bVwnLjQYlNGRHTYPkWsTDRYv/ZYQ==
=QAZ6
-----END PGP SIGNATURE-----



More information about the MIMEDefang mailing list