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

Mailing List Archive: exim: users

Produce 550 error depending on sender's email

 

 

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


jeffrey.starin at gmail

Mar 16, 2012, 8:11 AM

Post #1 of 10 (1110 views)
Permalink
Produce 550 error depending on sender's email

Hello All,

What is the best method for producing a 550 error dependent upon the
sender's email address?

We need to send a 550 error to several senders even though the recipient
email address is, in fact, valid. This is because the recipient does
not want to receive any email from the sender and wishes them to think
that their email does not exist on our receiving servers.

An error message similar to this is what we would like to achieve:

"The error that the other server returned was: 550 550 5.1.1
<xxxxx [at] xxx>: Recipient address rejected: xxxxx [at] xxx"

Any help would be appreciated.

Thanks!



--
## List details at https://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 at u61

Mar 16, 2012, 8:19 AM

Post #2 of 10 (1080 views)
Permalink
Re: Produce 550 error depending on sender's email [In reply to]

> We need to send a 550 error to several senders even though the recipient
> email address is, in fact, valid. This is because the recipient does
> not want to receive any email from the sender and wishes them to think
> that their email does not exist on our receiving servers.

How about this ?

acl_check_rcpt:

deny message = [2C03] Unknown email address $local_part@$domain.
recipients = jonny [at] anything
condition = ${if match{$sender_address}{sally [at] junkmail}}



--
Paul.
England,
EU.




--
## List details at https://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 at u61

Mar 16, 2012, 8:26 AM

Post #3 of 10 (1080 views)
Permalink
Re: Produce 550 error depending on sender's email [In reply to]

Extending my last suggestion, because I more carefully re-read the requirement:



> We need to send a 550 error to several senders even though the recipient
> email address is, in fact, valid. This is because the recipient does
> not want to receive any email from the sender and wishes them to think
> that their email does not exist on our receiving servers.

How about this ?

acl_check_rcpt:

deny message = [2C03] Unknown email address $local_part@$domain.
recipients = jonny [at] anything
senders = EXDIR/jonny.unwanted


EXDIR is a predefined variable pointing to the location of Exim data files.

jonny.unwanted contains

sally [at] nothanks
fred [at] jun,com






--
Paul.
England,
EU.




--
## List details at https://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/


jeffrey.starin at gmail

Mar 16, 2012, 8:49 AM

Post #4 of 10 (1084 views)
Permalink
Re: Produce 550 error depending on sender's email [In reply to]

On 3/16/2012 11:26 AM, Always Learning wrote:
> Extending my last suggestion, because I more carefully re-read the requirement:
>
>
>
>> We need to send a 550 error to several senders even though the recipient
>> email address is, in fact, valid. This is because the recipient does
>> not want to receive any email from the sender and wishes them to think
>> that their email does not exist on our receiving servers.
> How about this ?
>
> acl_check_rcpt:
>
> deny message = [2C03] Unknown email address $local_part@$domain.
> recipients = jonny [at] anything
> senders = EXDIR/jonny.unwanted
>
>
> EXDIR is a predefined variable pointing to the location of Exim data files.
>
> jonny.unwanted contains
>
> sally [at] nothanks
> fred [at] jun,com
>
>
>
>
>
>
Thank you. Just to be sure, is jonny.unwanted supposed to contain
fred [at] jun,com or fred [at] junk -- notice the comma vs. the period.

Thank you.

--
## List details at https://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 at u61

Mar 16, 2012, 8:55 AM

Post #5 of 10 (1081 views)
Permalink
Re: Produce 550 error depending on sender's email [In reply to]

On Fri, 2012-03-16 at 11:49 -0400, Jeffrey Starin wrote:

> Thank you. Just to be sure, is jonny.unwanted supposed to contain
> fred [at] jun,com or fred [at] junk -- notice the comma vs. the period.

Definitely the FULL STOP.

Happy weekend.


--
Paul.
England,
EU.




--
## List details at https://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/


jeffrey.starin at gmail

Mar 16, 2012, 9:08 AM

Post #6 of 10 (1080 views)
Permalink
Re: Produce 550 error depending on sender's email [In reply to]

On 3/16/2012 11:26 AM, Always Learning wrote:
> Extending my last suggestion, because I more carefully re-read the requirement:
>
>
>
>> We need to send a 550 error to several senders even though the recipient
>> email address is, in fact, valid. This is because the recipient does
>> not want to receive any email from the sender and wishes them to think
>> that their email does not exist on our receiving servers.
> How about this ?
>
> acl_check_rcpt:
>
> deny message = [2C03] Unknown email address $local_part@$domain.
> recipients = jonny [at] anything
> senders = EXDIR/jonny.unwanted
>
>
> EXDIR is a predefined variable pointing to the location of Exim data files.
>
> jonny.unwanted contains
>
> sally [at] nothanks
> fred [at] jun,com
>
>
>
>
>
>
I've tried both methods and the message gets through. . . can EXDIR
part look like:

senders = /etc/jonny.unwanted

or is, in fact, EXDIR an actual Exim reserved word?

--
## List details at https://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 at u61

Mar 16, 2012, 9:14 AM

Post #7 of 10 (1085 views)
Permalink
Re: Produce 550 error depending on sender's email [In reply to]

On Fri, 2012-03-16 at 12:08 -0400, Jeffrey Starin wrote:

> I've tried both methods and the message gets through. . . can EXDIR
> part look like:
>
> senders = /etc/jonny.unwanted

YES.

> or is, in fact, EXDIR an actual Exim reserved word?

It is NOT. It is a user created variable used as an abbreviation for a
directory location.

I use EXDIR, although it could be called anything, as a link to a
directory (/data/config/exim for example). If the directory location
changes I have only to make one change to EXDIR and not multiple
occasions within the Exinm configuration file.

Hope that helps.


--
Paul.
England,
EU.




--
## List details at https://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/


jeffrey.starin at gmail

Mar 16, 2012, 9:21 AM

Post #8 of 10 (1083 views)
Permalink
Re: Produce 550 error depending on sender's email [In reply to]

On 3/16/2012 11:19 AM, Always Learning wrote:
>> We need to send a 550 error to several senders even though the recipient
>> email address is, in fact, valid. This is because the recipient does
>> not want to receive any email from the sender and wishes them to think
>> that their email does not exist on our receiving servers.
> How about this ?
>
> acl_check_rcpt:
>
> deny message = [2C03] Unknown email address $local_part@$domain.
> recipients = jonny [at] anything
> condition = ${if match{$sender_address}{sally [at] junkmail}}
>
>
>
Hmmm. . . I've tried both methods. Not working yet. I'm wondering if
the placement of the acl_check_rcpt within the acl stanza of exim.conf
matters? Currently it's the first entry after "begin acl"

--
## List details at https://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 at u61

Mar 16, 2012, 9:41 AM

Post #9 of 10 (1082 views)
Permalink
Re: Produce 550 error depending on sender's email [In reply to]

On Fri, 2012-03-16 at 12:21 -0400, Jeffrey Starin wrote:
> >
> > acl_check_rcpt:
> >
> > deny message = [2C03] Unknown email address $local_part@$domain.
> > recipients = jonny [at] anything
> > condition = ${if match{$sender_address}{sally [at] junkmail}}
> >
> >
> >
> Hmmm. . . I've tried both methods. Not working yet. I'm wondering if
> the placement of the acl_check_rcpt within the acl stanza of exim.conf
> matters? Currently it's the first entry after "begin acl"

It needs to be defined. In your configuration file before 'begin acl'
you need:

acl_smtp_rcpt = acl_check_rcpt

---------------------
The sequence in the configuration file is:-

acl_smtp_rcpt = acl_check_rcpt

begin acl

acl_check_rcpt:




Hope that helps.



--
Paul.
England,
EU.



--
## List details at https://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/


jeffrey.starin at gmail

Mar 16, 2012, 10:16 AM

Post #10 of 10 (1082 views)
Permalink
Re: Produce 550 error depending on sender's email [In reply to]

In my configuration the acl_smtp_rcpt was further up and looks like this:

acl_smtp_rcpt = check_recipient

so I then tried your parameters but under check_recipient, instead, and
now it works!

I placed it under:

#END ACL_NOTQUIT_BLOCK
#!!# ACL that is used after the RCPT command
check_recipient:

Thanks a million!

If you see any possible conflict please advise.

On 3/16/2012 12:41 PM, Always Learning wrote:
> On Fri, 2012-03-16 at 12:21 -0400, Jeffrey Starin wrote:
>>> acl_check_rcpt:
>>>
>>> deny message = [2C03] Unknown email address $local_part@$domain.
>>> recipients = jonny [at] anything
>>> condition = ${if match{$sender_address}{sally [at] junkmail}}
>>>
>>>
>>>
>> Hmmm. . . I've tried both methods. Not working yet. I'm wondering if
>> the placement of the acl_check_rcpt within the acl stanza of exim.conf
>> matters? Currently it's the first entry after "begin acl"
> It needs to be defined. In your configuration file before 'begin acl'
> you need:
>
> acl_smtp_rcpt = acl_check_rcpt
>
> ---------------------
> The sequence in the configuration file is:-
>
> acl_smtp_rcpt = acl_check_rcpt
>
> begin acl
>
> acl_check_rcpt:
>
>
>
>
> Hope that helps.
>
>
>


--
## List details at https://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.