giacomo: > > > > > I would like to split this email on the relative folder of the > > > > > target user of domain. The internal mail server use postfix. The > > > > > server work fine with virtual user sending e receiving mail > > > > > internally. It's possible this operation? Is there any program > > > > > or procedure to use with postfix to do this? > > > > > > > > You "should" be able to do this with a fetchmail-like program that > > > > looks at the Postfix X-Original-To address header. > > > > > > > > DO NOT USE the To: address header for this purpose. Doing so will > > > > result in delivery loops with mailing list articles. For example, > > > > this reply message does not have your address in the To: header; > > > > and you would be sending it back to postfix-users@postfix.org. > > > > That would cause you to lose your mailing list membership. > > I've one problem, the messages are without X-Original-To header. ... > Received: from isp.mailserver.com ([xxx.x.x.x]) > by localhost (isp.mailserver.com [xxx.x.x.x]) (amavisd-new, port 10024) > with ESMTP id 7FO08wsiMVCK for <catch...@realdomain.com>; > Fri, 3 Oct 2014 18:05:00 +0200 (CEST)
As you see above, the ISP expands virtual aliases before their content filter. I suspect that this is why they lose the original recipient. > Received: from mail.somedomain.com (mail.somedomain.com [yyy.yyy.yyy.yy]) > by isp.mailserver.com (Postfix) with ESMTP id F09FD4AC55F > for <us...@realdomain.com>; Fri, 3 Oct 2014 18:04:57 +0200 (CEST) I don't understand how the conversion from catch...@realdomain.com to us...@realdomain.com is done. Regardless, the Postfix Received: header does not show the recipient with multi-recipient mail. So it is not a good indicator of who the email was addressed to. > From: "News" <n...@somedomain.com> > To: us...@realdomain.com As mentioned, the To: header must not be used - it does not work for BCC recipients. For example, this email reply does not have you in the To: header. If you were to deliver this email based on the To: header then you would be sending it right back to the postfix-users mailing list. Wietse