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 > sender address rewrite based on recepient domain
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.mail.sendmail Configuring and using the BSD sendmail agent.

sender address rewrite based on recepient domain

Réponse
 
LinkBack Outils de la discussion
Vieux 22/09/2006, 18h57   #1
georgeav@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut sender address rewrite based on recepient domain

Hello,

I'm trying to configure sendmail to rewrite the sender address for all
emails sent to a specific domain. It's a MAIL2SMS application that has
some kind of authentication based on sender's email address. Basically
I want that all emails sent to address [phone number]@send.sms domain
look like they come from "george@sms".

Other settings: the mx for send.sms domain is added in mailertable, and
it's working.
Another small problem is that I also tried sendmail -f"george@sms"
[phone number]@send.sms, but the sender address is automatically
rewriten as george@sms.localdomain. Anyway, I ditched this version when
I thought about the above version as it is much cleaner.

The system is RHEL 4.3; except for the mailertable thing, nothing was
changed in sendmail config.


Thank you,
George

  Réponse avec citation
Vieux 25/09/2006, 17h32   #2
georgeav
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: sender address rewrite based on recepient domain

I got it working based on the info from:
http://www.sendmail.org/~ca/email/lfaq.html#CHGADDR

I created a new mailer specification sendsms.m4:

# cat sendsms.m4
#####################################
### SEND.SMS Mailer specification ###
#####################################

VERSIONID(`@(#)sendsms.m4 0.1 (ca) 1998-09-26')

Msendsms,<tab><tab>P=[IPC], F=CONCAT(mDFMuX8, SMTP_MAILER_FLAGS),
S=sendsms, R=ifdef(`_ALL_MASQUERADE_', `21/31', `21'), E=\r\n, L=990,
<tab><tab>_OPTINS(`SMTP_MAILER_MAX', `M=', `,
')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP,
<tab><tab>A=SMTP_MAILER_ARGS



And I added this to sendmail.mc:

MAILER(sendsms)dnl
LOCAL_RULESETS
LOCAL_RULE_0
R$* < @send.sms. > $*<tab>$#sendsms $@ [10.1.1.1] $:
$1<@send.sms.>$2<tab><tab>This rule sets up the sendsms mailer for
*@send.sms mails


Ssendsms
R$+<tab>$: $>51 $1<tab><tab>sender/recipient common
R$* :; <@><tab>$@<tab><tab>list:; special case
R$*<tab>$: $>61 $1<tab><tab>qualify unqual'ed names
R$*<tab>$: george < @ sms . ><tab><tab>changes the sender address



then, make & make restart.
(Replace the <tab> in the above text with the tab char)


Now, I still have one small problem with the DNS requests. I don't have
a DNS set-up on this server, and even if I did, the send.sms zone is
not configured in any dns server here; so the mail should be sent to
10.1.1.1 and no extra dns-checks should be made, the brackets stop the
mx dns check to be performed. But, it still checks the A record for
send.sms domain (I belive), so I added "10.1.1.1 send.sms" in
/etc/hosts, and it's ok; but is there a way to stop sendmail from
running this A record check ? I want to keep this setup as simple as
possible for duplicating on other servers.

Thanks,
George

georgeav wrote:
> Hello,
>
> I'm trying to configure sendmail to rewrite the sender address for all
> emails sent to a specific domain. It's a MAIL2SMS application that has
> some kind of authentication based on sender's email address. Basically
> I want that all emails sent to address [phone number]@send.sms domain
> look like they come from "george@sms".
>
> Other settings: the mx for send.sms domain is added in mailertable, and
> it's working.
> Another small problem is that I also tried sendmail -f"george@sms"
> [phone number]@send.sms, but the sender address is automatically
> rewriten as george@sms.localdomain. Anyway, I ditched this version when
> I thought about the above version as it is much cleaner.
>
> The system is RHEL 4.3; except for the mailertable thing, nothing was
> changed in sendmail config.
>
>
> Thank you,
> George


  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 13h50.


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