You can use any system account
adduser usernameNote: to read those local emails in Linux check file /var/mail/<username>
or
Virtual Domain at /etc/postfix/virtual
1. You should have a virtual domain, exclude this at "mydestination", see Postfix
guide
vi /etc/postfix/main.cf virtual_alias_domains = example.com, example2.com, ... virtual_alias_maps = hash:/etc/postfix/virtual2. create a addresses file (/etc/postfix/virtual)
vi /etc/postfix/virtual postmaster@example.com postmaster info@example.com joe sales@example.com jane # Uncomment entry below to implement a catch-all address # @example.com jim ...virtual aliases for more domains... postmap /etc/postfix/virtual postmap /etc/postfix/vmailbox postfix reload postfix stop postfix start newaliases service postfix restart postsuper -d ALL <= delete all mails in queue vi /var/log/mail.log grep postfix /var/log/syslog
vi /etc/postfix/main.cf virtual_mailbox_domains = example.com virtual_mailbox_base = /var/mail/vhosts <= base folder fo all mailboxes virtual_mailbox_maps = hash:/etc/postfix/vmailbox <= subdirectories per mailbox virtual_minimum_uid = 100 <= for safety virtual_uid_maps = static:5000 <= system user for all emails virtual_gid_maps = static:5000 <= system group for all emails virtual_alias_maps = hash:/etc/postfix/virtual <= email addresses vi /etc/postfix/vmailbox <= folders for mailboxes info@example.com example.com/info sales@example.com example.com/sales/ # Comment out the entry below to implement a catch-all. # @example.com example.com/catchall /etc/postfix/virtual: postmaster@example.com postmaster
Postfix is a mail server and it is used to forward mails to username@your-domain.de to any external account.
(Hint: It does not matter, if your-domain.de is a redirection to any other server like euve1234.vserver.de)
The postfix setup is described here,
but I had to modify it a little:
1. Installation
> su > apt-get update > apt-get install postfix > postfix reload2. Check
> postfix check > nmap localhost -p 25 > telnet localhost 25 > postconf -d > tail /var/log/mail.log
> apt-get install nmap3. Configure Postfix (edit /etc/postfix/main.cf)
myorigin=your-domain.de myhostname=your-domain.de relay_domains=your-domain.de
mydestination = your-domain.de, ... mynetworks = 5.45.105.135/8 ...
Disable
# myorigin = /etc/mailname
# anti-spam: smtp restrictions smtpd_recipient_restrictions = reject_invalid_hostname, reject_unknown_recipient_domain, reject_unauth_destination, reject_rbl_client sbl.spamhaus.org, permit smtpd_helo_restrictions = reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, reject_unknown_helo_hostname smtpd_client_restrictions = reject_rbl_client dnsbl.sorbs.net
inet_interfaces = all
> service postfix restart
4. Setup email users
# This means that anyuser@your-domain.de will be forwarded to mailuser@mailprovider.de anyuser: mailuser@mailprovider.deHint: You should setup at least following email addresses
> postconf -e "alias_maps=hash:/etc/aliases" > newaliases > postfix reload [or service postfix restart]