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 > Rewrite env From based on header From: ?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.mail.sendmail Configuring and using the BSD sendmail agent.

Rewrite env From based on header From: ?

Réponse
 
LinkBack Outils de la discussion
Vieux 14/05/2007, 11h48   #1
HH
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Rewrite env From based on header From: ?

I'd like to rewrite the envelope MAIL FROM address (if it is a certain
address) and substitute it with the header FROM: address if that one is
one of a certain set, e.g.
- if envelope MAIL FROM: <aaaa@b.c>
- and header FROM: <xxxx@y.z>
then set the envelope MAIL FROM: <xxxx@y.z>

Is there something like this already possible, or where to find any
pointers how to start ?

Thanks
  Réponse avec citation
Vieux 15/05/2007, 22h17   #2
Per Hedeland
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Rewrite env From based on header From: ?

In article <78X1i.6968$U01.100830@twister1.libero.it> HH
<already@enough.spam.thank.you> writes:
>I'd like to rewrite the envelope MAIL FROM address (if it is a certain
>address) and substitute it with the header FROM: address if that one is
>one of a certain set, e.g.
>- if envelope MAIL FROM: <aaaa@b.c>
>- and header FROM: <xxxx@y.z>
>then set the envelope MAIL FROM: <xxxx@y.z>


I really think you should try do this outside of sendmail - e.g. at the
source of the message - or fix whatever brokenness at the receiver end
that makes you want to do such a thing. It's not a "normal" thing to
do...

If you insist on having sendmail doing it, the best bet would probably
be via a milter (i.e. still "outside of sendmail":-). AFAIK even a
milter can't modify the envelope sender directly, but it can resend the
message with a new envelope sender.

Doing it in sendmail.cf would be "hard". The envelope/header
sender/recipient addresses are passed through the rulesets separately,
and while you can check which one you're currently processing via
$&{addr_type}, you can't just modify one while you're processing
another. The envelope sender is available in $&f, but I'm not at all
sure that modifying it (via the 'macro' map) would actually affect the
resulting envelope sender on the message that leaves sendmail.

What would likely work would be to store the header sender in a macro
e.g. in ruleset 1, and then modify the MasqEnv ruleset to replace the
envelope sender based on the contents of that macro. Of course MasqEnv
can't be modified from the .mc file though, for an .mc-based solution
this method would require custom mailer definitions in there that called
a custom ruleset that did this check and/or called MasqEnv.

>Is there something like this already possible,


No.

> or where to find any pointers how to start ?


Above and doc/op/op.*

--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 19h09.


É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,65559 seconds with 10 queries