Re: [Exim] Newbie question: root@my.isp ?

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Jerome De Greef
Data:  
Para: exim-users
Asunto: Re: [Exim] Newbie question: root@my.isp ?
>From: Vadim Vygonets <vadik@???>
>To: exim-users@???
>Subject: Re: [Exim] Newbie question: root@??? ?
>Date: Thu, 17 Aug 2000 00:42:46 +0300
>
>Quoth Jerome De Greef on Wed, Aug 16, 2000:
> > I just installed Exim yesterday and everything's fine except this:
> > What should I do to have root replaced by a local user in outgoing
> > (internet) mail.
>
>Hmm, it's a hard one. If you have a different e-mail domain,
>it's easier. The reason is that there is no distinction between
>outgoing e-mail and incoming e-mail.
>
>But you can rewrite root@??? sender addresses in any piece of
>mail with a rewrite rule like this:
>
>root@???        jdegreef@???        Ffsr

>
>Or do such rewrites in all headers and all envelope addresses:
>
>root@???        jdegreef@???        Eh

>
>You may try to differentiate between locally generated mail and
>incoming mail by using $received_protocol (not tested):
>
>root@??? "${if eq{$received_protocol}{local}{jdegreef@???}fail}"
>Eh
>
>This is not entirely correct, because some MUAs pass mail to the
>MTA via SMTP, and not by piping it to /usr/sbin/sendmail, but
>mail(1) (which is used to send mail from cron) does the right
>thing.


Thanks for your replys.

I finally solved the problem using this rule:

*@myisp.com      "${if eq $sender_host_address}{}\
{${lookup{$1}lsearch{/etc/email-addresses}\
{$value}fail}}fail}" Eh


In /etc/email-addresses I have root: jdegreef@??? (I could have put
this immediatly in the rule but it's more flexible like that and I learned
how to use a file in a rule ;) )

Reading the doc I understood that $sender_host_address is only filled when
mail are non local (if I'm right) so I shouldn't have problem if the real
root@??? send me a mail. Please correct me if I'm wrong.

BTW, I have a last question: I'm not sure if I have to put fail twice in the
rule above...

Jerome
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com