|
|
|
|
||||||
| comp.mail.sendmail Configuring and using the BSD sendmail agent. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
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 |
|
![]() |
| Outils de la discussion | |
|
|