From: Gijs on
On 3/10/10 15:37 , Wietse Venema wrote:
> Gijs:
>> On 3/10/10 15:05 , Ansgar Wiechers wrote:
>>> On 2010-03-10 Gijs wrote:
>>>
>>>> virtual_alias_maps = hash:/etc/postfix/virtual
>>>> virtual_mailbox_domains = mydomain.com myotherdomain.com
>>>> virtual_transport = lmtp:unix:/var/lib/imap/socket/lmtp
>>>>
>>>> /etc/postfix/virtual:
>>>> test(a)mydomain.com someuser
>>>> @mydomain.com catchalluser
>>>>
>>>> info(a)myotherdomain.com someotheruser(a)myotherdomain.com
>>>> @myotherdomain.com catchalluser(a)myotherdomain.com
>>>>
>>>> The mail to test(a)mydomain.com works as it should, but the mail to
>>>> info(a)myotherdomain.com always ends up in catchalluser(a)myotherdomain.com.
>>>> If I comment the catchall line for @myotherdomain.com, then it does get
>>>> delivered to the correct address.
>>>>
>>>> Does anyone know what the problem might be?
>>>>
>>> Did you try Postfix example configuration for virtual mailboxes?
>>>
>>> http://www.postfix.org/VIRTUAL_README.html#virtual_mailbox
>>>
>>> I think you're supposed to use $virtual_mailbox_maps rather than
>>> $virtual_alias_maps for virtual mailboxes.
>>>
>>> Regards
>>> Ansgar Wiechers
>>>
>> Thanks for your reply Ansgar.
>>
>> As far as I know virtual_mailbox is used when postfix delivers the
>> emails to the accounts itself, but I'm using Cyrus to do that. So the
>> use of virtual_alias should be correct in my setup. Unless I'm not
>> understanding the example right :)
>
> Then why are you using
>
> virtual_mailbox_domains = mydomain.com myotherdomain.com
>
> When in reality you should be using virtual_ALIAS_domains?
>
> Wietse
I tried that, but then I'm getting "user unknown in virtual alias
table". I read in the faq that I should list all email addresses for
each of the virtual domains I list in the virtual_alias_domains file,
but I don't really understand how (sorry, kinda new to all this
email-server-setup stuff, could be that my entire setup is completely
wrong tbh). No matter how and what I put into the virtual_alias_maps, it
always gives me that error. I only want the email for particular email
addresses/domains delivered locally to cyrus and possibly rewriting the
email address.

Gijs

From: Wietse Venema on
Gijs:
> On 3/10/10 15:37 , Wietse Venema wrote:
> > Gijs:
> >> On 3/10/10 15:05 , Ansgar Wiechers wrote:
> >>> On 2010-03-10 Gijs wrote:
> >>>
> >>>> virtual_alias_maps = hash:/etc/postfix/virtual
> >>>> virtual_mailbox_domains = mydomain.com myotherdomain.com
> >>>> virtual_transport = lmtp:unix:/var/lib/imap/socket/lmtp
> >>>>
> >>>> /etc/postfix/virtual:
> >>>> test(a)mydomain.com someuser
> >>>> @mydomain.com catchalluser
> >>>>
> >>>> info(a)myotherdomain.com someotheruser(a)myotherdomain.com
> >>>> @myotherdomain.com catchalluser(a)myotherdomain.com
> >>>>
> >>>> The mail to test(a)mydomain.com works as it should, but the mail to
> >>>> info(a)myotherdomain.com always ends up in catchalluser(a)myotherdomain.com.
> >>>> If I comment the catchall line for @myotherdomain.com, then it does get
> >>>> delivered to the correct address.
> >>>>
> >>>> Does anyone know what the problem might be?
> >>>>
> >>> Did you try Postfix example configuration for virtual mailboxes?
> >>>
> >>> http://www.postfix.org/VIRTUAL_README.html#virtual_mailbox
> >>>
> >>> I think you're supposed to use $virtual_mailbox_maps rather than
> >>> $virtual_alias_maps for virtual mailboxes.
> >>>
> >>> Regards
> >>> Ansgar Wiechers
> >>>
> >> Thanks for your reply Ansgar.
> >>
> >> As far as I know virtual_mailbox is used when postfix delivers the
> >> emails to the accounts itself, but I'm using Cyrus to do that. So the
> >> use of virtual_alias should be correct in my setup. Unless I'm not
> >> understanding the example right :)
> >
> > Then why are you using
> >
> > virtual_mailbox_domains = mydomain.com myotherdomain.com
> >
> > When in reality you should be using virtual_ALIAS_domains?
> >
> > Wietse
> I tried that, but then I'm getting "user unknown in virtual alias
> table". I read in the faq that I should list all email addresses for
> each of the virtual domains I list in the virtual_alias_domains file,

Instead of FAQs, consider reading the original documentation.

Domains go in virtual_alias_domains.

Addresses go in virtual_alias_maps.

Wietse

> but I don't really understand how (sorry, kinda new to all this
> email-server-setup stuff, could be that my entire setup is completely
> wrong tbh). No matter how and what I put into the virtual_alias_maps, it
> always gives me that error. I only want the email for particular email
> addresses/domains delivered locally to cyrus and possibly rewriting the
> email address.
>
> Gijs
>
>