| Linode Forum https://forum.linode.com/ |
|
| postfix help needed https://forum.linode.com/viewtopic.php?f=11&t=3178 |
Page 1 of 1 |
| Author: | jamesl [ Thu Mar 27, 2008 4:46 am ] |
| Post subject: | postfix help needed |
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! |
|
| Author: | pclissold [ Thu Mar 27, 2008 5:54 am ] |
| Post subject: | |
You don't seem to have virtual_mailbox_maps implemented. This maps user@domain.tld to /var/spool/domain/user_mailbox. |
|
| Author: | nabber00 [ Thu Mar 27, 2008 3:49 pm ] |
| Post subject: | |
You might also want to look at virtual_alias_maps. This is similar to a normal /etc/aliases file and allows you to deliver the mail to a local user as usual, or forward: postmaster@foo.com root user@bar.com localuser forward@bar.com user@someother.com This way you can read your mail any way you normally would on that system. |
|
| Author: | jamesl [ Thu Mar 27, 2008 5:06 pm ] |
| Post subject: | |
pclissold wrote: You don't seem to have virtual_mailbox_maps implemented. This maps user@domain.tld to /var/spool/domain/user_mailbox.
Thank you very much pclissold! It's right on! I created the virtual_mailbox_maps text file but forget to linked to it in the main.cf. I should mentioned that postfix expects a .db file so I convert the text file to .db using the postmap command. After that, I created a "vmail" user with uid and gid = 5000 and add the following lines to the main.cf file: virtual_uid_maps = static:5000 virtual_gid_maps = static:5000 I also changed the mailbox folders to be owned by the "vmail" user. Now things seem to work. I grep the mail files and can see the incoming emails as text. What I really want to do is to access my mails from the web. Any recommendations on the software I should use? One thing I still can't wrap my head around is that, since my mails are owned by the vmail user which doesn't have login password/previlege, how are my mails password protected when I access them from the Web? Thanks again! James |
|
| Author: | jamesl [ Thu Mar 27, 2008 5:07 pm ] |
| Post subject: | |
nabber00 wrote: You might also want to look at virtual_alias_maps. This is similar to a normal /etc/aliases file and allows you to deliver the mail to a local user as usual, or forward:
postmaster@foo.com root user@bar.com localuser forward@bar.com user@someother.com This way you can read your mail any way you normally would on that system. Thank you nabber00, I am going to look into this soon. |
|
| Author: | pclissold [ Thu Mar 27, 2008 5:29 pm ] |
| Post subject: | |
jamesl wrote: What I really want to do is to access my mails from the web. Any recommendations on the software I should use?
I use SquirrelMail for my web mail. SquirrelMail needs an IMAP server - I use Dovecot, which also serves all my other IMAP and POP needs. |
|
| Author: | mwalling [ Thu Mar 27, 2008 10:03 pm ] |
| Post subject: | |
and Dovecot also integrates back into Postfix to provide SASL (what Postfix uses to auth users trying to send mail) quite nicely |
|
| Author: | nabber00 [ Thu Mar 27, 2008 10:42 pm ] |
| Post subject: | |
Quote: I use SquirrelMail for my web mail. SquirrelMail needs an IMAP server - I use Dovecot, which also serves all my other IMAP and POP needs. Quote: and Dovecot also integrates back into Postfix to provide SASL (what Postfix uses to auth users trying to send mail) quite nicely
I use this same setup, works nicely. |
|
| Author: | jsmolens [ Fri Mar 28, 2008 10:05 pm ] |
| Post subject: | |
pclissold wrote: jamesl wrote: What I really want to do is to access my mails from the web. Any recommendations on the software I should use? I use SquirrelMail for my web mail. SquirrelMail needs an IMAP server - I use Dovecot, which also serves all my other IMAP and POP needs. I use RoundCube mail and wu-imapd (with a patch I wrote to report spam/ham to spamassassin). RC's interface is far more modern/slicker than squirrel mail, although it's still lacking in terms of plugins. You can use both webmail clients on the same server if you want to try things out. Just install them to different directories. |
|
| Author: | jamesl [ Fri Mar 28, 2008 11:29 pm ] |
| Post subject: | |
I installed dovecot and squirrelmail yesterday and so far so good. I agree that RoundCube's interface is way better looking than squirrelmail's but it seems too new (2 year?) for me to trust it with my emails. Anyways, thank a lot folks. Your advice has been very helpful! |
|
| Author: | chrisnolan [ Wed Apr 02, 2008 6:04 am ] |
| Post subject: | |
I've been using roundcube for some time and i don't think you should be put off because it is still young. It's a very nice system, and as it matures I am sure they will improve the plugin API and more people will write more useful plugins. (I'm thinking of creating one myself to integrate some basic functionality of postfixadmin into it.) I certainly wouldn't worry about trusting it with your email because the stable release is very solid, and compared to squirrelmail the UI is a dream. BTW, if you're hosting lots of domains and users, then a system like postfixadmin to store your virtual maps and aliases in a database would make life much easier for you. There are some good guides at howtoforge for setting it up. If you only have a few domains and mailboxes it's probably not worth it though. |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|