<p dir="ltr">Problem is that MS cannot make a difference between To: and Cc: (or even Bcc:) recipients... In the envelope (SMTP conversation) they are all RCPT TO:...  So you&#39;d need something else to do t ge distinction... SpamAssassin rule and the SA rule hit thing in MS should be sble to do the trick.</p>
<p dir="ltr">Cheers!<br>
-- <br>
-- Glenn </p>
<div class="gmail_quote">Den 23 dec 2014 15:43 skrev &quot;Nerijus Baliunas&quot; &lt;<a href="mailto:nerijusb@dtiltas.lt">nerijusb@dtiltas.lt</a>&gt;:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 23 Dec 2014 15:11:32 +0200 Nerijus Baliunas &lt;<a href="mailto:nerijusb@dtiltas.lt">nerijusb@dtiltas.lt</a>&gt; wrote:<br>
<br>
&gt; Messages are archived correctly. The problem is, when the message is sent like this:<br>
&gt; To: <a href="mailto:user1@externaldomain.lt">user1@externaldomain.lt</a><br>
&gt; Cc: <a href="mailto:user2@domain.lt">user2@domain.lt</a><br>
&gt;<br>
&gt; The message is sent to both <a href="mailto:user1@backup.domain.lt">user1@backup.domain.lt</a> and <a href="mailto:user2@backup.domain.lt">user2@backup.domain.lt</a>.<br>
&gt; Is it possible TOUSER in above rule to be used only if recipient domain is local, i.e. <a href="http://domain.lt" target="_blank">domain.lt</a>?<br>
<br>
I use postfix and have in <a href="http://main.cf" target="_blank">main.cf</a>:<br>
virtual_mailbox_domains = proxy:mysql:/etc/postfix/sql/<a href="http://mysql_virtual_domains_maps.cf" target="_blank">mysql_virtual_domains_maps.cf</a>, <a href="http://backup.domain.lt" target="_blank">backup.domain.lt</a><br>
virtual_transport = dovecot<br>
dovecot_destination_recipient_limit = 1<br>
backup_destination_recipient_limit = 1<br>
<br>
transport:<br>
<a href="http://backup.domain.lt" target="_blank">backup.domain.lt</a>           backup:<br>
<br>
<a href="http://master.cf" target="_blank">master.cf</a>:<br>
dovecot   unix  -       n       n       -       -       pipe<br>
  flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/dovecot-lda -f ${sender} -d ${user}@${nexthop}<br>
<br>
backup   unix  -       n       n       -       -       pipe<br>
  flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/dovecot-lda -f ${sender} -d <a href="mailto:backup@domain.lt">backup@domain.lt</a> -m ${user}<br>
<br>
So all the backup email goes to <a href="mailto:backup@domain.lt">backup@domain.lt</a> mailbox and subdirs (named as<br>
expanded _TOUSER_) are created because of -m ${user}. The problem is, that<br>
subdirs are created even for external users, if a message is sent To: <a href="mailto:user1@externaldomain.lt">user1@externaldomain.lt</a><br>
and Cc: <a href="mailto:user2@domain.lt">user2@domain.lt</a>.<br>
<br>
Regards,<br>
Nerijus<br>
--<br>
MailScanner mailing list<br>
<a href="mailto:mailscanner@lists.mailscanner.info">mailscanner@lists.mailscanner.info</a><br>
<a href="http://lists.mailscanner.info/mailman/listinfo/mailscanner" target="_blank">http://lists.mailscanner.info/mailman/listinfo/mailscanner</a><br>
<br>
Before posting, read <a href="http://wiki.mailscanner.info/posting" target="_blank">http://wiki.mailscanner.info/posting</a><br>
<br>
Support MailScanner development - buy the book off the website!<br>
</blockquote></div>