Multiple domains / multiple emails / postfix dovecot squirrelmail

It's been a week since I tried to setup a mail service on my linode server. what I have so far installed are postfix dovecot squirrelmail

my dns is passing through cloudflare and then I can map squirrel.mywebsite.com correctly, so I can actually see the login page

Now, my server is hosting multiple websites, so I would like to create multiple emails such as

info@mywebsite1.com info@mywebsite2.com info@mywebsite3.com

etc …. and not having to create a new linux user for each email

How can I achieve this ?

Thank you

6 Replies

Use a database as your user source for postfix, instead of Linux users. See ~~[https://linode.com/docs/email/email-with-postfix-dovecot-and-mysql" target="_blank">](https://linode.com/docs/email/email-wit … -and-mysql">https://linode.com/docs/email/email-with-postfix-dovecot-and-mysql](

@dwfreed:

Use a database as your user source for postfix, instead of Linux users. See ~~[https://linode.com/docs/email/email-with-postfix-dovecot-and-mysql" target="_blank">](https://linode.com/docs/email/email-wit … -and-mysql">https://linode.com/docs/email/email-with-postfix-dovecot-and-mysql](

Can confirm, I have had this working for several years. Adding a new user is just running an SQL insert. If I had many I'd work up a UI.

Ok I am following the tutorial, and I am wondering

1 - about the postfix main.cf file, my hostname

should I write [myhostname].members.linode.com

or [myhostname].mywebsite.com ?

2 - also in the same file, there is a mention to

smtpdtlscert_file=/etc/dovecot/dovecot.pem

smtpdtlskey_file=/etc/dovecot/private/dovecot.pem

but when I look into my system I don't have these .pem files

3 - I am missing these lines

Enabling SMTP for authenticated users, and handing off authentication to Dovecot

smtpdsasltype = dovecot

smtpdsaslpath = private/auth

smtpdsaslauth_enable = yes

4 - still in the tutorial about postfix main.cf there is

mydestination = localhost

mine is

mydestination = /etc/postfix/local-host-names

I am still struggling, with this installation : (

Do you know any command lines or log files to test each services ?

dovecot

postfix

squirrelmail

So I can better narrow my problem(s)

Thanks a lot

ok so when I do

telnet mail.mydomain.com 25

=

telnet unable to connect to remote host timeout

netstat -tap

=

(Not all processes could be identified, non-owned process info

will not be shown, you would have to be root to see it all.)

Active Internet connections (servers and established)

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name

tcp 0 0 *:imap2 *:* LISTEN -

tcp 0 0 localhost:urd : LISTEN -

tcp 0 0 MYHOST:domain : LISTEN -

tcp 0 0 localhost:domain : LISTEN -

tcp 0 0 *:ssh *:* LISTEN -

tcp 0 0 localhost:smtp : LISTEN -

tcp 0 0 localhost:953 : LISTEN -

tcp 0 0 localhost:mysql : LISTEN -

tcp 0 0 localhost:submission : LISTEN -

tcp 0 528 MYHOST:ssh 207.253.225.203:55567 ESTABLISHED -

tcp6 0 0 [::]:imap2 [::]:* LISTEN -

tcp6 0 0 [::]:http [::]:* LISTEN -

tcp6 0 0 [::]:domain [::]:* LISTEN -

tcp6 0 0 [::]:ssh [::]:* LISTEN -

tcp6 0 0 localhost:953 [::]:* LISTEN -

netstat -nr

=

Kernel IP routing table

Destination Gateway Genmask Flags MSS Window irtt Iface

0.0.0.0 23.*..1 0.0.0.0 UG 0 0 0 eth0

23.*..0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

ps aux|grep postfix

=

postfix 18345 0.0 0.2 67476 4456 ? S 10:15 0:00 pickup -l -t un ix -u -c

canado 18761 0.0 0.0 14232 924 pts/0 S+ 11:37 0:00 grep –color=au to postfix

root 26887 0.0 0.2 65408 4464 ? Ss Sep20 0:00 /usr/lib/postfi x/sbin/master

postfix 26889 0.0 0.2 67644 4604 ? S Sep20 0:00 qmgr -l -t unix -u

netstat -antup|grep 25

=

(Not all processes could be identified, non-owned process info

will not be shown, you would have to be root to see it all.)

tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN -

tcp 0 256 23.*..201:22 207.253.225.203:55567 ESTABLISHED -

iptables -L|grep 25

=

ACCEPT all – 192.168.255.0/24 anywhere state NEW

4. Your mailserver is only listening on localhost

  1. Most ISPs block outbound port 25 outside of their network; configure postfix to listen on port 587 as well

  2. iptables -L is useless. Always use iptables -L -nv

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct