Roundcube Community Forum
News and Announcements => General Discussion => Topic started by: Gamecock on September 17, 2018, 11:17:27 AM
-
Hi,
1st question:
How to login to RoundcubeWebmail in email format instead of username? (e.g. info@example.com)
2nd question:
I have 2 domains connected to my VPS. (e.g. example1.com , example2.com)
How to send and receive email (and also login) via two separated mailboxes and hostnames ?
I use Bind9 for my DNS server and use Postfix/Dovecot for email server.
My named config files:
named.conf.local file:
zone "example1.com" {
type master;
file "/etc/bind/db.example1.com";
};
zone "example2.com" {
type master;
file "/etc/bind/db.example2.com";
};
zone "190.56.135.in-addr.arpa" {
type master;
file "/etc/bind/db.179";
};
db.example1.com file:
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns1.example1.com. root.example1.com. (
2 ; Serial
86400 ; Refresh
7200 ; Retry
2419200 ; Expire
7200 ) ; Negative Cache TTL
;
@ IN NS ns1.example1.com.
@ IN NS ns2.example1.com.
@ IN A 135.56.190.179
ns1 IN A 135.56.190.179
ns2 IN A 135.56.190.179
@ IN MX 0 mail.example1.com.
mail IN A 135.56.190.179
www IN A 135.56.190.179
db.example2.com file:
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns1.example1.com. root.example2.com. (
2 ; Serial
86400 ; Refresh
7200 ; Retry
2419200 ; Expire
7200 ) ; Negative Cache TTL
;
@ IN NS ns1.example1.com.
@ IN NS ns2.example1.com.
@ IN A 135.56.190.179
ns1 IN A 135.56.190.179
ns2 IN A 135.56.190.179
@ IN MX 0 mail.example2.com.
mail IN A 135.56.190.179
www IN A 135.56.190.179
db.example2.com file:
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns1.example1.com. root.example2.com. (
2 ; Serial
86400 ; Refresh
7200 ; Retry
2419200 ; Expire
7200 ) ; Negative Cache TTL
;
@ IN NS ns1.example1.com.
@ IN NS ns2.example1.com.
@ IN A 135.56.190.179
ns1 IN A 135.56.190.179
ns2 IN A 135.56.190.179
@ IN MX 0 mail.example2.com.
mail IN A 135.56.190.179
www IN A 135.56.190.179
db.179 file:
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns1.example1.com. root.example1.com. (
2 ; Serial
86400 ; Refresh
7200 ; Retry
2419200 ; Expire
7200 ) ; Negative Cache TTL
;
@ IN NS ns1.example1.com.
@ IN NS ns2.example1.com.
179 IN PTR ns1example1.com.
Note: In addition to separate domains, I also want the hostnames to be different.
e.g.:
info@example1.com => mail.example1.com
info@example2.com => mail.example2.com
I have read some documentation but I really confused because I'm new in mail server configurating.
OS: Ubuntu 18.04 LTS x86-64
Web Server: NGINX
PHP Version: 7.2
Thank for your guides.
Regard
-
How to login to RoundcubeWebmail in email format instead of username? (e.g. info@example.com)
The format of the username is defined by your IMAP server. Roundcube can do nothing about that. But Roundcube ships with some plugins which might help. One of virtuser_file or virtuser_query can be used to do lookups based on what the user enters in the username box and translate it into what the IMAP server expects.
How to send and receive email (and also login) via two separated mailboxes and hostnames ?
Have a read through the config file. The `default_host` and `smtp_server` optoins support a selection of macros which let you build dynamic values. These options can also be set via a plugin - e.g. as part of the reponse from the virtual user lookup.