Same mail several times in a mailbox

View: New views
4 Messages — Rating Filter:   Alert me  

Same mail several times in a mailbox

by fjar Uno al día :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello all,
I'm running courier last version, with a configuration where all mails
for a domain go to one mailbox.
I have an alias

 @fringe.com.mx: fringedev

and in the mailbox for this user I have a .courier-default empty file.
I works perfectly: all mails for this domain go in this mailbox.

The problem I'm facing now is when the mail has more than one
destination address in this domain, because the mail is written to the
mailbox that amount of times. This is an example log:

> Nov  5 12:49:42 mspbwfe courieresmtpd: [ID 702911 mail.info] MAIL FROM:<allero@...> BODY=8BITMIME SIZE=4183
> Nov  5 12:49:42 mspbwfe courieresmtpd: [ID 702911 mail.info] RCPT TO:<55126060@...> ORCPT=rfc822;55126060@...
> Nov  5 12:49:42 mspbwfe courieresmtpd: [ID 702911 mail.info] RCPT TO:<55124839@...> ORCPT=rfc822;55124839@...
> Nov  5 12:49:42 mspbwfe courieresmtpd: [ID 702911 mail.info] RCPT TO:<55244342@...> ORCPT=rfc822;55244342@...
> Nov  5 12:49:42 mspbwfe courieresmtpd: [ID 702911 mail.info] DATA
> Nov  5 12:49:42 mspbwfe courierd: [ID 702911 mail.info] newmsg,id=0006B38C.4AF31E46.000073EB: dns; smtp.fringe.com.mx ([::ffff:10.56.82.33])
> Nov  5 12:49:42 mspbwfe courierd: [ID 702911 mail.info] started,id=0006B38C.4AF31E46.000073EB,from=><allero@...>,module=local,host=fringedev!55126060!250!1001!/buzones1/locali!!,addr=<fringedev>
> Nov  5 12:49:42 mspbwfe courierd: [ID 702911 mail.info] started,id=0006B38C.4AF31E46.000073EB,from=<allero@...>,module=local,host=fringedev!55124839!250!1001!/buzones1/locali!!,addr=<fringedev>
> Nov  5 12:49:42 mspbwfe courierd: [ID 702911 mail.info] started,id=0006B38C.4AF31E46.000073EB,from=<allero@...>,module=local,host=fringedev!55244342!250!1001!/buzones1/locali!!,addr=<fringedev>
> Nov  5 12:49:42 mspbwfe courierd: [ID 702911 mail.info] Waiting.  shutdown time=none, wakeup time=none, queuedelivering=1, inprogress=3
> Nov  5 12:49:42 mspbwfe courierlocal: [ID 702911 mail.info] id=0006B38C.4AF31E46.000073EB,from=<allero@...>,addr=<fringedev- 55126060@...>,size=3992,success: Message delivered.
> Nov  5 12:49:42 mspbwfe courierlocal: [ID 702911 mail.info] id=0006B38C.4AF31E46.000073EB,from=<allero@...>,addr=<fringedev-55124839@...>,size=3992,success: Message delivered.
> Nov  5 12:49:43 mspbwfe courierlocal: [ID 702911 mail.info] id=0006B38C.4AF31E46.000073EB,from=<allero@...>,addr=<fringedev-55244342@...>,size=3992,success: Message delivered.


Three destinations in the domain, it gets copied three times in the
mailbox. I'd like it to be copied just one time.
Any ideas?
Thanks

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
courier-users mailing list
courier-users@...
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Re: Same mail several times in a mailbox

by Sam Varshavchik :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

fjar Uno al día writes:

> Three destinations in the domain, it gets copied three times in the
> mailbox. I'd like it to be copied just one time.
> Any ideas?

Use reformail's -D option.




------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
courier-users mailing list
courier-users@...
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

attachment0 (204 bytes) Download Attachment

Re: Same mail several times in a mailbox

by fjar Uno al día :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK, I created a .mailfilter file in the users folder with this inside:

`/opt/courier/bin/reformail -D 8192 /buzones1/locali/.duplicate.cache`
if ( $RETURNCODE == 0 )
     {
        exit
     }

It keeps a list with the messages' IDs in the
/buzones1/locali/.duplicate.cache file.
When a new messages comes in, it checks if its ID is in the list, if
it's found returns 0 otherwise 1.

It was quite simple with Sam's suggestion.
Regards!

On Thu, Nov 5, 2009 at 11:28 PM, Sam Varshavchik <mrsam@...> wrote:

> fjar Uno al día writes:
>
>> Three destinations in the domain, it gets copied three times in the
>> mailbox. I'd like it to be copied just one time.
>> Any ideas?
>
> Use reformail's -D option.
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> courier-users mailing list
> courier-users@...
> Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
>
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
courier-users mailing list
courier-users@...
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Re: Same mail several times in a mailbox

by Matus UHLAR - fantomas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> > fjar Uno al día writes:
> >> Three destinations in the domain, it gets copied three times in the
> >> mailbox. I'd like it to be copied just one time.

> On Thu, Nov 5, 2009 at 11:28 PM, Sam Varshavchik <mrsam@...> wrote:
> > Use reformail's -D option.

On 06.11.09 12:02, fjar Uno al día wrote:

> OK, I created a .mailfilter file in the users folder with this inside:
>
> `/opt/courier/bin/reformail -D 8192 /buzones1/locali/.duplicate.cache`
> if ( $RETURNCODE == 0 )
>      {
>         exit
>      }
>
> It keeps a list with the messages' IDs in the
> /buzones1/locali/.duplicate.cache file.
> When a new messages comes in, it checks if its ID is in the list, if
> it's found returns 0 otherwise 1.
>
> It was quite simple with Sam's suggestion.

Note that you need to keep the list of real recipients somewhere so you
would know who has to get the mail and who has not.

Note that the mail headers are completely useless because the mail may be
sent to addresses not in headers and may not be sent to addresses in
headers. In other words: the real recipients aren't stored in the mail
unless you store them.

--
Matus UHLAR - fantomas, uhlar@... ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
"The box said 'Requires Windows 95 or better', so I bought a Macintosh".

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
courier-users mailing list
courier-users@...
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users