Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » Bouce Messages
  •  
MRB068

Messages: 8
Karma: 0
Send a private message to this user
Hi,

Is there a way to have all outbound email that is bounced back to us fowarded to an admin account. So for example user@domain.com sends an email to blabla<_at_>hotmail.com and hotmail bounces it back. I would like that bounce back to be sent to an admin account.
  •  
TorW

Messages: 769
Karma: 9
Send a private message to this user
There's no immediate way to do this, I think. Do you want to intercept misspelled addresses, catch blacklisting or something else?

If KMS gets a 55x error from the remote mailserver, it will show up in mail.log. I have a script running every 10 minutes which looks for remote rejects and lists them in a file. Just grepping for "Status: 5" in mail.log will give you all the loglines with a reject. I dump the list to a webserver so I can look at it, but you can of course do whatever you like.

Here's the (Unix shell) script, completely unaltered from how I run it.
#!/bin/sh
# Generates a list of remotely rejected mail (SMTP 5.x.x. codes)
# 20090208/twa

# Define some stuff
LOGFILE=/opt/kerio/mailserver/store/logs/mail.log
S5XX="Status: 5"
TODAY=`date +%d/%b/%Y`
RESULT=/tmp/kms-extrejected

echo "<html><head><meta http-equiv="refresh" content="180"><title>Externally rejected mail $TODAY</title><style></style></head><body><pre>" > $RESULT
echo "Updated `date`<p>" >> $RESULT

echo "<strong>5xx rejects:</strong>" >> $RESULT
grep $TODAY $LOGFILE | grep "$S5XX" >> $RESULT
echo "</p>" >> $RESULT

echo "</pre></body></html>" >> $RESULT
# Copy the list to Nagios
scp -q -i /home/nagios/.ssh/id_rsa $RESULT nagios<_at_>10.0.0.44:/usr/local/nagios/share/mailstats/index.html


The webpage will reload itself every three minutes (the 180 in the html meta header), so just lean back and watch the show Wink

[Updated on: Sun, 10 January 2010 16:19]

  •  
MRB068

Messages: 8
Karma: 0
Send a private message to this user
Hi,

Yes I am trying to catch bounced email for invalid email accounts. I have a program called Splunk which does something comparable to your script. The problem I have is that we have a seperate email server that sends out going email only for our marketing. So the mail goes out from that server when mail comes back it goes through the kerio mail server. When I look in the kerio mail logs I can see the 550 errors coming back to the sender but I can't see the original destination. We have no access to the logs of the out going marketing server.
  •  
TorW

Messages: 769
Karma: 9
Send a private message to this user
I can't immediately see a way to catch only the bounces from the marketing mail. The filtering in KMS isn't good enough for that; you can't set a system wide filter checking for more than one parameter.

Ideally, the other mail server should handle the bounces itself by being the MX for the sender domain. Domains are cheap, your hours are (probably) not. If that's not possible, the marketing mails could be better handled by list management software (e.g. KMS' mailing list functionality) to have some form of automatic weeding of dead addresses.

In short: it's almost impossible to handle this is your setup. I think you need to get to the core of the problem: email marketing on the cheap (but you already knew that ...)
Previous Topic: Upgrade from 6.7.2 to 6.7.3-patch1 conflicts
Next Topic: Typo in postmaster email address
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Sun Oct 22 04:47:47 CEST 2017

Total time taken to generate the page: 0.00413 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.