Copy Send and recived Mails to a one emailaddreess

bash-2.05# ./imsimta version

Sun Java(tm) System Messaging Server 6.2-3.04 (built Jul 15 2005)

libimta.so 6.2-3.04 (built 01:43:03, Jul 15 2005)

SunOS banjercito 5.9 Generic_112233-10 sun4u sparc SUNW,UltraSPARC-IIi-cEngine

Hi.

I have a test lab and i need to take copies of every send and recived mail, i want to have this configuration using the mappings and the channels and put the next line in the mappings file:

MESSAGE-SAVE-COPY

tcp_*|*@testlab.com|D|/opt/SUNWmsgsr/data/queue/tcp_local/*/* $Y/opt/SUNWmsgsr/msg_save/$1/$2

I ran imsimta cnbuild, imsimta refresh, imsimta restart, imsimta restart dispatcher, stop-msg, star-msg and nothing.

Exist any way to take this copies to a especific email-address (This configuratios only copy the messages to a other path in the system)?

Thanx Ram

[863 byte] By [ram@qed.com.mx] at [2007-11-26 10:36:41]
# 1

How many mails are we talking about, here?

It's a Very Bad Idea to send a very large number of messages to a single mailbox. The server is designed to distribute large numbers of mails to many mailboxes. Not large numbers of mails to a single mailbox.

If you do route large numbers of messages to a single mailbox, you will see performance problems, out of resource space problems, full mailbox problems, and such. It's simply not good.

You should actually NEVER be running

imsimta refresh

on any live system. It does too many things you don't want to do.

It's possible you have missed the space to the left of your rule. It's possible you have some other typo in it. I"ve not parsed it carefully.

The target directory needs to be on the same filesystem as the queue. This stuff works by hard-linking.

jay_plesset at 2007-7-7 2:47:34 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 2

> It's a Very Bad Idea to send a very large number of

> messages to a single mailbox. The server is designed

> to distribute large numbers of mails to many

> mailboxes. Not large numbers of mails to a single

> mailbox.

I think so, but my customer needs to have it ( and is a small site)

> You should actually NEVER be running

>

> imsimta refresh

>

OK

> It's possible you have missed the space to the left

> of your rule.

Nop, i have a double-space

> It's possible you have some other typo

> in it. I"ve not parsed it carefully.

>

> The target directory needs to be on the same

> filesystem as the queue. This stuff works by

> hard-linking.

Im using the default directories for queue /var/opt/SUNWmsgsr/queue/tcp_local for the name of the message file being dequeued. and /var/opt/SUNWmsgsr/queue/msg_saved for the result.

Here is part of the mappings file:

SEND_ACCESS

tcp_*|*|*|*@[127.*] $X5.1.2|$NBad$ destination$ system

tcp_*|*|*|*@localhost.* $X5.1.2|$NBad$ destination$ system

tcp_*|*|*|*@example.com $X5.1.2|$NBad$ destination$ system

tcp_*|*|*|*@example.net $X5.1.2|$NBad$ destination$ system

tcp_*|*|*|*@example.org $X5.1.2|$NBad$ destination$ system

tcp_*|*|*|*@*.test $X5.1.2|$NBad$ destination$ system

tcp_*|*|*|*@*.example $X5.1.2|$NBad$ destination$ system

tcp_*|*|*|*@*.invalid $X5.1.2|$NBad$ destination$ system

tcp_*|*|*|*@*.localhost $X5.1.2|$NBad$ destination$ system

MESSAGE-SAVE-COPY

tcp_local|*|D|/var/opt/SUNWmsgsr/queue/tcp_local/*/* $Y/var/opt/SUNWmsgsr/queue/msg_saved/$1/$2

<IMTA_TABLE:mappings.locale

Tnx Ram>

ram@qedcommx at 2007-7-7 2:47:34 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 3
Please have a look through the posting where I fully documented this feature: http://forum.sun.com/jive/thread.jspa?forumID=15&threadID=51763
jay_plesset at 2007-7-7 2:47:34 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 4
Cool Jay.I have copies all inbounds mails, but the question is... how can i resend this copies to a email address?We try to use imsimport but it show an /var/mail bad formatDo you known some way to do this?Tnx Ram
ram@qedcommx at 2007-7-7 2:47:34 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 5

Yes, imsimport is for "/var/mail" format. captured message files are not.

You can copy those messages to an existing mail user's folders, and run reconstruct -r for that user, then the messages will be visible. There is a limit on how many messages may be in any one folder. The limit is in the millions.

jay_plesset at 2007-7-7 2:47:34 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 6

Sorry Jay.

I lost my serverlab machine and all the configuration this serverlab was a Solaris X86 server, copy of all inbounds was working there, now I am trying to make the same configuration in a Sparc Solaris10 Server but the copies still not working. i will try to give all the information of this configuration>

Messaging Version:

Sun Java System Messaging Server 6.2-7.05 (built Sep 2006)

libmta.so 6.2-7.05 (built 12:18:44), Sep 5 2006)

SunOS myserver 5.10 Generic_118833-24 sun4u sparc SUNW,Sun-Fire-v240

- --

Hard disc Partitions:

/

/var

/opt

/usr

- --

Installation paths

Messaging home:

/opt/SUNWmsgsr/

Messaging Configuration home:

/var/opt/SUNWmsgsr/

Messaging Queue home

/var/opt/SUNWmsgsr/queue

This are the default paths for the installation (symbolic links and directories)

- -

Mappping File:

SEND_ACCESS

tcp_*|*|*|*@[127.*] $X5.1.2|$NBad$ destination$ system

tcp_*|*|*|*@localhost.* $X5.1.2|$NBad$ destination$ system

tcp_*|*|*|*@example.com $X5.1.2|$NBad$ destination$ system

tcp_*|*|*|*@example.net $X5.1.2|$NBad$ destination$ system

tcp_*|*|*|*@example.org $X5.1.2|$NBad$ destination$ system

tcp_*|*|*|*@*.test $X5.1.2|$NBad$ destination$ system

tcp_*|*|*|*@*.example $X5.1.2|$NBad$ destination$ system

tcp_*|*|*|*@*.invalid $X5.1.2|$NBad$ destination$ system

tcp_*|*|*|*@*.localhost $X5.1.2|$NBad$ destination$ system

MESSAGE-SAVE-COPY

ims-ms|*|D|/var/opt/SUNWmsgsr/queue/ims-ms/*/* $Y/var/opt/msgInSpool/$2/$3

<IMTA_TABLE:mappings.locale

- --

List of directories in /var/opt/msgInSpool :

bash-3.00# pwd

/var/opt/msgInSpool

bash-3.00# ls -la

total 44

drwx 22 mailsrv mail 512 Oct 19 10:48 .

drwxr-xr-x 14 mailsrv mail 512 Oct 23 23:48 ..

drwx2 mailsrv mail 512 Oct 19 10:48 000

drwx2 mailsrv mail 512 Oct 19 10:48 001

drwx2 mailsrv mail 512 Oct 19 10:48 002

drwx2 mailsrv mail 512 Oct 19 10:48 003

drwx2 mailsrv mail 512 Oct 19 10:48 004

drwx2 mailsrv mail 512 Oct 19 10:48 005

drwx2 mailsrv mail 512 Oct 19 10:48 006

drwx2 mailsrv mail 512 Oct 19 10:48 007

drwx2 mailsrv mail 512 Oct 19 10:48 008

drwx2 mailsrv mail 512 Oct 19 10:48 009

drwx2 mailsrv mail 512 Oct 19 10:48 010

drwx2 mailsrv mail 512 Oct 19 10:48 011

drwx2 mailsrv mail 512 Oct 19 10:48 012

drwx2 mailsrv mail 512 Oct 19 10:48 013

drwx2 mailsrv mail 512 Oct 19 10:48 014

drwx2 mailsrv mail 512 Oct 19 10:48 015

drwx2 mailsrv mail 512 Oct 19 10:48 016

drwx2 mailsrv mail 512 Oct 19 10:48 017

drwx2 mailsrv mail 512 Oct 19 10:48 018

drwx2 mailsrv mail 512 Oct 19 10:48 019

- --

Permissions groups and owners

drwxr-xr-x 14 mailsrv mail 512 Oct 23 23:48 opt

drwx 22 mailsrv mail 512 Oct 19 10:48 msgInSpool

-

Comands that i ran:

imsimta cnbuild

imsimta restart dispatcher

-

Test procedure:

Send email from other server to serverlab, recive the mails but the copy is not in the "copy directory" ( /var/opt/msgInSpool )

- --

I will appreciate all your help

Thanx Ram>

ram@qedcommx at 2007-7-7 2:47:34 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 7
Let's tryimsimta restart job_controller
jay_plesset at 2007-7-7 2:47:34 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 8
> Let's try> > imsimta restart job_controllerNop.Do i have to configure something in imta.cnf?Ram
ram@qedcommx at 2007-7-7 2:47:34 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 9
No, nothing in imta.cnf.However, white space is important in the mappings file. I can't see here in the forum, but the line that does the message-save-copy needs to be indented with one space...... If it's not there, then nothing workx
jay_plesset at 2007-7-7 2:47:34 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 10

> No, nothing in imta.cnf.

>

> However, white space is important in the mappings

> file. I can't see here in the forum, but the line

> that does the message-save-copy needs to be indented

> with one space...... If it's not there, then nothing

> workx

- --

|SEND_ACCESS

|

| tcp_*|*|*|*@[127.*] $X5.1.2|$NBad$ destination$ system

| tcp_*|*|*|*@localhost.* $X5.1.2|$NBad$ destination$ system

| tcp_*|*|*|*@example.com $X5.1.2|$NBad$ destination$ system

| tcp_*|*|*|*@example.net $X5.1.2|$NBad$ destination$ system

| tcp_*|*|*|*@example.org $X5.1.2|$NBad$ destination$ system

| tcp_*|*|*|*@*.test $X5.1.2|$NBad$ destination$ system

| tcp_*|*|*|*@*.example $X5.1.2|$NBad$ destination$ system

| tcp_*|*|*|*@*.invalid $X5.1.2|$NBad$ destination$ system

| tcp_*|*|*|*@*.localhost $X5.1.2|$NBad$ destination$ system

|

|MESSAGE-SAVE-COPY

|

| ims-ms|*|D|/var/opt/SUNWmsgrs/queue/ims-ms/*/* $Y/var/opt/msinspool/$2/$3

|

|

|<IMTA_TABLE:mappings.locale

I put some pipes to show the syntaxis indented, and Im using email commands (telnet 0 25) to test the copies and the Communications Express.

Is this test proces correct?

Ram>

ram@qedcommx at 2007-7-7 2:47:34 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 11
Hi,This may not be related, but the path you have defined is not the default:/var/opt/SUNWmsgrs should be /var/opt/SUNWmsgsr/See how that goes.Shane.
shane_hjorth at 2007-7-7 2:47:34 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 12
Yes, the path was incorrect but still not work :-(Any cadicional Clue?Thanx Ram
ram@qedcommx at 2007-7-7 2:47:34 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 13

ims-ms|*|D|/var/opt/SUNWmsgrs/queue/ims-ms/*/* $Y/var/opt/msinspool/$2/$3

the above all on one line.

This means you want:

Messages COMING FROM ims-ms channel, ADDRESSED TO ims-ms channel to be captured.

However, no message can EVER come from the ims-ms channel. That channel is strictly for delivery to the store.

You will want to replace the left ims-ms with "tcp_local" for messages coming from outside.

then add another line with "tcp_intranet" for messages coming from your users.

jay_plesset at 2007-7-7 2:47:34 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 14

I was waiting for a SUN open ticket response, the info that they gave me was the same that Jay post here.

Then i configure other very old 5.2 messaging Server whit the same configuration as my new 6.2 messaging server (jus change the paths) and it works in 5.2 but not in 6.2.

My old server is:

iPlanet Messaging Server 5.2 HotFix 1.21 (built Sep 8 2003)

libimta.so 5.2 HotFix 1.21 (built 18:35:22, Sep 8 2003)

SunOS mail 5.9 Generic_112233-11 sun4u sparc SUNW,UltraSPARC-IIi-cEngine

The lines that i add to my 5.2 was:

MESSAGE-SAVE-COPY

tcp_local|*|D|/opt/iplanet/server5/msg-mail/imta/queue/tcp_local/*/* $Y/opt/iplanet/server5/msg-mail/imta/queue/msg_copy/$1

/$2

ims-ms|*|D|/opt/iplanet/server5/msg-mail/imta/queue/ims-ms/*/*$Y/opt/iplanet/server5/msg-mail/imta/queue/msg_copy/$1

/$2

tcp_intranet|*|D|/opt/iplanet/server5/msg-mail/imta/queue/*/* $Y/opt/iplanet/server5/msg-mail/imta/queue/msg_copy/$2/$3

Its posible that imsimta cnbuild does not take the new configuration and recompile it ?

Why the configuration works in 6.2-X86 and 5.2-Sparc but does not in 6.2-Sparc?

Ram

ram@qedcommx at 2007-7-7 2:47:34 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 15

Its posible that imsimta cnbuild does not take the new configuration and recompile it ?

Unless you get an error message when you run

imsimta cnbuild

the cnbuild was successful, and didn't find any gross errors.

Any config that works in 6.2 on x86 should work equally on sparc. It's the same code.

jay_plesseta at 2007-7-21 15:27:46 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 16

The issue was a convination of paths and $options.

Filany a setup the configuration to have copies of every in/out messages

this is my setup:

In mappings file add:

For the incomming messages

ims-ms|*|D|/opt/SUNWmsgsr/data/queue/ims-ms/*/* $Y/opt/SUNWmsgsr/data/queue/msg_in_copy

the owner for the msg_in_copy messagres have to be mailsrv and the group mail

For the outgoing messages:

tcp_local|*|D||/opt/SUNWmsgsr/data/queue/tcp_local/*/* $Y/opt/SUNWmsgsr/data/queue/msg_out_copy

the owner for the msg_out_copy messagres have to be mailsrv and the group mail

Now we need a shell script to change the ims-ms-daemon addres to the monitor address (you can use sed or a perl program) and copy the messages to the reprocess queue

Now use the imsimta cache -synch command to send all the messages to the monitor email address

Ram

ram@qed.com.mxa at 2007-7-21 15:27:46 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...