smtp_recipient_restrictions?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

smtp_recipient_restrictions?

Carconni

Hi,

I have an unusual request.  My company processes mail for a number of  
client projects.  In many cases, we don't have access to the user  
database so while a user may sign up and even verify a subscription,  
an email may bounce but there may be no way of removing the bounced  
email address.

I'd like to clean that up if I can.  I have several production  
systems that generate and send mail through a specific server.  For  
instance, production server 1 may generate mail for ABC company and  
will send that email through the mail server that has been assigned  
to handle ABC's email.   So lets say a customer "Bob" signs up for a  
discussion page on ABC's website. The subscription and personal info  
is contained in ABC's database, but the email is forwarded to our  
systems. We process that request and periodic emails are sent to  
[hidden email] based on his preferences.  But lets say Bob has a  
falling out with his ISP and he no longer has that email address and  
he doesn't bother to update his subscription.  Now we have a a number  
of bounced messages for Bob.

Is there any way that I can stop my own mail server from sending  
emails to [hidden email]?  Can I have postfix check a file first and  
then based on the check deliver out to the user or to dev/null?

Like I said, this is usually handled at the user database end, and  
sometimes we can do that, but in many cases we can't  and we deal  
with a couple million messages a day.  We have a script that pulls  
the bounced message information out of the mail.log from the previous  
day, but in many cases, we don't even know which client it's coming  
from.  Is there a way to get postfix to report more information  
regarding a bounce and maybe redirected it to another file and is  
there anyway to create a local blacklist of sorts or prevent mail  
delivery for bad email addresses?

Thank you for your thoughts on this...

C



Reply | Threaded
Open this post in threaded view
|

RE: smtp_recipient_restrictions?

Mueller, Martin (Messaging)
For blocking/filtering see http://www.postfix.org/SMTPD_ACCESS_README.html and http://www.postfix.org/postconf.5.html#smtpd_recipient_restrictions

Don't understand the " we don't even know which client it's coming from.". Your server accepted the message before sending it on, so you should be able to use the queueid to link the bounce message to a client.

Martin

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of carconni
Sent: Tuesday, June 24, 2008 3:35 PM
To: [hidden email]
Subject: smtp_recipient_restrictions?


Hi,

I have an unusual request.  My company processes mail for a number of
client projects.  In many cases, we don't have access to the user
database so while a user may sign up and even verify a subscription,
an email may bounce but there may be no way of removing the bounced
email address.

I'd like to clean that up if I can.  I have several production
systems that generate and send mail through a specific server.  For
instance, production server 1 may generate mail for ABC company and
will send that email through the mail server that has been assigned
to handle ABC's email.   So lets say a customer "Bob" signs up for a
discussion page on ABC's website. The subscription and personal info
is contained in ABC's database, but the email is forwarded to our
systems. We process that request and periodic emails are sent to
[hidden email] based on his preferences.  But lets say Bob has a
falling out with his ISP and he no longer has that email address and
he doesn't bother to update his subscription.  Now we have a a number
of bounced messages for Bob.

Is there any way that I can stop my own mail server from sending
emails to [hidden email]?  Can I have postfix check a file first and
then based on the check deliver out to the user or to dev/null?

Like I said, this is usually handled at the user database end, and
sometimes we can do that, but in many cases we can't  and we deal
with a couple million messages a day.  We have a script that pulls
the bounced message information out of the mail.log from the previous
day, but in many cases, we don't even know which client it's coming
from.  Is there a way to get postfix to report more information
regarding a bounce and maybe redirected it to another file and is
there anyway to create a local blacklist of sorts or prevent mail
delivery for bad email addresses?

Thank you for your thoughts on this...

C



Reply | Threaded
Open this post in threaded view
|

Re: smtp_recipient_restrictions?

mouss-2
In reply to this post by Carconni
carconni wrote:

>
> Hi,
>
> I have an unusual request.  My company processes mail for a number of
> client projects.  In many cases, we don't have access to the user
> database so while a user may sign up and even verify a subscription,  
> an email may bounce but there may be no way of removing the bounced
> email address.
>
> I'd like to clean that up if I can.  I have several production systems
> that generate and send mail through a specific server.  For instance,
> production server 1 may generate mail for ABC company and will send
> that email through the mail server that has been assigned to handle
> ABC's email.   So lets say a customer "Bob" signs up for a discussion
> page on ABC's website. The subscription and personal info is contained
> in ABC's database, but the email is forwarded to our systems. We
> process that request and periodic emails are sent to [hidden email]
> based on his preferences.  But lets say Bob has a falling out with his
> ISP and he no longer has that email address and he doesn't bother to
> update his subscription.  Now we have a a number of bounced messages
> for Bob.
>
> Is there any way that I can stop my own mail server from sending
> emails to [hidden email]?  Can I have postfix check a file first and
> then based on the check deliver out to the user or to dev/null?
>
> Like I said, this is usually handled at the user database end, and
> sometimes we can do that, but in many cases we can't  and we deal with
> a couple million messages a day.  We have a script that pulls the
> bounced message information out of the mail.log from the previous day,
> but in many cases, we don't even know which client it's coming from.  
> Is there a way to get postfix to report more information regarding a
> bounce and maybe redirected it to another file and is there anyway to
> create a local blacklist of sorts or prevent mail delivery for bad
> email addresses?

you first need to know which addresses bounce. you can use VERP
(envelope sender is tagged to identify the recipient). these VERP
addresses can then be delivered to a program or script that updates the
list of "blocked recipients", which you can use with
check_recipient_access.

if you don't use VERP, you will need to parse the bounces, but this does
not always work (some bounces do not contain enough information. and
even if they do, the mail may have been forwarded to an address that you
never sent to directly).

care must be taken not to block a recipient in case of transient
problems (quota problem, remote system problem that results in a bounce,
... etc). some systems will generate a bounce even if they get a
temporary error or a 4xx from another smtp server.