Re: Update sendmail's email result to database
- From: cyhing@xxxxxxxxx
- Date: Wed, 19 Sep 2007 22:24:44 -0700
Hi,
I just think another solution,
1. Add the email id into each email's subject.
2. log email's subject into log file, like:
[code]LOCAL_CONFIG
Klog syslog
HSubject: $>;+CheckSubject
LOCAL_RULESETS
SCheckSubject
R$* $: $(log Subject: $1 $) $1[/code]
3. Use logwatch to monitor mail log, update database according to
email id and email address.
Havn't try yet, will update to you after tried.
Please tell me if you have better solution.
Thanks,
Regards,
Cheow Yong
On 9 19 , 5 06 , cyh...@xxxxxxxxx wrote:
Hi,
We will put the email id in all email's content, so that if we read
files in /var/spool/mqueue, we will able to get the email id.
Another solution is, write a program to:
1. read email id from all files in /var/spool/mqueue directory. So
that we get the problem email list and its failed reason.
2. go to /var/log/maillog*, find out the success sent email list.
3. update the status and reason of all problem email list into
database.
4. update the status of all email address in success email list to
success status in database.
This solution assume that if one email have send successfully to
destination, it will always success within some period of time.
Because we only can get the email id from mail queue, we can't get the
email id from /var/log/maillog* files. So that we will update all
email status to success sent at step 4.
Please provide me some advices.
Thanks for your help.
Regards,
Cheow Yong
On 9 19 , 6 33 , cyh...@xxxxxxxxx wrote:
Hi,
Our system auto send out email to customer configured email address.
But we hope to update all outgoing status to database, so that we can
find out any problem happened after email send to sendmail server. For
example we need to know any typo of customer's email address, delay of
email send out, or the mx record failed in DNS query.
At first, I think that we can write a milter program like following:
1. each email content has a email id.
2. the milter program get outgoing status in mlfi_connect() and
mlfi_cleanup() functions.
3. update the result status into database by the email id.
But after some testing, I found that the callback function in milter
program only called when email send INTO sendmail server. It is not
called when email send from sendmail server to other mail server.
I am out of idea now. Please give me some suggestion about how to make
this.
Thanks for your help.
Regards,
Cheow Yong
.
- References:
- Update sendmail's email result to database
- From: cyhing
- Re: Update sendmail's email result to database
- From: cyhing
- Update sendmail's email result to database
- Prev by Date: Throttle outbound mail
- Next by Date: Re: rejecting "FROM" domain unless sending MTA is on specific IP address ranges
- Previous by thread: Re: Update sendmail's email result to database
- Next by thread: I am totally fscking exasperated with localhost.localdomain
- Index(es):
Relevant Pages
|