Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

Block mails sent to a spacific address

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


vvaidy at rediffmail

Nov 19, 2009, 3:08 AM

Post #1 of 9 (1701 views)
Permalink
Block mails sent to a spacific address

Hi

I've exim version 4.69 running on WindowsXP.

This is currently configured as a SMTP transfer agent for a specific application. Exim uses a specific SMTP account on the external hosted mail server with which it just transfers all mails to it.

Now the question is that i need to just block mails from Exim sent to a specific mail address.

I'm not sure how to use filters to do this. moreover my setup is on Windows & most of the document on the internet explains steps for linux.

Please help.

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


awd-exim at awdcomp

Nov 19, 2009, 4:23 AM

Post #2 of 9 (1654 views)
Permalink
Re: Block mails sent to a spacific address [In reply to]

Vaidya nathan wrote:
> Hi
>
> I've exim version 4.69 running on WindowsXP.
>

Interesting, I had no idea there was a port to windows.

> This is currently configured as a SMTP transfer agent for a specific application. Exim uses a specific SMTP account on the external hosted mail server
with which it just transfers all mails to it.
>
> Now the question is that i need to just block mails from Exim sent to a specific mail address.
>
> I'm not sure how to use filters to do this. moreover my setup is on Windows & most of the document on the internet explains steps for linux.
>
> Please help.
>

99% of the steps for setting up exim on linux would apply to windows
except for installation.

Assuming that the email address you want to block is blah [at] example

If the email is being delivered to exim via SMTP and not submitted
locally then placing the following in the rcpt acl section will block
that address.

deny domains = example.com
local_parts = blah
message = This address is blocked


If its submitted locally,
create a file and place the following line into it.

blah: :fail: This address is blocked


Then place the following router at the top of the routers section.


reject_user:
driver = redirect
domains = example.com
allow_fail
data = ${lookup{$local_part}lsearch{/path/to/above/file}}



HTH
cya
Andrew


--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


phil at medwayhosting

Nov 19, 2009, 7:34 AM

Post #3 of 9 (1650 views)
Permalink
Re: Block mails sent to a spacific address [In reply to]

----- Original Message -----
From: "Andrew" <awd-exim [at] awdcomp>
To: "Vaidya nathan" <vvaidy [at] rediffmail>
Cc: <exim-users [at] exim>
Sent: Thursday, November 19, 2009 12:23 PM
Subject: Re: [exim] Block mails sent to a spacific address


> Vaidya nathan wrote:
> > Hi
> >
> > I've exim version 4.69 running on WindowsXP.
> >
>
> Interesting, I had no idea there was a port to windows.

[PERK] - Where please ? Or are you running it with Cygwin ?

Many thanks

Phil

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


vvaidy at rediffmail

Nov 19, 2009, 10:41 PM

Post #4 of 9 (1647 views)
Permalink
Re: Block mails sent to a spacific address [In reply to]

Thanks for your response. Actually i'm running Exim on Cygwin in windows.

The mails are submitted locally to Exim.

Other point i forgot to say is that i need to allow mails to all other IDs of the domain example.com except abc [at] example

But I hope the below entry would actually block sending mails to example.com.

reject_user:

driver = redirect

domains = example.com

allow_fail

data = ${lookup{$local_part}lsearch{/path/to/above/file}}



And can I just freez the mail instead of fail

abc: :freez:



On Thu, 19 Nov 2009 17:50:48 +0530 wrote

>Vaidya nathan wrote:

> Hi

>

> I've exim version 4.69 running on WindowsXP.

>



Interesting, I had no idea there was a port to windows.



> This is currently configured as a SMTP transfer agent for a specific application. Exim uses a specific SMTP account on the external hosted mail server

with which it just transfers all mails to it.

>

> Now the question is that i need to just block mails from Exim sent to a specific mail address.

>

> I'm not sure how to use filters to do this. moreover my setup is on Windows & most of the document on the internet explains steps for linux.

>

> Please help.

>



99% of the steps for setting up exim on linux would apply to windows

except for installation.



Assuming that the email address you want to block is blah [at] example



If the email is being delivered to exim via SMTP and not submitted

locally then placing the following in the rcpt acl section will block

that address.



deny domains = example.com

local_parts = blah

message = This address is blocked





If its submitted locally,

create a file and place the following line into it.



blah: :fail: This address is blocked





Then place the following router at the top of the routers section.





reject_user:

driver = redirect

domains = example.com

allow_fail

data = ${lookup{$local_part}lsearch{/path/to/above/file}}







HTH

cya

Andrew



--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


awd-exim at awdcomp

Nov 19, 2009, 11:29 PM

Post #5 of 9 (1635 views)
Permalink
Re: Block mails sent to a spacific address [In reply to]

Vaidya nathan wrote:
> Thanks for your response. Actually i'm running Exim on Cygwin in windows.
>
> The mails are submitted locally to Exim.
>
> Other point i forgot to say is that i need to allow mails to all other IDs of the domain example.com except abc [at] example
>
> But I hope the below entry would actually block sending mails to example.com.
>
> reject_user:
>
> driver = redirect
>
> domains = example.com
>
> allow_fail
>
> data = ${lookup{$local_part}lsearch{/path/to/above/file}}
>
>

It will allow mail to all users of that domain (if they exist) except
the entry in the file.

To use freeze you have to change the allow_fail to allow_freeze in the
router and change the fail in the text file to freeze.

HTH
cya
Andrew

>
> And can I just freez the mail instead of fail
>
> abc: :freez:
>
>
>
> On Thu, 19 Nov 2009 17:50:48 +0530 wrote
>
>> Vaidya nathan wrote:
>
>> Hi
>
>
>> I've exim version 4.69 running on WindowsXP.
>
>
>
>
> Interesting, I had no idea there was a port to windows.
>
>
>
>> This is currently configured as a SMTP transfer agent for a specific application. Exim uses a specific SMTP account on the external hosted mail server
>
> with which it just transfers all mails to it.
>
>
>> Now the question is that i need to just block mails from Exim sent to a specific mail address.
>
>
>> I'm not sure how to use filters to do this. moreover my setup is on Windows & most of the document on the internet explains steps for linux.
>
>
>> Please help.
>
>
>
>
> 99% of the steps for setting up exim on linux would apply to windows
>
> except for installation.
>
>
>
> Assuming that the email address you want to block is blah [at] example
>
>
>
> If the email is being delivered to exim via SMTP and not submitted
>
> locally then placing the following in the rcpt acl section will block
>
> that address.
>
>
>
> deny domains = example.com
>
> local_parts = blah
>
> message = This address is blocked
>
>
>
>
>
> If its submitted locally,
>
> create a file and place the following line into it.
>
>
>
> blah: :fail: This address is blocked
>
>
>
>
>
> Then place the following router at the top of the routers section.
>
>
>
>
>
> reject_user:
>
> driver = redirect
>
> domains = example.com
>
> allow_fail
>
> data = ${lookup{$local_part}lsearch{/path/to/above/file}}
>
>
>
>
>
>
>
> HTH
>
> cya
>
> Andrew
>
>
>


--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


awd-exim at awdcomp

Nov 19, 2009, 11:46 PM

Post #6 of 9 (1646 views)
Permalink
Re: Block mails sent to a spacific address [In reply to]

Andrew wrote:
> Vaidya nathan wrote:
>> Thanks for your response. Actually i'm running Exim on Cygwin in windows.
>>
>> The mails are submitted locally to Exim.
>>
>> Other point i forgot to say is that i need to allow mails to all other IDs of the domain example.com except abc [at] example
>>
>> But I hope the below entry would actually block sending mails to example.com.
>>
>> reject_user:
>>
>> driver = redirect
>>
>> domains = example.com
>>
>> allow_fail
>>
>> data = ${lookup{$local_part}lsearch{/path/to/above/file}}
>>

BTW to take out the whole domain just replace
data = ${lookup{ etc
with
data = :fail: This domain is blocked.
or
data = :freeze:


cheers


--snip--

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


vvaidy at rediffmail

Nov 23, 2009, 4:07 AM

Post #7 of 9 (1594 views)
Permalink
Re: Block mails sent to a spacific address [In reply to]

Thanks Andrew. This seems to work for me. But i get the following error in the Exim log, not sure why.

2009-11-23 17:01:05 KTERX8-00020S-A8 == abc [at] example R=reject_user defer (-17): error in redirect data: missing or malformed local part (expected word or "
--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


awd-exim at awdcomp

Nov 23, 2009, 4:43 AM

Post #8 of 9 (1585 views)
Permalink
Re: Block mails sent to a spacific address [In reply to]

Heya,

Vaidya nathan wrote:
> Thanks Andrew. This seems to work for me. But i get the following error
> in the Exim log, not sure why.
> 2009-11-23 17:01:05 KTERX8-00020S-A8 == abc [at] example R=reject_user
> defer (-17): error in redirect data: missing or malformed local part
> (expected word or "<") in ": freeze:Mail blocked for this recepient"

I think spaces are not allowed between : and freeze, Also a space after
the second colon surrounding freeze might be required, but not 100% sure.

Are you using a file for storage of local parts to reject?
If so, do you have a : at the end of the local part, a space (well at
least one) and then :freeze:
If not, that's where the problem lies.
eg
abc: :freeze:

HTH
cya
Andrew

> On Fri, 20 Nov 2009 13:12:49 +0530 wrote
> >Andrew wrote:
> > Vaidya nathan wrote:
> >> Thanks for your response. Actually i'm running Exim on Cygwin in
> windows.
> >>
> >> The mails are submitted locally to Exim.
> >>
> >> Other point i forgot to say is that i need to allow mails to all
> other IDs of the domain example.com except abc [at] example
> >>
> >> But I hope the below entry would actually block sending mails to
> example.com.
> >>
> >> reject_user:
> >>
> >> driver = redirect
> >>
> >> domains = example.com
> >>
> >> allow_fail
> >>
> >> data = ${lookup{$local_part}lsearch{/path/to/above/file}}
> >>
>
> BTW to take out the whole domain just replace
> data = ${lookup{ etc
> with
> data = :fail: This domain is blocked.
> or
> data = :freeze:
>
>
> cheers
>
>
> --snip--
>
> <http://sigads.rediff.com/RealMedia/ads/click_nx.ads/www.rediffmail.com/signatureline.htm [at] Middl?>
>


--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


vvaidy at rediffmail

Nov 23, 2009, 9:32 PM

Post #9 of 9 (1579 views)
Permalink
Re: Block mails sent to a spacific address [In reply to]

I have the following entry in my exim.conf at the start of router configuration.

reject_user:

driver = redirect

domains = example.com

allow_freeze

data = ${lookup{$local_part}lsearch{/etc/blockmail.txt}}



In blockmail.txt, i've the following entry - i need to block abc.def [at] example

abc.def: :freeze:

I tried the following too, but the same error in the log.

abc.def: :freeze :





On Mon, 23 Nov 2009 18:10:18 +0530 wrote

>Heya,



Vaidya nathan wrote:

> Thanks Andrew. This seems to work for me. But i get the following error

> in the Exim log, not sure why.

> 2009-11-23 17:01:05 KTERX8-00020S-A8 == abc [at] example R=reject_user

> defer (-17): error in redirect data: missing or malformed local part

> (expected word or "
--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.