Randy Ramsdell:
> > /etc/postfix/main.cf:
> >      virtual_alias_maps = hash:/etc/postfix/virtual
> >
> > /etc/postfix/virtual:
> >      # All example.com users become mails...@example.net.
> >      @example.com   mails...@example.net
> >
> >      # Except for f...@example.com, which stays itself.
> >      f...@example.com       f...@example.com
> >
> >      # And except for b...@example.com, which goes elsewhere.
> >      b...@example.com       other@elsewhere
> >
> > See http://www.postfix.org/DATABASE_README.html for tips to translate
> > this into other database formats.
> >
> >     Wietse
> ahh however we need :
> 
> @        singleuser@domain.
> 
> I tried this but does not work.

No surprise. The form "@" is not documented anywhere.

If you really must rewrite any domain, use regular expressions instead.

/etc/postfix/main.cf:
    virtual_alias_maps = 
        hash:/etc/postfix/virtual pcre:/etc/postfix/virtual.pcre

/etc/postfix/virtual:
    # f...@example.com stays itself.
    f...@example.com    f...@example.com

    # b...@example.com goes elsewhere.
    b...@example.com    other@elsewhere

/etc/postfix/virtual.pcre:
    # Everything else goes to the mailsink.
    /./                 mails...@example.net

        Wietse

Reply via email to