Receive - scan and forward to other domain name

Paul Bernal donpool at gmail.com
Wed Oct 31 22:40:42 GMT 2007


Kevin Miller escribió:
> Paul Bernal wrote:
>   
>> Hi everyone,
>>
>> I readed this
>>
>>     
> http://wiki.mailscanner.info/doku.php?id=documentation:configuration:mta
> :sendmail:how_to:setup_a_gateway
>   
>> setup a gateway explanation on how to receive - scan and forward an
>> email sent to some domain...
>>
>> But what I need is:
>>
>> * Receive an email to sameuser at onedomain.com on a MailScanner box
>> * MailScan this message
>> * Forward it to sameuser at otherdomain.com where otherdomain.com it's an
>> extra local-box expecting to receive emails to anyuser at otherdomain.com
>>
>> There's a way to do this ?
>>
>> Thank's in advance
>>     
>
> Hi Don,
>
> Hmmm.  I do something similar, but not exactly the same.  I'm using
> sendmail, so don't know the drill on other email systems, but I accept
> mail for several different domains.  What I did was this:
>
> 1: Publish the appropriate MX record so mail knows to come to your mail
> server
> 2: Edit /etc/mail/mailertable so sendmail knows where to send mail after
> it's done with it. Something like: 
>     mydomain1.com         esmtp:[192.168.1.100]
>     mydomain2.com         esmtp:[192.168.2.101]
>    Don't forget to do the makemap thing on mailertable
> 3: Edit relay-domains so it knows what domains it's OK to relay to:
>     mydomain1.com
>     mydomain2.com
>
> I think that should about do it.  You may have to edit /etc/mail/access
> too, but I'm not sure.
>
> On my setup, mail will come in any of several domains, sendmail accepts
> the mail, MailScanner scans it, hands it back to sendmail which then
> forwards it to the appropriate internal email server.  I'm not actually
> rewriting the to address.  
> Since you want to have the MailScanner box change the address from
> sameuser at onedomain.com to sameuser at otherdomain.com I think I'd look at
> the aliases file, or possibly virtuser and genericstable files.  I
> haven't used those though, so can't provide details.  Hope this helps...
>
>
> ...Kevin
>   
Thanks a lot Kevin,

I've already tried the fist (mailertable) thing, but didn't combined
around with aliases, virtuser and genericstable files... hope this help
me to rewrite the @onedomain.com to @otherdomain.com on all incomming mails!
I'll give it a try and let you know!

Regards
don pool


More information about the MailScanner mailing list