0

I'm currently trying to understand the process of creating a mail server by following this guide, among others.

I currently have a website of the form example.tk by way of a Digital Ocean droplet on Ubuntu 20.04 and am attempting to have my mail server operate on mail.example.tk.

We are going to introduce the email address and passwords associated for each domain. Make sure you change all the info with your specific information.

INSERT INTO `servermail`.`virtual_users`
(`id`, `domain_id`, `password` , `email`)
VALUES
('1', '1', ENCRYPT('firstpassword', CONCAT('$6$', SUBSTRING(SHA(RAND()), -16))), 'email1@example.com'),
('2', '1', ENCRYPT('secondpassword', CONCAT('$6$', SUBSTRING(SHA(RAND()), -16))), 'email2@example.com');

I haven't the slightest clue of what to put for 'email1@example.com' and 'email2@example.com'. I have a domain for my website, and the mail subdomain I want to use, but I have no clue which email addresses to put here. I am a complete beginner, and the only email address I have access to is my personal email address. Am I meant to make up email addresses or something? My example.tk website has no email addresses associated with it.

5
  • 2
    You create what ever email addresses you need. – hardillb Jan 18 at 14:54
  • @hardillb So I can literally put whatever address I want for that as long as it is @ my domain name? – sangstar Jan 18 at 16:28
  • Yes, it's your domain, you can have what ever addresses you want – hardillb Jan 18 at 16:38
  • @hardillb, I see, and I can declare it right here in this SQL code? How do I juxtapose that with the user I make granted select called usermail? – sangstar Jan 18 at 17:05
  • We are now beyond the scope of the original question. I suggest you post at the postfix docs. Unless you are running a huge number of users the flat file version is probable simpler to get your head round – hardillb Jan 18 at 17:48
1

If you don't use virtual users, it means you need create a normal user (by adduser command), then use the user directly in mail server MTA (e.g Postfix). In this case, the normal user can even use ssh logins and other normal actions for a Linux user.

But when you use a virtual user (recommended), that user is just for mail server and normally don't have ability for other actions.

Also, there are some other differences. for example when you use a database instead of Linux normal user, you can backup and easily manage (import, export) them with database advantages.

Also, instead of using database commands to create tables and users, you can use some applications like Postfix.Admin .

4
  • How do I square that with the user I created earlier in the tutorial usermail? – sangstar Jan 18 at 17:05
  • @sangstar use same user email address and create it in database. – Omid Estaji Jan 18 at 17:19
  • Can you explain why one ought to do that? – sangstar Jan 18 at 23:53
  • @sangstar I tried explain differences and advantages of using a database and virtual users. for limited and personal usages, you can use normal linux users, but for real business goals, you need virtual users. – Omid Estaji Jan 19 at 17:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.