Hi,
I am new to Linux so I hope to get some help setting up my mail server.
The host name of my linode is lixxx.members.linode.com and I am running Ubuntu 7.10. I installed postfix by "apt-get install postfix".
I am hosting multiple domains (e.g. foo.com and bar.com) I'd like to setup an email server so that I can send mails from
user@foo.com and
user@bar.com. I am basically following the tutorial at
http://www.akadia.com/services/postfix_ ... boxes.html
My main.cf is as follows:
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = lixxx.members.linode.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = lixxx.members.linode.com, localhost.members.linode.com, , localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
#my own stuff
virtual_mailbox_domains = foo.com, bar.com
virtual_mailbox_base = /var/spool/mail
The content in /var/spool/mail:
root@lixxx:/var/spool/mail # ll
total 24
drwxr-sr-x 2 root mail 4096 Mar 27 01:26 foo.com
drwxr-sr-x 2 root mail 4096 Mar 27 01:26 bar.com
I also modified the DNS settings of my domains in my registrar:
A record foo.com (my linode's IP)
C record mail.foo.com (my linode's host name, i.e. lixxx.members.linode.com)
MX record lixxx.members.linode.com
After all this, when I send mails to
user@foo.com I got all of them bounced back. The error message was like:
<user@foo.com>: unknown user: "user@foo.com"
Reporting-MTA: dns; lixxx.members.linode.com
X-Postfix-Queue-ID: F0889C8C6
X-Postfix-Sender: rfc822;
jamesl@yahoo.ca
Arrival-Date: Thu, 27 Mar 2008 04:47:54 -0400 (EDT)
What have I done wrong? Is it a file permission problem since the mail folders belong to root? Do I need a client besides postfix to read mail? Any help is much appreciated!