Hi,

I would like to divert mail for postmas...@mydomain.info from the usual
Exchange server to my account on some other internal server:

# postconf | grep "^mydomain"
mydomain = mydomain.info

/etc/postfix/virtual:
---------------------
postmaster              rdahlem@internal.domain

/etc/postfix/transport:
-----------------------
internal.domain         smtp:[someserver.mydomain.info]
.internal.domain        smtp:[someserver.mydomain.info]
mydomain.info           smtp:[exchange.mydomain.info]
.mydomain.info          smtp:[exchange.mydomain.info]

For mail from external sources that works:

postfix/smtpd[12040]: BFC6AA6606:
        client=unknown[212.227.15.19]
postfix/cleanup[12045]: BFC6AA6606:
        message-id=<55ba23cf.6000...@gmx.net>
postfix/qmgr[29471]: BFC6AA6606:
        from=<robert.dah...@gmx.net>, size=2044, nrcpt=1 (queue active)
postfix/smtp[12046]: BFC6AA6606:
        to=<rdahlem@internal.domain>,
        orig_to=<postmas...@mydomain.info>,
        relay=127.0.0.1[127.0.0.1]:10024, delay=3.7,
        delays=3.2/0/0.01/0.51, dsn=2.0.0, status=sent
        (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025):
        250 2.0.0 Ok: queued as 4ECCDA661A)
postfix/qmgr[29471]: BFC6AA6606: removed

Mail gets sent to Amavis after being re-addressed. Then:

postfix/smtpd[12058]: 4ECCDA661A:
        client=localhost[127.0.0.1],
        orig_queue_id=BFC6AA6606, orig_client=unknown[212.227.15.19]
postfix/cleanup[12045]: 4ECCDA661A:
        message-id=<55ba23cf.6000...@gmx.net>
postfix/qmgr[29471]: 4ECCDA661A:
        from=<robert.dah...@gmx.net>, size=2697, nrcpt=1 (queue active)
postfix/smtp[12059]: 4ECCDA661A:
        to=<rdahlem@internal.domain>,
        relay=someserver.mydomain.info[10.4.5.6]:25,
        delay=0.11, delays=0.03/0.01/0.01/0.07, dsn=2.0.0, status=sent
        (250 2.0.0 t6UDGwQb007363 Message accepted for delivery)
postfix/qmgr[29471]: 4ECCDA661A: removed

But in the case of mail originating from Amavis for
postmas...@mydomain.info that does not work:

postfix/smtpd[22114]: BD772A661A:
        client=localhost[127.0.0.1]
postfix/cleanup[22101]: BD772A661A:
        message-id=<vazxbm1egsc...@mx1.mydomain.info>
postfix/qmgr[4567]: BD772A661A:
        from=<postmas...@mydomain.info>,
        size=2591, nrcpt=1 (queue active)
postfix/smtp[22115]: BD772A661A:
        to=<postmas...@mydomain.info>,
        relay=exchange.mydomain.info[10.1.2.3]:25,
        delay=5.2, delays=0.07/0.01/0.08/5.1, dsn=5.1.1,
        status=bounced (host exchange.mydomain.info[10.1.2.3] said:
        550 5.1.1 User unknown (in reply to RCPT TO command))
postfix/bounce[22117]: BD772A661A:
        sender non-delivery notification: E897EA675D
postfix/qmgr[4567]: BD772A661A: removed

Why is /etc/postfix/virtual ignored in the second case and what should I
do about that?

Kind regards,
Robert

Reply via email to