Only allow mail from 1 server

Pentland G. G.Pentland at SOTON.AC.UK
Wed Dec 1 14:35:39 GMT 2004


    [ The following text is in the "iso-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Yes there is...

You can do it with the access map feature (Read the o'reilly book or www.sendmail.org) or here is some custom code I wrote and have  copied in here from an earlier thread on this list.

I use this code (or something very similar) in production but unless you know sendmail very well I'd suggest the firewall route is the easiest.

Hope this helps,

Gary

<snip>

Pentland G.
> Try this...
>  
> LOCAL_CONFIG
> # If email is bound to the local domain, what will do local delivery 
> for us? dnl D{DefaultLocalDeliveryHost}YOURHOST.DOMAIN.COM
> 
> LOCAL_RULE_0
> # Allocate a slot for the domain name
> R$+                                                             $: < > $1
> # Addresses qualified with the local machine name - unqualify them
> R< > $+ < @ $j . >              $: < > $1
> # Addresses qualified with a local domain - unqualify them
> R< > $+ < @ $=w . >             $: < > $1
> # Anything else on the qualification is non-local so return and parse normally
> R< > $* @ $*                            $@ $1 @ $2
> # Anything unqualified qualify with the local domain
> R< > $+                                                 $: < $M > $1
> # Now send these local emails to the default local delivery servers
> R< $+ > $+                                      $#esmtp $@ ${DefaultLocalDeliveryHost} $: $2 < @ $1 . >
> 
> Hope that helps.
> 
>       -----Original Message----- 
>       From: Daniel Gercke [mailto:gercke at HNM.DE] 
>       Sent: Wed 3/3/2004 11:39 AM 
>       To: MAILSCANNER at JISCMAIL.AC.UK 
>       Cc: 
>       Subject: # SENDMAIL_RELAY Question
> 	
> 	
> 
>       Hello,
> 	
>       i have a problem. im running a mailserver with a lot of domains and
>       users. now i hav setup another server with mailscanner. now for some
>       domains i want incoming mails will go through mailscanner and
>       mailscanner should relay this to the old mailserver.
>       for mail coming for world this works fine. but wenn a lokal domain form
>       mailserver sends to another lokal account this mail wouldn´t send
>       through mailscanner this mail will localy delivered.
>       Now my question:
>       What would happen if i add SENDMAIL_RELAY="mailscanner" to
>       sendmailconfig of mailserver ? Will there be a mailloop between these
>       machines?
> 	
> 	
> 	
> 	
> 	
>       --
>       Diese Nachricht wurde auf Viren und andere gefaerliche Inhalte untersucht
>       und ist - aktuelle Virenscanner vorausgesetzt - sauber.
>       MailScanner dankt transtec fur die freundliche Unterstutzung.
> 	
> 
> 
</snip>

Mark Spieth wrote:
> Not really. Sendmail will accept mail generally from any box as long
> as the mail is destined for that server. Firewalling is the best
> route to go.  
> 
> Mark Spieth - Director of Internet Services
> Northeast Ohio Digital Inc.
> http://www.neod.net
> mspieth at neod.net
> 330-830-6551
> 
> CONFIDENTIALITY NOTICE: The materials attached hereto are
> confidential and the property of the sender. The information
> contained in the attached materials is privileged and/or confidential
> and is intended only for the use of the above-named individual(s) or
> entity(ies). If you are not the intended recipient, be advised that
> any unauthorized disclosure, copying, distribution or the taking of
> any action in reliance on the contents of the attached information is
> strictly prohibited. If you have received this transmission in error,
> please discard the information immediately        
> -----Original Message-----
> From: Paul Houselander - SME [mailto:housey at SME-ECOM.CO.UK]
> Sent: Wednesday, December 01, 2004 4:38 AM
> To: MAILSCANNER at JISCMAIL.AC.UK
> Subject: Only allow mail from 1 server
> 
> Hi
> 
> I have a machine running Mailscanner/Sendmail where users also pop
> there mail off. 
> 
> I want to move MailScanner to a couple of machines that scan the mail
> then forward onto the box where the users actually pop there mail
> off.  
> 
> Ill get rid of the current MX record for the POP machine and create
> MX records for the 2 MailScanner Machines. I want to ensure the POP
> machine can only recieve mail from the 2 front end MailScanner
> Machines. I guess I can use a firewall to only allowing incomming
> connections from the 2 machines but is there a way you can achieve
> this within sendmail?     
> 
> Thanks
> 
> Paul
> ------------------------ MailScanner list ------------------------
> To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
> 'leave mailscanner' in the body of the email.
> Before posting, read the MAQ (http://www.mailscanner.biz/maq/)
> and the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
> 
> Support MailScanner development - buy the book off the
> website!------------------------ MailScanner list
> ------------------------ To unsubscribe, email
> jiscmail at jiscmail.ac.uk with the words: 'leave mailscanner' in the
> body of the email. Before posting, read the MAQ
> (http://www.mailscanner.biz/maq/) and the archives
> (http://www.jiscmail.ac.uk/lists/mailscanner.html).  
> 
> Support MailScanner development - buy the book off the website!

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!




More information about the MailScanner mailing list