PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Logiciels d'hébergement > comp.mail.sendmail > Change
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.mail.sendmail Configuring and using the BSD sendmail agent.

Change

Réponse
 
LinkBack Outils de la discussion
Vieux 20/10/2006, 10h12   #1
slonic@cg.yu
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Change

HI

I would like to change just the part of username (of recipient).
I want to rewrite the any adrress 123xxx@dom.com to 321xxx@dom.com (to
change 123 with 321).
For example 123911@dom.com to 321911@dom.com

Can somebody show me the way this should be done

Thanks

  Réponse avec citation
Vieux 20/10/2006, 12h38   #2
jmaimon@ttec.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Change


slonic@cg.yu wrote:
> HI
>
> I would like to change just the part of username (of recipient).
> I want to rewrite the any adrress 123xxx@dom.com to 321xxx@dom.com (to
> change 123 with 321).
> For example 123911@dom.com to 321911@dom.com
>
> Can somebody show me the way this should be done
>
> Thanks


Perhaps all you need is the virtusertable feature.

See cf/README

virtusertable A domain-specific form of aliasing, allowing multiple
virtual domains to be hosted on one machine. For
example,
if the virtuser table contains:

info@foo.com foo-info
info@bar.com bar-info
joe@bar.com error:nouser 550 No such user
here
jax@bar.com error:5.7.0:550 Address invalid
@baz.org jane@example.net

(there is lots more there)

To extend this to support localpart only rewriting see

http://www.jmaimon.com/sendmail
http://www.jmaimon.com/sendmail/patc...oto.m4.3.patch

Or there is the genericstable, aliases and address rewriting in either
localaddr or parseaddr.

  Réponse avec citation
Vieux 20/10/2006, 15h01   #3
slonic@cg.yu
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Change


Thanks for reply!

If I understood well I need to install some additional stuff to
Sendmail? I preffer not to do it because my sendmail serving live
service and I am not so good.

Is there any other way that not require additional installing and
similar things?

  Réponse avec citation
Vieux 20/10/2006, 17h20   #4
jmaimon@ttec.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Change

slonic@cg.yu wrote:
> Thanks for reply!
>
> If I understood well I need to install some additional stuff to
> Sendmail? I preffer not to do it because my sendmail serving live
> service and I am not so good.
>
> Is there any other way that not require additional installing and
> similar things?


I dont understand what you are trying to achieve well enough to answer
any more than I already did.

If you are trying to do exactly as your example shows, than vanilla
virtusetable with or without virtuserdomains (if the domains arent
local) will do just fine.

  Réponse avec citation
Vieux 20/10/2006, 18h17   #5
slonic@cg.yu
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Change


jmaimon@ttec.com wrote:
> slonic@cg.yu wrote:
> > Thanks for reply!
> >
> > If I understood well I need to install some additional stuff to
> > Sendmail? I preffer not to do it because my sendmail serving live
> > service and I am not so good.
> >
> > Is there any other way that not require additional installing and
> > similar things?

>
> I dont understand what you are trying to achieve well enough to answer
> any more than I already did.
>
> If you are trying to do exactly as your example shows, than vanilla
> virtusetable with or without virtuserdomains (if the domains arent
> local) will do just fine.


Hi and sorry if I was confusing.
I'll try to explain what exactly I want to have.
Mails addressed to:
123000000@domain.com
123000001@domain.com
.....................................
123999998@domain.com
123999999@domain.com


should be delivered to
321000000@domain.com
321000001@domain.com
.....................................
321999998@domain.com
321999999@domain.com
respectively.
So, instead of having 999999 entries in some place i would like to have
few lines that change first three characters of user part. This should
happen only if those three lchars are 123 (they should be changed to
321). Rest of user part should remains as it was before.

Hope this is understandable.

Thanks

  Réponse avec citation
Vieux 20/10/2006, 18h32   #6
jmaimon@ttec.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Change


slonic@cg.yu wrote:

>
> 321999998@domain.com
> 321999999@domain.com
> respectively.
> So, instead of having 999999 entries in some place i would like to have
> few lines that change first three characters of user part. This should
> happen only if those three lchars are 123 (they should be changed to
> 321). Rest of user part should remains as it was before.
>
> Hope this is understandable.
>
> Thanks


Since sendmail tokenizing means that you will have few chances to deal
with a subset of the localpart you may be best off by constructing a
program map shell script that does the translation you want

(see doc/op/op.txt)

Then you can follow the suggestions in this post (is there a new/better
way?) to get sendmail to use both your map and the normal virtusertable
map.

http://groups.google.com/group/comp....0dc128847b4ce5

  Réponse avec citation
Vieux 21/10/2006, 15h49   #7
Per Hedeland
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Change

In article <1161365556.660140.59860@b28g2000cwb.googlegroups. com>
"jmaimon@ttec.com" <jmaimon@ttec.com> writes:
>
>slonic@cg.yu wrote:
>
>>
>> 321999998@domain.com
>> 321999999@domain.com
>> respectively.
>> So, instead of having 999999 entries in some place i would like to have
>> few lines that change first three characters of user part. This should
>> happen only if those three lchars are 123 (they should be changed to
>> 321). Rest of user part should remains as it was before.
>>
>> Hope this is understandable.
>>
>> Thanks

>
>Since sendmail tokenizing means that you will have few chances to deal
>with a subset of the localpart you may be best off by constructing a
>program map shell script that does the translation you want


Well, it should be doable with a regex map.

>(see doc/op/op.txt)


Ditto.

>Then you can follow the suggestions in this post (is there a new/better
>way?) to get sendmail to use both your map and the normal virtusertable
>map.
>
>http://groups.google.com/group/comp....0dc128847b4ce5


If you want to combine different maps into one (i.e. not just different
*text files*, where you're better off sending the concatenation as input
to makemap), that's still the way to go AFAIK. Not sure if it's needed
here though, it seems clear that the OP isn't using the virtusertable
already so this could be used as the *only* map for virtusertable - or
it could just be a couple of custom rules for LOCAL_RULE_0.

--Per Hedeland
per@hedeland.org
  Réponse avec citation
Vieux 23/10/2006, 17h28   #8
slonic@cg.yu
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Change

Hi,
i have tried with regex. In that way from initial 123000000@domain.com
I can get 321 000000 @ domain . com
Because of space between 321 and 000000 final result will be
321.000000@domain.com which is not good for me.
Is there any chance to fix this (remove space)?
Thanks

Per Hedeland wrote:
> In article <1161365556.660140.59860@b28g2000cwb.googlegroups. com>
> "jmaimon@ttec.com" <jmaimon@ttec.com> writes:
> >
> >slonic@cg.yu wrote:
> >
> >>
> >> 321999998@domain.com
> >> 321999999@domain.com
> >> respectively.
> >> So, instead of having 999999 entries in some place i would like to have
> >> few lines that change first three characters of user part. This should
> >> happen only if those three lchars are 123 (they should be changed to
> >> 321). Rest of user part should remains as it was before.
> >>
> >> Hope this is understandable.
> >>
> >> Thanks

> >
> >Since sendmail tokenizing means that you will have few chances to deal
> >with a subset of the localpart you may be best off by constructing a
> >program map shell script that does the translation you want

>
> Well, it should be doable with a regex map.
>
> >(see doc/op/op.txt)

>
> Ditto.
>
> >Then you can follow the suggestions in this post (is there a new/better
> >way?) to get sendmail to use both your map and the normal virtusertable
> >map.
> >
> >http://groups.google.com/group/comp....0dc128847b4ce5

>
> If you want to combine different maps into one (i.e. not just different
> *text files*, where you're better off sending the concatenation as input
> to makemap), that's still the way to go AFAIK. Not sure if it's needed
> here though, it seems clear that the OP isn't using the virtusertable
> already so this could be used as the *only* map for virtusertable - or
> it could just be a couple of custom rules for LOCAL_RULE_0.
>
> --Per Hedeland
> per@hedeland.org


  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 19h18.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,17138 seconds with 16 queries