OPNsense Forum

Archive => 18.1 Legacy Series => Topic started by: ruggerio on March 20, 2018, 12:35:37 pm

Title: Postfix: virtual_maps and user-db
Post by: ruggerio on March 20, 2018, 12:35:37 pm
I try to set up postfix as a mailserver for incoming mails for mydomain.

I have the following questions:

- where can i set up a user-db or which one is used?
- how can i handle a virtual maps table for mapping E-Mail-adresses to users or mailboxes?
- where can i define the forwarding e.g. to dovecot on another Server? can i use lmtp?

Thanks,
Roger
Title: Re: Postfix: virtual_maps and user-db
Post by: mimugmail on March 20, 2018, 12:50:29 pm
Hi,

the postfix plugin acts only as a relay, so there won't be any local users, mailboxes or lmtp.
Title: Re: Postfix: virtual_maps and user-db
Post by: ruggerio on March 20, 2018, 12:55:46 pm
Hi,

This means, just as a relay for outgoing mail, not for incoming in that case?

Are there plans to Change this (e.g. db-plugin, ldap...)

Roger
Title: Re: Postfix: virtual_maps and user-db
Post by: mimugmail on March 20, 2018, 12:59:52 pm
Sure, also for incoming, but you have to use smtp in the transport table ..
Title: Re: Postfix: virtual_maps and user-db
Post by: ruggerio on March 20, 2018, 04:29:55 pm
i see, this means this here:

- Add a relayhost-entry to main.cf on the internal lan mailserver for outgoing mails to other Domains via opnsense

- Add mydomain.org smtp:mailserver.mydomain.org in the transport-file on the opnsense postfix and add the line transport_maps =  hash:/usr/local/etc/postfix/transport  in main.cf

I'll try that. Thx!
Roger

Title: Re: Postfix: virtual_maps and user-db
Post by: mimugmail on March 20, 2018, 05:42:54 pm
The relay host is only for outgoing mails. If you have a dynamic IP and a public server which relays for you then this is the host to set. If you have a static IP and a PTR you can use the firewall itself to relay to the world.

In Domains you set your internal domains and as host the internal mailserver.

That's all :)