On Fri, Sep 19, 2014 at 01:22:33AM +0200, Peter Henning wrote:
> Hello
> 
> Can the %{..} expansions be used in a "virtual <users>" table? I'm
> trying to rewrite the domain part of incoming mail for a virtual
> domain, so that mail received for b...@a.com is mapped to b...@b.com
> and then relayed to B.local, like this:
> 
> $ cat /etc/mail/smtpd.conf
> #
> table virtdomains file:/etc/mail/virtdomains
> table virtusers file:/etc/mail/virtusers
> #
> accept from any domain <virtdomains> virtual <virtusers>
> accept from any for domain "B.com" relay via smtp://B.local
> 
> $ cat /etc/mail/virtdomains
> A.com
> 
> $ cat /etc/mail/virtusers
> @A.com %{rcpt.user}@B.com
> 
> (Tested using 5.4.2p1 on Ubuntu). Doesn't work, the %{rcpt.user} is
> sent literally and not replaced with the original user-part of the
> mail.
> 
> If there's a mistake or a better way please give me a clue?
>
> Thanks,
> Peter.

Hi Peter.

It doesn't work because format expansion only happens for the mda path.
But your suggestion is interresting.  Maybe we can generalize it a bit.
Can you file a ticket on the tracker?

Thanks,
Eric.

-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org

Reply via email to