Rewrite rules: how to forward all mails to the specific channel?

I have written an anti-virus plugin using the MTA SDK. Now I want to forward all the incoming messages to the channel, which is 'guarded' by my program (so my program is the channel's master).
I've added following to the end of imta.cnf, according to MTA SDK example:
! kav
x-kav master_debug logging
x-kav-daemon
And at the beginning of imta.cnf:
avp.ru $U%avp.ru@x-kav-daemon$Nx-kav
avp.ru $[email protected]
In this configuration, any incoming mail just miss my channel completely.
I changed it to this one:
$* $U%avp.ru@x-kav-daemon$Nx-kav
<2nd line removed>
in this case, mail is sent to our channel, but has host part '$*', and the message is failed to enqueue.
Also, it seems like this reqrite entry conflicts with ours:
! Rules to select local users
$* $A$E$F$U%$H$V$[email protected]
ultra5.avp.ru $U%$[email protected]
avp.ru $U%$[email protected]
As I understand, according to these rules, everything goes to @avp.ru or @ultra5.avp.ru goes to the local delivery channel ultra5.avp.ru. This is not what I want.
So, the questions are:
1. How to move all the messages (or just messages. which matched the specific domain) into my channel?
2. How to configure rewrite rules, so the message can leave the channel after processing, and continue the routing?

Still doesn't work.
We've downloaded and installed patch 116568-52, and configured the channels:
tcp_local aliasdetourhost tcp_scan smtp mx single_sys remotehost inner switchchannel identnonenumeric subdirs 20 maxjobs 7 pool SMTP_POOL maytlsserver maysaslserver saslswitchchannel tcp_auth missingrecipientpolicy 0
tcp-daemon
! tcp_intranet
tcp_intranet aliasdetourhost tcp_scan smtp mx single_sys subdirs 20 dequeue_removeroute maxjobs 7 pool SMTP_POOL maytlsserver allowswitchchannel saslswitchchannel tcp_auth missingrecipientpolicy 4 tcp_intranet-daemon
tcp_scan smtp mx single_sys subdirs 20 noreverse maxjobs 7 pool SMTP_POOL dequeue_removeroute
tcp_scan
After sending the message, it silently goes to tcp_scan channel, and handled by channel master program. After that the message stays in tcp_scan queue forever, with HELD extension.
Our channel master enqueues the processed message into the channel where it dequeues it, so the message seems to be looped. Here is the message:
t;1093881341
p;3
*;4
u;mailsrv
c;tcp_scan
s;tcp_scan.ultra5.avp.ru
n;f
h;<[email protected]>
m;[email protected]
d;20
j;rfc822
f;[email protected]
@tcp_scan:[email protected]
..Boundary_(ID_+ko348xG8vRKcadifuDhJg)
Received: from tcp_scan.ultra5.avp.ru by ultra5.avp.ru
(Sun Java System Messaging Server 6.1 HotFix 0.01 (built Jun 24 2004))
id <[email protected]> for [email protected] (ORCPT [email protected]
30 Aug 2004 19:55:41 +0400 (MSD)
Received: from tcp_scan.ultra5.avp.ru by ultra5.avp.ru
(Sun Java System Messaging Server 6.1 HotFix 0.01 (built Jun 24 2004))
id <[email protected]> for [email protected] (ORCPT [email protected]
30 Aug 2004 19:55:41 +0400 (MSD)
Received: from tcp_scan.ultra5.avp.ru by ultra5.avp.ru
(Sun Java System Messaging Server 6.1 HotFix 0.01 (built Jun 24 2004))
id <[email protected]> for [email protected] (ORCPT [email protected]
30 Aug 2004 19:55:41 +0400 (MSD)
Received: from tcp_scan.ultra5.avp.ru by ultra5.avp.ru
(Sun Java System Messaging Server 6.1 HotFix 0.01 (built Jun 24 2004))
id <[email protected]> for [email protected] (ORCPT [email protected]
30 Aug 2004 19:55:41 +0400 (MSD)
Received: from tcp_scan.ultra5.avp.ru by ultra5.avp.ru
(Sun Java System Messaging Server 6.1 HotFix 0.01 (built Jun 24 2004))
id <[email protected]> for [email protected] (ORCPT [email protected]
30 Aug 2004 19:55:40 +0400 (MSD)
Received: from tcp_scan.ultra5.avp.ru by ultra5.avp.ru
(Sun Java System Messaging Server 6.1 HotFix 0.01 (built Jun 24 2004))
id <[email protected]> for [email protected] (ORCPT [email protected]
30 Aug 2004 19:55:40 +0400 (MSD)
Received: from tcp_scan.ultra5.avp.ru by ultra5.avp.ru
(Sun Java System Messaging Server 6.1 HotFix 0.01 (built Jun 24 2004))
id <[email protected]> for [email protected] (ORCPT [email protected]
30 Aug 2004 19:55:40 +0400 (MSD)
Received: from tcp_scan.ultra5.avp.ru by ultra5.avp.ru
(Sun Java System Messaging Server 6.1 HotFix 0.01 (built Jun 24 2004))
id <[email protected]> for [email protected] (ORCPT [email protected]
30 Aug 2004 19:55:40 +0400 (MSD)
Received: from tcp_scan.ultra5.avp.ru by ultra5.avp.ru
(Sun Java System Messaging Server 6.1 HotFix 0.01 (built Jun 24 2004))
id <[email protected]> for [email protected] (ORCPT [email protected]
30 Aug 2004 19:55:40 +0400 (MSD)
Received: from tcp_scan.ultra5.avp.ru by ultra5.avp.ru
(Sun Java System Messaging Server 6.1 HotFix 0.01 (built Jun 24 2004))
id <[email protected]> for [email protected] (ORCPT [email protected]
30 Aug 2004 19:55:40 +0400 (MSD)
Received: from tcp_scan.ultra5.avp.ru by ultra5.avp.ru
(Sun Java System Messaging Server 6.1 HotFix 0.01 (built Jun 24 2004))
id <[email protected]> for [email protected] (ORCPT [email protected]
30 Aug 2004 19:55:40 +0400 (MSD)
Received: from localhost.localdomain ([172.16.0.35])
by ultra5.avp.ru (Sun Java System Messaging Server 6.1 HotFix 0.01 (bu
24 2004)) with ESMTP id <[email protected]> for test@avp.
(ORCPT [email protected]); Mon, 30 Aug 2004 19:55:39 +0400 (MSD)
Content-return: allowed
Date: Mon, 30 Aug 2004 19:55:39 +0400 (MSD)
Date-warning: Date header was inserted by ultra5.avp.ru
From: [email protected]
Subject: sent on Mon Aug 30 19:58:29 2004
To: Undisclosed recipients: ;
Message-id: <[email protected]>
..Boundary_(ID_+ko348xG8vRKcadifuDhJg)
How to avoid this loop? Should our master enqueue the processed messages into another channel? If yes, what channel should we enqueue to? If no, how to avoid this loop?

Similar Messages

  • How to download ALL MAIL from the server in a Mail app ?

    How to download ALL MAIL from the server in a Mail app ? I want all the mail messages, sent, received ON my computer... Thanks much !!!!!!!

    In Mail's Accounts/Mailbox Behavior preference pane make sure these 4 checkboxes are NOT checked:
    OT

  • Forward all mail, minus the attachments

    I'm trying to find a way to forward all emails in my inbox to my ipod touch, without the attachments. I'd still like the text from the emails with the attachments, just no attachments. I've looked around google, and i've trie playing with automator and the mail.app rules but have come up with nothing.
    Any help would really be appreciated.
    Ryan Monk

    HI,
    Try posting in the Mobile Me Forum also.
    Carolyn

  • Forwarding all mail from one ironport C170 to another (C160)

    Good Morning,
    Could someone tell me how to forward all mail which hits my ironport c170 at one site to another c160 at the other please?  I have tried adding SMTP routes but this doesnt seem to work.
    many thanks,
    Dave                  

    Hi,
    Yes we have done this.
    Message tracking log as follows...
    09 Apr 2013 14:58:41 (GMT +01:00)
    Protocol SMTP interface Data 2 (IP x.x.x.x) on incoming connection (ICID 59) from sender IP x.x.x.x. Reverse DNS host None verified no.
    09 Apr 2013 14:58:41 (GMT +01:00)
    (ICID 59) RELAY sender group Incoming Relay match [sendmail_server_ip] SBRS not enabled
    09 Apr 2013 14:58:41 (GMT +01:00)
    Start message 1114 on incoming connection (ICID 59).
    09 Apr 2013 14:58:41 (GMT +01:00)
    Message 1114 enqueued on incoming connection (ICID 59) from [email protected]
    09 Apr 2013 14:58:41 (GMT +01:00)
    Message 1114 on incoming connection (ICID 59) added recipient ([email protected]).
    09 Apr 2013 14:58:41 (GMT +01:00)
    Message 1114 incoming relay (sendmail_server): Header Received found, IP address 127.0.0.1 being used, SBRS not enabled
    09 Apr 2013 14:58:41 (GMT +01:00)
    Message 1114 contains message ID header '<'">201304091358.r39Dwe8Z004098@sendmail_server>'.
    09 Apr 2013 14:58:41 (GMT +01:00)
    Message 1114 (658 bytes) from [email protected] ready.
    09 Apr 2013 14:58:41 (GMT +01:00)
    Message 1114 matched per-recipient policy DEFAULT for outbound mail policies.
    09 Apr 2013 14:58:41 (GMT +01:00)
    Message 1114 scanned by Anti-Virus engine Sophos. Interim verdict: CLEAN
    09 Apr 2013 14:58:41 (GMT +01:00)
    Message 1114 scanned by Anti-Virus engine. Final verdict: Negative
    09 Apr 2013 14:58:41 (GMT +01:00)
    Message 1114 queued for delivery.

  • How to delete all mails with one klick?

    It's annoying to delete every single mail.
    How to delete all mails with one klick, like in the paperbasket?
    Thanks

    If the emails have been previously deleted (I.e. in the trash folder), tap Edit at the top of the list. You should see a delete all button at the bottom. If the messages are in a standard folder, they need to be handled one at a time.

  • Can someone tell me how to delete all mails together

    hello,
    can someone tell me how to delete all mails together on IPad?

    You can only delete them individually to the Trash folder. From there you can delete them in one go - Edit> Delete all from the bottom!

  • How to mark all mail read?

    Anyone have any idea how to mark all mail read instead of going through all of them?

    It's one of those *** was Apple thinking issues. No, you can not mass delete emails. It's one-by-one only. Sorry.

  • How to Forward Apple Mail

    Can you tell me how to forward apple mail? I need a more powerful junk/spam screener that Yahoo.com provides....
    <E-mail Edited by Host>

    Not sure I understand correctly:
    Apple Mail is a desktop email client; Yahoo is an online email service.
    Is your problem that Apple Mail does not filter junk mail well enough? And you want to open your Apple Mail in Yahoo Mail?
    Or are you currently getting your Yahoo mail forwarded to Apple Mail and opening it on Apple Mail?

  • How do you disable the shortcut key in Mail that deletes all mail in the trash folder

    Is there a way to disable the shortcut key in Mail in Mountain Lion that deletes all mail in the Trash folder in all accounts: <shift><command><delete> ?
    I did it once by mistake and it deleted all my trash - it is very difficult to restore when there are thousands of messages in various emaiil accounts.
    Thanks

    While you can't (so far as I know) remove it - you can assign a different (& less likely to be used accidentally) one via System Preferences - Keyboard - Shortcuts.
    Go there, create a new one (or 2) for Mail only, and give it the exact name(s) if the menu item(s) in question, capitalisation & ... included.
    Below is on 10.6, but the idea's the same

  • How to fetch forgotten mails from the server

    Possibly due to aborted fetch cycles some mails are left on my GMX-POP account and will not be fetched when I poll my mails next time. This happens only since some weeks but since there three times. Possibly something changed either in the Apple Mail program or how the server behaves? Is there a way to fetch this lost mails?
    Obviously mails saves the time of the last poll. How can I reset this time to a date older the last unfetched mail to refetch all mails inclusive the lost ones? For sure then I will have duplicated mails. Is there a way to easily remove this duplicates without deleting it individually?
    Many thanks for your help,
    Werner

    Ernie,
    thanks for your suggestions. It seems my problem can't be solved in a smart way. To your question: My server space is limited ( 1 GB ), I use currently about 2/3 of it.
    I have access to the mails via the web interface and therefore I could forward the mails to my account but I would like to have all mails local on my Mac with the original time stamps and format. But that's not the case for forwarded mails. In addition for sure the problem is not solved, if I cure the current symptoms and I have no idea if it's caused by an update of my Mac or by the server.
    Werner

  • I have 2 iphones and a macbook on one mobile me account.  How can I keep mail in the macbook and one iphone private from the other iphone?

    I have an iPhone 3G, an iPhone 3GS, and a MacBook on one macmail and mobile me account.  How can I keep mail on the MacBook and iPhone 3 private from the iPhone 3GS?

    Pretty much. I don't understand why you need to worry about MobileMe, though. I'd guess the vast majority of us with iDevices don't have MobileMe accounts at all. That's pretty much why it failed.

  • TS3276 How can I block mail from a specific email address?

    How can I block mail from a specific email address?

    Create a Rule
    Mail menu
    You can choose the Delete option from the drop down list or you can move the message to a specific folder.

  • I can't find a preference to keep mail on the server as it's deleted on individual devices. We have 4 Mac devices and a PC running W8 with the iCloud control panel. How can we keepthe mail on the server as it is deleted from the individual devices?

    How do I keep mail on the server as it is deleted on individaul devices? We have 4 Apple devices and a W8 laptop. We sort and read mail on all of them, but have found that deleting mail on one deletes it on all of them.

    Yahoo and Gmail both support POP if you wish.
    All modern email systems are Imap (because it supports multiple and mobile devices)
    I do not recommend POP under any circumstances, it can not be synchronized so unless you do not use Mobile devices at all (iPhones etc) it is useless.
    Yahoo users (search this site) have endless problems and Gmail is highly non-standard. Expect a learning curve for that one.
    Are you short of server space, why do you need to do this rather retrograde step?

  • Me and my partner are currently using the same apple id and have no space left on our devices. We are currently waiting on the iphone 6 plus to arrive and don't know how to transfer all data to the new phones.

    Me and my partner are currently using the same apple id and have no space left on our devices. We are currently waiting on the iphone 6 plus to arrive and don't know how to transfer all data to the new phones.?

    I don't know if I'm asking this all in a way that can be understood? Thanks ED3K, however that part I do understand (in the link you provided!)
    What I need to know is "how" I can separate or rather create another Apple ID for my son-who is currently using "my Apple ID?" If there is a way to let him keep "all" his info on his phone (eg-contacts, music, app's, etc.) without doing a "reset?') Somehow I need to go into his phone's setting-create a new Apple ID and possibly a new password so he can still use our combined iCloud & Itunes account?
    Also then letting me take back my Apple ID & password, but again allowing us (my son and I) to use the same iCloud & Itunes account? Does that make more sense??? I'm sincerely trying to get this cleared up once and for all----just need guidance from someone who has a true understanding of the whole Apple iCloud/Itunes system!
    Thanks again for "anyone" that can help me!!!

  • How to show all items in the reading list? I think this option has been removed in Safari Version 7.0.2

    How to show all items in the reading list? I think this option has been removed in Safari Version 7.0.2

    Thanks. That solved it. I had my doubts since I wasn't concerned about my lost bookmarks. I was concerned about the broken functionality. In any event, restoring from a backup solved both the functionality and the lost bookmarks. I appreciate the response!

Maybe you are looking for